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

@@ -0,0 +1,17 @@
<?php
if ($this->is_id()) {
# EMAIL LOG RÉSZLETEK
$email_log = new email_log();
$email_log->set_el_data_by_id($this->get_id());
$smarty->assign('email', $email_log);
$smarty->display('email.tpl');
} else {
}
?>

View File

@@ -0,0 +1,37 @@
<?php
if ($this->is_id()) {
# EMAIL LISTA (50 / oldal)
$all_emails_query = "SELECT count(DISTINCT el_id) FROM email_log";
$emails_query = "SELECT * FROM email_log ORDER BY el_sent_date DESC LIMIT " . ($this->is_id() ? ($this->get_id() - 1) * 50 : "0") . ",50";
$el_assoc_array = $sql->assoc_array($emails_query);
$el_count = $sql->single_variable($all_emails_query);
$next_link = true;
$el_array = array();
foreach ($el_assoc_array as $key => $el) {
$new_el = new email_log();
$new_el->set_el_data_by_id($el['el_id']);
$el_array[] = $new_el;
}
$fold = $el_count > 50;
if ($el_count <= $this->get_id() * 50) {
$next_link = false;
}
$smarty->assign('el_array', $el_array);
$smarty->assign('fold', $fold);
$smarty->assign('next_id', $next_link ? $this->get_id() + 1 : false);
$smarty->assign('previous_id', ($this->get_id() > 1 ? $this->get_id() - 1 : false));
$smarty->display('emails.tpl');
} else {
header("Location: /admin/emails/1");
}
?>