]> git.mxchange.org Git - mailer.git/commitdiff
Rewrites from to , fixes
authorRoland Häder <roland@mxchange.org>
Wed, 28 Oct 2009 23:25:55 +0000 (23:25 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 28 Oct 2009 23:25:55 +0000 (23:25 +0000)
inc/mails/bonus_mails.php
inc/modules/admin/what-del_email.php
inc/modules/admin/what-unlock_emails.php
templates/de/emails/order-accept.tpl
templates/de/emails/order-deleted.tpl
templates/de/emails/order-reject.tpl

index edd37ab9176c3770b4849c8955659a8bd4bd9e9d..568a2f0f98e116f2cd0cd160e8122c7ca5578d55 100644 (file)
@@ -98,10 +98,16 @@ if (!empty($sql)) {
                while ($content = SQL_FETCHARRAY($result_main)) {
                        // Update account
                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data`
-SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s'
-WHERE `userid`=%s
+SET
+       `bonus_ral_notify`=UNIX_TIMESTAMP(),
+       `bonus_ral_%s_notify`=UNIX_TIMESTAMP()
+WHERE
+       `userid`=%s
 LIMIT 1",
-                       array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
+                               array(
+                                       $mode,
+                                       $content['userid']
+                               ), __FILE__, __LINE__);
 
                        // Load email template and send it to the user!
                        if ($sentBonusMails === true) {
@@ -109,7 +115,7 @@ LIMIT 1",
                                $UIDs[] = $content['userid'];
                        } else {
                                // Send normal notification mail to the members
-                               $message = loadEmailTemplate('bonus_' . $mode . '_notify', array(), $content['userid']);
+                               $message = loadEmailTemplate('bonus_' . $mode . '_notify', $content, $content['userid']);
                                sendEmail($content['email'], $subject, $message);
                        }
                } // END - while
index 48ec07db39fa1ea46bfecb5799eeac9c1850e1b4..b4ede2da8621d1a0ad4f670cabf3f4aef99952f0 100644 (file)
@@ -64,16 +64,14 @@ if (isGetRequestElementSet('mid')) {
                $content['sender']  = generateUserProfileLink($sender);
                $content['subject'] = $subject;
                $content['url']     = generateDerefererUrl($url);
+               $content['url_raw'] = $url;
                $content['ordered'] = generateDateTime($timestamp, '0');
 
                // Load template
                loadTemplate('admin_del_email_normal', false, $content);
 
-               // Transfer data to data array
-               $DATA = array('url' => $url, 'subject' => $subject);
-
                // Load email template and send the email away
-               $message_user = loadEmailTemplate('order-deleted', array(), $sender);
+               $message_user = loadEmailTemplate('order-deleted', $content, $sender);
                sendEmail($sender, getMessage('MEMBER_ORDER_DELETED'), $message_user);
 
                // Fetch right stats_id from pool
index 8bdde01352e79689ff03038137df9dd2bffd761a..658d48788343b4bddf0d06737da950bb2db04587 100644 (file)
@@ -92,7 +92,7 @@ LIMIT 1",
                                // Update wents fine?
                                if (SQL_NUMROWS($result) == 1) {
                                        // Load data
-                                       $DATA = SQL_FETCHARRAY($result);
+                                       $content = SQL_FETCHARRAY($result);
 
                                        // Free result
                                        SQL_FREERESULT($result);
@@ -101,24 +101,24 @@ LIMIT 1",
                                        // @TODO Rewrite these if-blocks to a filter
                                        if ((isExtensionActive('surfbar')) && (getConfig('surfbar_migrate_order') == 'Y')) {
                                                // Then "migrate" the URL to the surfbar
-                                               SURFBAR_ADMIN_MIGRATE_URL($DATA['url'], $DATA['sender']);
+                                               SURFBAR_ADMIN_MIGRATE_URL($content['url'], $content['sender']);
                                        } // END - if
 
                                        // Check for bonus extension version >= 0.4.4 for the order bonus
                                        if ((getExtensionVersion('bonus') >= '0.4.4') && (getConfig('bonus_active') == 'Y')) {
                                                // Add points directly
                                                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_order`=`bonus_order`+".getConfig('bonus_order')." WHERE `userid`=%s LIMIT 1",
-                                                       array(bigintval($DATA['sender'])), __FILE__, __LINE__);
+                                                       array(bigintval($content['sender'])), __FILE__, __LINE__);
 
                                                // Subtract bonus points from system
                                                handleBonusPoints(getConfig('bonus_order'));
                                        } // END - if
 
                                        // Load email template
-                                       $message_user = loadEmailTemplate('order-accept', array(), $DATA['sender']);
+                                       $message_user = loadEmailTemplate('order-accept', $content, $content['sender']);
 
                                        // Send email
-                                       sendEmail($DATA['sender'], getMessage('MEMBER_ORDER_ACCEPTED'), $message_user);
+                                       sendEmail($content['sender'], getMessage('MEMBER_ORDER_ACCEPTED'), $message_user);
 
                                        // Unlock selected email
                                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='NEW' WHERE `id`=%s AND `data_type`='ADMIN' LIMIT 1",
@@ -148,14 +148,14 @@ LIMIT 1",
                                        array($id), __FILE__, __LINE__);
 
                                // Load data
-                               $DATA = SQL_FETCHARRAY($result);
+                               $content = SQL_FETCHARRAY($result);
 
                                // Free result
                                SQL_FREERESULT($result);
 
                                // Load email template and send it away
-                               $message_user = loadEmailTemplate('order-reject', array(), $DATA['sender']);
-                               sendEmail($DATA['sender'], getMessage('MEMBER_ORDER_REJECTED'), $message_user);
+                               $message_user = loadEmailTemplate('order-reject', $content, $content['sender']);
+                               sendEmail($content['sender'], getMessage('MEMBER_ORDER_REJECTED'), $message_user);
 
                                // If you do not enter an URL to redirect to, your URL will be set!
                                if ((!isPostRequestElementSet(('redirect'))) || (postRequestElement('redirect') == 'http://')) setRequestPostElement('redirect', getConfig('URL'));
index b6df7dd488e2c644fe18da713781ae8105d37e0f..572e9c78a96db6f88629a19088ce0e62298067c6 100644 (file)
@@ -3,9 +3,9 @@ Hallo $content[gender] $content[surname] $content[family],
 Einer unserer Administratoren hat soeben Ihre Mailbuchung freigegeben. Sie wird von unserem System automatisch versendet! Bitte beachten Sie, dass dies ggf. zeitversetzt zu dieser Mail versendet wird. Hier sind nochmals URL und Betreff Ihrer Mailbuchung:
 
 -----------------------------
-Beworbene URL: $DATA[url]
+Beworbene URL: $content[url]
 -----------------------------
-Betreffzeile: $DATA[subject]
+Betreffzeile: $content[subject]
 -----------------------------
 
 Sie koennen den Versand-Fortschritt im Mitgliedsmenue unter "Unbest&auml;tigte Mails" verfolgen. Sobald die Mail vollstaendig versendet wurde, erhalten Sie eine weitere Mail!
index 1f7a0d9f021d7df8e9f6f4858a1acd6c060b280d..1c2ec0bb2afda5bdd394cc9aaafe0d052cf7ae2f 100644 (file)
@@ -3,8 +3,9 @@ Hallo $content[gender] $content[surname] $content[family],
 Einer unserer Administratoren hat soeben Ihre Mailbuchung geloescht. Hier sind nochmals Ihre URL und Betreff Ihrer Mailbuchung:
 
 ---------------
-Beworbene URL: $DATA[url]
-Betreffzeile: $DATA[subject]
+Beworbene URL: $content[url_raw]
+---------------
+Betreffzeile: $content[subject]
 ---------------
 
 Ihre Mailbuchung wurde somit gel&ouml;scht. Sollten Sie Fragen hierzu haben, so wenden Sie sich bitte an unseren Support.
index 5b159601a8a13250d422860df0d480d1dc5ebf27..3b9f65676de33d0a767abd3a8a168838bb27f868 100644 (file)
@@ -3,9 +3,9 @@ Hallo $content[gender] $content[surname] $content[family],
 Einer unserer Administratoren hat soeben Ihre Mailbuchung abgelehnt. Bite beachten Sie unsere AGBs! Bei weiteren Verstoessen gegen unsere AGBs werden wir Ihre URL und ggf. auch Ihren Account sperren. Hier sind nochmals Ihre URL und Betreff Ihrer Mailbuchung:
 
 -----------------------------
-Beworbene URL: $DATA[url]
+Beworbene URL: $content[url]
 -----------------------------
-Betreffzeile: $DATA[subject]
+Betreffzeile: $content[subject]
 -----------------------------
 
 Ihre Mailbuchung wurde somit gel&ouml;scht. Sollten Sie Fragen hierzu haben, so wenden Sie sich bitte an unseren Support.