]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-lock_sponsor.php
Naming convention applied to language strings, new API function added:
[mailer.git] / inc / modules / admin / what-lock_sponsor.php
index a59eaf4e04c55caee2b78525ffad89ecd030e24f..6be215f80d22dd7287627d2e5b0b675b96790563 100644 (file)
@@ -48,7 +48,7 @@ $message = '';
 
 if (isGetRequestParameterSet('id')) {
        // Check for selected sponsor
-       $result_sponsor = SQL_QUERY_ESC("SELECT `gender`, `surname`, `family`, `email`, `status` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1",
+       $result_sponsor = SQL_QUERY_ESC("SELECT `gender`, `surname`, `family`, `email`, `status` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`=%s LIMIT 1",
                array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result_sponsor) == 1) {
                // Get sponsor's current status and let only confirmed and locked status pass
@@ -64,12 +64,12 @@ if (isGetRequestParameterSet('id')) {
                                if ($content['status'] == 'CONFIRMED') {
                                        // Message when sponsor's account got lock
                                        $content['message'] = '{--SPONSOR_ACCOUNT_LOCKED--}';
-                                       $subject = '{--SPONSOR_SUBJECT_LOCKED--}';
+                                       $subject = '{--SPONSOR_LOCKED_SUBJECT--}';
                                        $content['status'] = 'LOCKED';
                                } else {
                                        // Message when sponsor's account got unlock
                                        $content['message'] = '{--SPONSOR_ACCOUNT_UNLOCKED--}';
-                                       $subject = '{--SPONSOR_SUBJECT_UNLOCKED--}';
+                                       $subject = '{--SPONSOR_UNLOCKED_SUBJECT--}';
                                        $content['status'] = 'CONFIRMED';
                                }
 
@@ -80,7 +80,7 @@ if (isGetRequestParameterSet('id')) {
                                sendEmail($content['email'], $subject, $message);
 
                                // Update sponsor's account
-                               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `status`='%s' WHERE `id`='%s' LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `status`='%s' WHERE `id`=%s LIMIT 1",
                                        array($content['status'], bigintval(getRequestParameter('id'))), __FILE__, __LINE__);
                        } elseif (isPostRequestParameterSet('no')) {
                                // No don't lock / unlock now!
@@ -105,7 +105,7 @@ if (isGetRequestParameterSet('id')) {
                        }
                } else {
                        // Cannot change status on unconfirmed or pending accounts!
-                       $message = '{--ADMIN_SPONSPOR_CANNOT_LOCK_PENDING_UNCINFIRMED_ACCOUNTS--}';
+                       $message = '{--ADMIN_SPONSOR_CANNOT_LOCK_PENDING_UNCINFIRMED_ACCOUNTS--}';
                }
        } else {
                // Sponsor not found!