add notify emails

This commit is contained in:
2025-05-24 18:56:48 +02:00
parent aa7848c34b
commit 50936f84e3
11 changed files with 568 additions and 3 deletions

View File

@@ -221,7 +221,7 @@ class camp_apply
$mail->SMTPDebug = 0; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->CharSet = PHPMailer::CHARSET_UTF8; // UTF-8
$mail->Host = 'mail.livingsport.hu '; // Specify main and backup SMTP servers
$mail->Host = 'mail.livingsport.hu'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'notify@livingsport.hu'; // SMTP username
$mail->Password = 'dpDiKSqU0V'; // SMTP password

212
_class/class_email_log.php Normal file
View File

@@ -0,0 +1,212 @@
<?php
class email_log
{
private $el_id;
private $el_message;
private $el_subject;
private $el_to_name;
private $el_to_email;
private $el_sent_date;
private $el_exception;
private $el_email_template_et_id;
public function set_el_data_by_id($_id)
{
global $sql;
$el_data_assoc_array = $sql->assoc_array("select * from email_log where el_id = " . $_id);
$el_data_array = $el_data_assoc_array[0];
foreach ($el_data_array as $field => $value) {
$function_name = "set_" . $field;
$this->$function_name($value);
if ('el_email_template_et_id' == $field) {
$new_et = new email_template();
$new_et->set_et_data_by_id($value);
$this->set_el_email_template_et_id($new_et);
}
}
}
public static function create_email_log($_message, $_subject, $_name, $_email, $_et, $_exc = 'null', $_date = null)
{
global $sql;
if (null === $_date) {
$_date = date('Y-m-d H:i:s');
}
return $sql->insert_into('email_log', array(
'el_message' => $_message,
'el_subject' => $_subject,
'el_to_name' => $_name,
'el_to_email' => $_email,
'el_email_template_et_id' => $_et,
'el_exception' => $_exc,
'el_sent_date' => $_date
));
}
/**
* @return mixed
*/
public function get_el_id()
{
return $this->el_id;
}
/**
* @param mixed $el_id
*
* @return self
*/
public function set_el_id($el_id)
{
$this->el_id = $el_id;
return $this;
}
/**
* @return mixed
*/
public function get_el_message()
{
return $this->el_message;
}
/**
* @param mixed $el_message
*
* @return self
*/
public function set_el_message($el_message)
{
$this->el_message = $el_message;
return $this;
}
/**
* @return mixed
*/
public function get_el_subject()
{
return $this->el_subject;
}
/**
* @param mixed $el_subject
*
* @return self
*/
public function set_el_subject($el_subject)
{
$this->el_subject = $el_subject;
return $this;
}
/**
* @return mixed
*/
public function get_el_to_name()
{
return $this->el_to_name;
}
/**
* @param mixed $el_to_name
*
* @return self
*/
public function set_el_to_name($el_to_name)
{
$this->el_to_name = $el_to_name;
return $this;
}
/**
* @return mixed
*/
public function get_el_to_email()
{
return $this->el_to_email;
}
/**
* @param mixed $el_to_email
*
* @return self
*/
public function set_el_to_email($el_to_email)
{
$this->el_to_email = $el_to_email;
return $this;
}
/**
* @return mixed
*/
public function get_el_sent_date()
{
return $this->el_sent_date;
}
/**
* @param mixed $el_sent_date
*
* @return self
*/
public function set_el_sent_date($el_sent_date)
{
$this->el_sent_date = $el_sent_date;
return $this;
}
/**
* @return mixed
*/
public function get_el_exception()
{
return $this->el_exception;
}
/**
* @param mixed $el_exception
*
* @return self
*/
public function set_el_exception($el_exception)
{
$this->el_exception = $el_exception;
return $this;
}
/**
* @return mixed
*/
public function get_el_email_template_et_id()
{
return $this->el_email_template_et_id;
}
/**
* @param mixed $el_email_template_et_id
*
* @return self
*/
public function set_el_email_template_et_id($el_email_template_et_id)
{
$this->el_email_template_et_id = $el_email_template_et_id;
return $this;
}
}
?>

View File

@@ -128,6 +128,11 @@ class user_kid extends user_parent {
public function get_uk_shirt_size() {
return $this->user_shirt_size;
}
public function get_uk_is_active() {
return $this->user_is_active;
}
public function get_uk_shirt_size_name() {
global $sql;
if ($this->user_shirt_size) return $sql->single_variable("select shirt_name from shirt where shirt_id = " . $this->user_shirt_size);
@@ -375,6 +380,11 @@ class user_kid extends user_parent {
$city->set_school_city_data_by_id($value);
$this->set_uk_address($city);
}
if ($field == 'uk_parent_1' && !empty($value)) {
$parent = new user_parent();
$parent->set_user_data_by_id($value);
$this->set_uk_parent_1($parent);
}
//$this->set_ua_type(2); //kid típus beállítása
}
$this->set_login(true);