From e49ee20d8174b780048a140cf575ad930e662d86 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 27 Nov 2008 23:49:22 +0000 Subject: [PATCH] Email templates added when member edits his/her URLs --- .gitattributes | 2 ++ inc/databases.php | 2 +- inc/libs/surfbar_functions.php | 17 ++++++---- .../emails/admin/admin_surfbar_url_edited.tpl | 33 +++++++++++++++++++ .../member/member_surfbar_url_depleted.tpl | 12 +++---- .../member/member_surfbar_url_edited.tpl | 25 ++++++++++++++ 6 files changed, 77 insertions(+), 14 deletions(-) create mode 100644 templates/de/emails/admin/admin_surfbar_url_edited.tpl create mode 100644 templates/de/emails/member/member_surfbar_url_edited.tpl diff --git a/.gitattributes b/.gitattributes index 4947c0a6e7..e16bba4df2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -655,6 +655,7 @@ templates/de/emails/admin/admin_support-reflink.tpl -text templates/de/emails/admin/admin_support-unconfirmed.tpl -text templates/de/emails/admin/admin_surfbar_url_confirmed.tpl -text templates/de/emails/admin/admin_surfbar_url_depleted.tpl -text +templates/de/emails/admin/admin_surfbar_url_edited.tpl -text templates/de/emails/admin/admin_surfbar_url_migrate.tpl -text templates/de/emails/admin/admin_surfbar_url_pending.tpl -text templates/de/emails/admin/admin_surfbar_url_reg.tpl -text @@ -730,6 +731,7 @@ templates/de/emails/member/member_support-unconfirmed.tpl -text templates/de/emails/member/member_surfbar_low_points.tpl -text templates/de/emails/member/member_surfbar_url_confirmed.tpl -text templates/de/emails/member/member_surfbar_url_depleted.tpl -text +templates/de/emails/member/member_surfbar_url_edited.tpl -text templates/de/emails/member/member_surfbar_url_migrate.tpl -text templates/de/emails/member/member_surfbar_url_pending.tpl -text templates/de/emails/member/member_surfbar_url_reg.tpl -text diff --git a/inc/databases.php b/inc/databases.php index 74522f8b05..dbc806f858 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "565"); +define('CURR_SVN_REVISION', "566"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index a4623cdf85..321a76a64e 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -402,8 +402,7 @@ function SURFBAR_MEMBER_EXECUTE_EDIT_ACTION ($urlData) { $url2 = COMPILE_CODE($urlData['edit']['url']); // Has the URL or limit changed? - if (true) { - //if (($urlData['views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) { + if (($urlData['views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) { // Run the query SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_urls SET url='%s', views_allowed=%s, views_max=%s WHERE id=%s AND status='%s' LIMIT 1", array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['status']), __FILE__, __LINE__); @@ -418,10 +417,13 @@ function SURFBAR_MEMBER_EXECUTE_EDIT_ACTION ($urlData) { // Send user notification SURFBAR_NOTIFY_USER("url_edited", $urlData); - } // END - if - // All fine! - return true; + // All fine + return true; + } + + // Not updated + return false; } // // ----------------------------------------------------------------------------- @@ -1165,6 +1167,9 @@ function SURFBAR_DETERMINE_WAIT_TIME () { function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array()) { global $_CONFIG; + // Make new status always lower-case + $newStatus = strtolower($newStatus); + // Get URL data for status comparison if missing if ((!is_array($data)) || (count($data) == 0)) { // Fetch missing URL data @@ -1202,8 +1207,6 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array()) $data[$urlId]['reward'] = TRANSLATE_COMMA($_CONFIG['surfbar_static_reward']); $data[$urlId]['costs'] = TRANSLATE_COMMA($_CONFIG['surfbar_static_costs']); $data[$urlId]['status'] = SURFBAR_TRANSLATE_STATUS($newStatus); - $data[$urlId]['registered'] = MAKE_DATETIME($data[$urlId]['registered'], "2"); - $newStatus = strtolower($newStatus); // Send admin notification SURFBAR_NOTIFY_ADMIN("url_{$newStatus}", $data[$urlId]); diff --git a/templates/de/emails/admin/admin_surfbar_url_edited.tpl b/templates/de/emails/admin/admin_surfbar_url_edited.tpl new file mode 100644 index 0000000000..2864f2d30b --- /dev/null +++ b/templates/de/emails/admin/admin_surfbar_url_edited.tpl @@ -0,0 +1,33 @@ +{--HELLO_ADMIN--}, + +Ein Mitglied hat soeben seine URL geändert: + +Hier sind alle Daten dazu: +------------------------------------------ +User-ID: $content[userid] +------------------------------------------ +Email: $content[email] +------------------------------------------ +Name: $content[surname] $content[family] +------------------------------------------ +Gebuchte URL: $content[url] (Neu: $content[new_url]) +------------------------------------------ +ID in der Surfbar: $content[id] +------------------------------------------ +URL angemeldet: $content[registered] +------------------------------------------ +Zuletzt gesperrt: $content[last_locked] +------------------------------------------ +Sperrgrund: $content[lock_reason] +------------------------------------------ +Gesamteinblendungen: $content[views_total] +------------------------------------------ +Maximale Einblendungen: $content[views_allowed] (Neu: $content[new_limit]) +------------------------------------------ +Davon übrig: $content[views_max] (Neu: $content[new_limit]) +------------------------------------------ + +{--ADMIN_THANX--} + {--YOUR--} {!MAIN_TITLE!} {--SCRIPT--} + +{!URL!}/admin.php diff --git a/templates/de/emails/member/member_surfbar_url_depleted.tpl b/templates/de/emails/member/member_surfbar_url_depleted.tpl index e3cf5ea877..d40466914b 100644 --- a/templates/de/emails/member/member_surfbar_url_depleted.tpl +++ b/templates/de/emails/member/member_surfbar_url_depleted.tpl @@ -12,12 +12,12 @@ Status: $content[status] ------------------------------------------ Datum der Buchung: $content[registered] ------------------------------------------ -Gesamteinblendungen: $content[views_total] ------------------------------------------- -Maximale Einblendungen: $content[views_allowed] ------------------------------------------- -Davon übrig: $content[views_max] ------------------------------------------- +Gesamteinblendungen: $content[views_total] +------------------------------------------ +Maximale Einblendungen: $content[views_allowed] +------------------------------------------ +Davon übrig: $content[views_max] +------------------------------------------ Kosten/Aufruf: $content[costs] {!POINTS!} ------------------------------------------ ID in der Surfbar: $content[id] diff --git a/templates/de/emails/member/member_surfbar_url_edited.tpl b/templates/de/emails/member/member_surfbar_url_edited.tpl new file mode 100644 index 0000000000..5113c0be24 --- /dev/null +++ b/templates/de/emails/member/member_surfbar_url_edited.tpl @@ -0,0 +1,25 @@ +Hallo $content[gender] $content[surname] $content[family], + +Sie hatten soeben Ihre gebuchte URL geändert. Dabei wurde sie eventuell auf "Wartend" gestellt. + +Hier sind alle Daten dazu: +------------------------------------------ +User-ID: $content[userid] +------------------------------------------ +Gebuchte URL: $content[url] (Neu: $content[new_url]) +------------------------------------------ +ID in der Surfbar: $content[id] +------------------------------------------ +URL angemeldet: $content[registered] +------------------------------------------ +Zuletzt gesperrt: $content[last_locked] +------------------------------------------ +Sperrgrund: $content[lock_reason] +------------------------------------------ +Neue maximale Einblendungen: $content[new_limit] +------------------------------------------ + +Mit freundlichem Gruss, + Ihr {!MAIN_TITLE!} Team + +{!URL!}/login.php ({!WEBMASTER!}) -- 2.39.5