]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-sponsor_login.php
Deprecated $DATA renamed:
[mailer.git] / inc / modules / guest / what-sponsor_login.php
index 7082a5cf0cf17c01ce88da9347fecea4c9da23b5..fe65aaf38ed2d71d21f00de8180e11c7302c3fdb 100644 (file)
@@ -44,7 +44,7 @@ if (!defined('__SECURITY')) {
 addYouAreHereLink('guest', __FILE__);
 
 if ((!isExtensionActive('sponsor'))) {
-       displayMessage(generateExtensionInactiveNotInstalledMessage('sponsor'));
+       displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=sponsor%}');
        return;
 } elseif (isSponsor()) {
        // Is already a logged-in sponsor
@@ -64,10 +64,10 @@ if (isGetRequestParameterSet('mode')) {
 if (isGetRequestParameterSet('hash')) {
        // Lookup sponsor
        $result = SQL_QUERY_ESC("SELECT
-       `id`, `status`, `gender`, `surname`, `family`,
-       `company`, `position`, `tax_ident`,
-       `street_nr1`, `street_nr2`, `country`, `zip`, `city`, `email`, `phone`, `fax`, `cell`,
-       `points_amount` AS `points`, `last_payment`, `last_currency`
+       `id`,`status`,`gender`,`surname`,`family`,
+       `company`,`position`,`tax_ident`,
+       `street_nr1`,`street_nr2`,`country`,`zip`,`city`,`email`,`phone`,`fax`,`cell`,
+       `points_amount` AS `points`,`last_payment`,`last_currency`
 FROM
        `{?_MYSQL_PREFIX?}_sponsor_data`
 WHERE
@@ -136,12 +136,12 @@ LIMIT 1",
                                displayMessage('{--SPONSOR_ACCOUNT_EMAIL_FAILED--}');
                        }
                } else {
-                       /// ??? Other status?
+                       // ??? Other status?
                        displayMessage('{--SPONSOR_ACCOUNT_STATUS_FAILED--}');
                }
        } else {
                // No sponsor found
-               displayMessage(getMaskedMessage('SPONSOR_ACCOUNT_404', getRequestParameter('hash')));
+               displayMessage('{%message,SPONSOR_ACCOUNT_404=' . getRequestParameter('hash') . '%}');
        }
 
        // Free memory
@@ -156,7 +156,7 @@ LIMIT 1",
        if (isFormSent()) {
                // Check email
                $result = SQL_QUERY_ESC("SELECT
-       `id`, `hash`, `status`, `remote_addr`, `gender`, `surname`, `family`,
+       `id`,`hash`,`status`,`remote_addr`,`gender`,`surname`,`family`,
        UNIX_TIMESTAMP(`sponsor_created`) AS `sponsor_created`
 FROM
        `{?_MYSQL_PREFIX?}_sponsor_data`
@@ -207,7 +207,7 @@ LIMIT 1",
        if (isFormSent()) {
                // Check email
                $result = SQL_QUERY_ESC("SELECT
-       `id`, `hash`, `remote_addr`, `gender`, `surname`, `family`,
+       `id`,`hash`,`remote_addr`,`gender`,`surname`,`family`,
        UNIX_TIMESTAMP(`sponsor_created`) AS `sponsor_created`
 FROM
        `{?_MYSQL_PREFIX?}_sponsor_data`
@@ -221,14 +221,14 @@ LIMIT 1",
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
                        // Unconfirmed sponsor account found so let's load the requested data
-                       $DATA = SQL_FETCHARRAY($result);
+                       $content = SQL_FETCHARRAY($result);
 
                        // Generate password/translate some data
-                       $DATA['password']        = generatePassword();
-                       $DATA['sponsor_created'] = generateDateTime($DATA['sponsor_created']);
+                       $content['password']        = generatePassword();
+                       $content['sponsor_created'] = generateDateTime($content['sponsor_created']);
 
                        // Prepare email and send it to the sponsor
-                       $message_sponsor = loadEmailTemplate('sponsor_lost', $DATA);
+                       $message_sponsor = loadEmailTemplate('sponsor_lost', $content);
                        sendEmail(postRequestParameter('email'), '{--SPONSOR_LOST_PASSWORD_SUBJECT--}', $message_sponsor);
 
                        // Update password
@@ -239,7 +239,7 @@ SET
 WHERE
        `id`=%s
 LIMIT 1",
-                               array(md5($DATA['password']), bigintval($DATA['id'])), __FILE__, __LINE__);
+                               array(md5($content['password']), bigintval($content['id'])), __FILE__, __LINE__);
 
                        // Output message
                        displayMessage('{--SPONSOR_LOST_PASSWORD_SENT--}');