]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-del_sponsor.php
Naming convention applied to language strings, new API function added:
[mailer.git] / inc / modules / admin / what-del_sponsor.php
index 98805ddfc9b305cf271911c47eb033363825657e..b7e6b0b95b9574b59d5e349e953295f7605ac1ed 100644 (file)
@@ -47,7 +47,7 @@ addMenuDescription('admin', __FILE__);
 
 if (isGetRequestParameterSet('id')) {
        // Check for selected sponsor
-       $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT `id`, `email`, `gender`, `surname`, `family` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`=%s LIMIT 1",
                array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Remove sponsor
@@ -56,7 +56,6 @@ if (isGetRequestParameterSet('id')) {
                        $content = SQL_FETCHARRAY($result);
 
                        // Prepare data for the template
-                       $content['gender']  = translateGender($content['gender']);
                        $content['reason']  = secureString(postRequestParameter('reason'));
 
                        // Prepare message and send it away
@@ -64,11 +63,11 @@ if (isGetRequestParameterSet('id')) {
                        sendEmail($content['email'], '{--ADMIN_SPONSOR_DELETE_SUBJECT--}', $message);
 
                        // Remove account
-                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1",
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`=%s LIMIT 1",
                                array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__);
 
                        // Remove orders
-                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_orders` WHERE `sponsorid`='%s' LIMIT 1",
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_orders` WHERE `sponsor_id`='%s' LIMIT 1",
                                array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__);
 
                        // Output message