From: Roland Häder Date: Tue, 7 Oct 2008 00:30:07 +0000 (+0000) Subject: Notication list reworked X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b9015c3fb6b46a770379c87561bdc65df4aca396;p=mailer.git Notication list reworked --- diff --git a/.gitattributes b/.gitattributes index 4fb6304520..f90ab7b1be 100644 --- a/.gitattributes +++ b/.gitattributes @@ -866,6 +866,7 @@ templates/de/html/admin/admin_del_cats.tpl -text templates/de/html/admin/admin_del_cats_row.tpl -text templates/de/html/admin/admin_del_email_bonus.tpl -text templates/de/html/admin/admin_del_email_normal.tpl -text +templates/de/html/admin/admin_del_email_notify.tpl -text templates/de/html/admin/admin_del_payments.tpl -text templates/de/html/admin/admin_del_payments_row.tpl -text templates/de/html/admin/admin_del_sponsor.tpl -text @@ -950,6 +951,7 @@ templates/de/html/admin/admin_list_links.tpl -text templates/de/html/admin/admin_list_links_problem.tpl -text templates/de/html/admin/admin_list_links_row.tpl -text templates/de/html/admin/admin_list_notify_emails.tpl -text +templates/de/html/admin/admin_list_notify_emails_row.tpl -text templates/de/html/admin/admin_list_payments.tpl -text templates/de/html/admin/admin_list_payouts.tpl -text templates/de/html/admin/admin_list_payouts_banner.tpl -text diff --git a/inc/databases.php b/inc/databases.php index 05ed13cddd..ef7c4bcebc 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -113,7 +113,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "472"); +define('CURR_SVN_REVISION', "473"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/language/bonus_de.php b/inc/language/bonus_de.php index 3089af5d3e..7f950a1657 100644 --- a/inc/language/bonus_de.php +++ b/inc/language/bonus_de.php @@ -123,6 +123,9 @@ define('ADMIN_BONUS_RALLYE_NEW_MEMBER_NOTIFY', "Sollen neue Mitglieder mit selbe define('ADMIN_BONUS_RALLYE_NOTIFY_WAIT', "Wie lange soll die Wartezeit der Bonus-Mail sein?"); define('ADMIN_BONUS_INCLUDE_OWN', "Soll Ihre Mitglieder-ID an der Aktiv-Rallye dran teilnehmen?"); define('ADMIN_NOTIFCATION_TITLE', "Ausgesendete Benachrichtigungen"); +define('ADMIN_DELETE_NOTIFY_MAIL', "Obrige Benachrichtigung entfernen"); +define('ADMIN_NOTIFY_MAIL_ALREADY_DELETED', "Benachrichtigung bereits entfernt."); +define('ADMIN_NOTIFICATION_DELETED_TITLE', "Benachrichtigung entfernt"); // Switches define('ADMIN_BONUS_RALLYE_IS_ACTIVE' , "Ist die Aktiv-Rallye aktiv?"); diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php index bcc1fcc5d2..08b23b75ca 100644 --- a/inc/modules/admin/what-del_email.php +++ b/inc/modules/admin/what-del_email.php @@ -184,6 +184,35 @@ WHERE s.pool_id=%s LIMIT 1", // Mail already deleted! LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_BONUS_MAIL_ALREADY_DELETED); } +} elseif ((!empty($_GET['nid'])) && (GET_EXT_VERSION("bonus") >= "0.8.7")) { + // Load data from bonus mail + $result = SQL_QUERY_ESC("SELECT id, subject, url, timestamp FROM "._MYSQL_PREFIX."_bonus WHERE id=%s", + array(bigintval($_GET['nid'])), __FILE__, __LINE__); + + // Delete mail only once + if (SQL_NUMROWS($result) == 1) { + // Load data + list ($id, $subject, $url, $timestamp) = SQL_FETCHROW($result); + SQL_FREERESULT($result); + + // Delete bonus mail entirely from database + $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1", + array(bigintval($_GET['nid'])), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s", + array(bigintval($_GET['nid'])), __FILE__, __LINE__); + + // Prepare data for the template + define('__ID' , $id); + define('__SUBJECT', $subject); + define('__URL' , DEREFERER($url)); + define('__ORDERED', MAKE_DATETIME($timestamp, "0")); + + // Load template + LOAD_TEMPLATE("admin_del_email_notify"); + } else { + // Mail already deleted! + LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NOTIFY_MAIL_ALREADY_DELETED); + } } else { // No mail orders fond LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_WRONG_CALL); diff --git a/inc/modules/admin/what-list_notifications.php b/inc/modules/admin/what-list_notifications.php index 61a085d77a..70abbbd6aa 100644 --- a/inc/modules/admin/what-list_notifications.php +++ b/inc/modules/admin/what-list_notifications.php @@ -99,7 +99,7 @@ if ((EXT_IS_ACTIVE("bonus")) && (SQL_NUMROWS($result_max) > 0) && (!empty($SQL2) $content['timestamp'] = MAKE_DATETIME($content['timestamp'], "0"); // Load row template - $OUT .= LOAD_TEMPLATE("admin_list_bonus_emails_row", true, $content); + $OUT .= LOAD_TEMPLATE("admin_list_notify_emails_row", true, $content); } // Add navigation (without change box but with colspan=3) diff --git a/templates/de/html/admin/admin_del_email_notify.tpl b/templates/de/html/admin/admin_del_email_notify.tpl new file mode 100644 index 0000000000..f43a274ba6 --- /dev/null +++ b/templates/de/html/admin/admin_del_email_notify.tpl @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + +
+ {--ADMIN_NOTIFICATION_DELETED_TITLE--}
{--ID_SELECT--}{--EMAIL_SUBJECT--}{--EMAIL_URL--}{--EMAIL_TIMESTAMP--}
{!__ID!}{!__SUBJECT!}{--ADMIN_TEST_URL--}{!__ORDERED!}
diff --git a/templates/de/html/admin/admin_list_bonus_emails_row.tpl b/templates/de/html/admin/admin_list_bonus_emails_row.tpl index c890128fa9..1ad3c3ffb5 100644 --- a/templates/de/html/admin/admin_list_bonus_emails_row.tpl +++ b/templates/de/html/admin/admin_list_bonus_emails_row.tpl @@ -67,6 +67,6 @@ - {--ADMIN_DELETE_BONUS_MAIL--} + {--ADMIN_DELETE_BONUS_MAIL--} diff --git a/templates/de/html/admin/admin_list_emails_row.tpl b/templates/de/html/admin/admin_list_emails_row.tpl index 68ab750bde..e9c8521097 100644 --- a/templates/de/html/admin/admin_list_emails_row.tpl +++ b/templates/de/html/admin/admin_list_emails_row.tpl @@ -56,6 +56,6 @@ - {--ADMIN_DELETE_NORMAL_MAIL--} + {--ADMIN_DELETE_NORMAL_MAIL--} diff --git a/templates/de/html/admin/admin_list_notify_emails_row.tpl b/templates/de/html/admin/admin_list_notify_emails_row.tpl new file mode 100644 index 0000000000..ba6f9e89b3 --- /dev/null +++ b/templates/de/html/admin/admin_list_notify_emails_row.tpl @@ -0,0 +1,72 @@ + + + {--EMAIL_SUBJECT--}:
+ $content[subject] + + + {--EMAIL_TEXT--}:
+ $content[text] + + +  + + + {--EMAIL_POINTS--}:
+ $content[points] {!POINTS!} + + + {--EMAIL_SECONDS--}:
+ $content[time] + + + {--EMAIL_CATEGORY--}:
+ $content[category] + + +  + + + {--EMAIL_RECEIVERS--}:
+ $content[mails_sent] + ({--EMAIL_RUIDS--}: $content[receivers]) + + + {--USERS_LINKS--}:
+ $content[unconfirmed] + + + {--EMAIL_POOL_TYPE--}:
+ $content[type] + + +  + + + {--EMAIL_TSEND--}:
+ $content[target_send] + + + {--EMAIL_URL--}:
+ {--ADMIN_TEST_URL--} + + + {--EMAIL_TIMESTAMP--}:
+ $content[timestamp] + + +  + + +
{--EMAIL_URL--}:
+
$content[url]
+ + + {--__UNUSED--}:
+ --- + + + + + {--ADMIN_DELETE_NOTIFY_MAIL--} + +