Some variable rewrites
authorRoland Häder <roland@mxchange.org>
Sun, 1 Mar 2009 06:51:25 +0000 (06:51 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 1 Mar 2009 06:51:25 +0000 (06:51 +0000)
16 files changed:
inc/db/lib-mysql3.php
inc/libs/bonus_functions.php
inc/libs/sponsor_functions.php
inc/mails/beg_mails.php
inc/mails/bonus_mails.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-email_archiv.php
inc/modules/admin/what-email_details.php
inc/modules/admin/what-list_rallyes.php
inc/modules/admin/what-list_unconfirmed.php
inc/modules/admin/what-list_user.php
inc/modules/admin/what-payments.php
inc/modules/admin/what-refbanner.php
inc/modules/admin/what-theme_edit.php
inc/modules/member/what-transfer.php
inc/mysql-manager.php

index 24e0edbb1e4ba537c05092a8841e9f93c28af0fe..a9485c6070aa87e2cdd87b2fbe4e205def5326bb 100644 (file)
@@ -320,10 +320,10 @@ function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id, $F, $L) {
        } // END  - if
 
        // Prepare the SQL statement
        } // END  - if
 
        // Prepare the SQL statement
-       $SQL = "SELECT `".implode("`, `", $columns)."` FROM `{!_MYSQL_PREFIX!}_%s` WHERE ``='%s' LIMIT 1";
+       $sql = "SELECT `".implode("`, `", $columns)."` FROM `{!_MYSQL_PREFIX!}_%s` WHERE ``='%s' LIMIT 1";
 
        // Return the result
 
        // Return the result
-       return SQL_QUERY_ESC($SQL,
+       return SQL_QUERY_ESC($sql,
                array(
                        bigintval($id),
                        $table,
                array(
                        bigintval($id),
                        $table,
index 058770d3252916309fc60051333caa557b2a3d63..6679aa5f2f064599b1d22c78719a2494b144002c 100644 (file)
@@ -43,7 +43,7 @@ function BONUS_ADD_TURBO_POINTS ($mid, $uid, $type) {
        if (getConfig('bonus_active') != "Y") return false;
 
        // Init variables
        if (getConfig('bonus_active') != "Y") return false;
 
        // Init variables
-       $SQL = ""; $bonys = 0; $mail = 0; $column = "";
+       $sql = ""; $bonys = 0; $mail = 0; $column = "";
 
        // Select SQL command
        switch ($type)
 
        // Select SQL command
        switch ($type)
index 5d99a7d5a59d749c8c179a99ce76090b7b7621d2..4f2fd8fa348a89e073e73ef414dbc2d7a20035e9 100644 (file)
@@ -120,18 +120,18 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S
                if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0;
 
                // SQL and message string is empty by default
                if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0;
 
                // SQL and message string is empty by default
-               $SQL = ""; $MSG = "";
+               $sql = ""; $MSG = "";
 
                // Update?
                if ($UPDATE) {
                        // Update his data
 
                // Update?
                if ($UPDATE) {
                        // Update his data
-                       $SQL = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET ";
+                       $sql = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET ";
                        foreach ($DATA['keys'] as $k => $v) {
                        foreach ($DATA['keys'] as $k => $v) {
-                               $SQL .= $v."='%s', ";
+                               $sql .= $v."='%s', ";
                        }
 
                        // Remove last ", " from SQL string
                        }
 
                        // Remove last ", " from SQL string
-                       $SQL = substr($SQL, 0, -2)." WHERE id='%s' LIMIT 1";
+                       $sql = substr($sql, 0, -2)." WHERE id='%s' LIMIT 1";
                        $DATA['values'][] = bigintval(REQUEST_GET('id'));
 
                        // Generate message
                        $DATA['values'][] = bigintval(REQUEST_GET('id'));
 
                        // Generate message
@@ -160,7 +160,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S
                        $VALUES = str_repeat("%s', '", count($DATA['values']) - 1);
 
                        // Generate string
                        $VALUES = str_repeat("%s', '", count($DATA['values']) - 1);
 
                        // Generate string
-                       $SQL = "INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_data` (".$KEYS.") VALUES ('".$VALUES."%s')";
+                       $sql = "INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_data` (".$KEYS.") VALUES ('".$VALUES."%s')";
 
                        // Generate message
                        $MSG = SPONSOR_GET_MESSAGE(getMessage('ADMIN_SPONSOR_ADDED'), "added", $MSGs);
 
                        // Generate message
                        $MSG = SPONSOR_GET_MESSAGE(getMessage('ADMIN_SPONSOR_ADDED'), "added", $MSGs);
@@ -186,9 +186,9 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S
                        $ret = "already";
                }
 
                        $ret = "already";
                }
 
-               if (!empty($SQL)) {
+               if (!empty($sql)) {
                        // Run SQL command
                        // Run SQL command
-                       $result = SQL_QUERY_ESC($SQL, $DATA['values'], __FUNCTION__, __LINE__);
+                       $result = SQL_QUERY_ESC($sql, $DATA['values'], __FUNCTION__, __LINE__);
                }
 
                // Output message
                }
 
                // Output message
@@ -401,10 +401,10 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
        $DATA = array();
 
        // Prepare SQL string
        $DATA = array();
 
        // Prepare SQL string
-       $SQL = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET";
+       $sql = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET";
        foreach ($POST as $key => $value) {
                // Mmmmm, too less security here???
        foreach ($POST as $key => $value) {
                // Mmmmm, too less security here???
-               $SQL   .= " ".strip_tags($key)."='%s',";
+               $sql   .= " ".strip_tags($key)."='%s',";
 
                // We will secure this later inside the SQL_QUERY_ESC() function
                $DATA[] = strip_tags($value);
 
                // We will secure this later inside the SQL_QUERY_ESC() function
                $DATA[] = strip_tags($value);
@@ -420,7 +420,7 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
                        $EMAIL = true;
 
                        // Okay, has changed then add status with UNCONFIRMED and new hash code
                        $EMAIL = true;
 
                        // Okay, has changed then add status with UNCONFIRMED and new hash code
-                       $SQL .= " `status`='EMAIL', hash='%s',";
+                       $sql .= " `status`='EMAIL', hash='%s',";
 
                        // Generate hash code
                        $HASH = md5(session_id().":".$POST['email'].":".GET_REMOTE_ADDR().":".GET_USER_AGENT().":".time());
 
                        // Generate hash code
                        $HASH = md5(session_id().":".$POST['email'].":".GET_REMOTE_ADDR().":".GET_USER_AGENT().":".time());
@@ -429,10 +429,10 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
        }
 
        // Remove last commata
        }
 
        // Remove last commata
-       $SQL = substr($SQL, 0, -1);
+       $sql = substr($sql, 0, -1);
 
        // Add SQL tail data
 
        // Add SQL tail data
-       $SQL .= " WHERE id='%s' AND password='%s' LIMIT 1";
+       $sql .= " WHERE id='%s' AND password='%s' LIMIT 1";
        $DATA[] = bigintval(get_session('sponsorid'));
        $DATA[] = get_session('sponsorpass');
 
        $DATA[] = bigintval(get_session('sponsorid'));
        $DATA[] = get_session('sponsorpass');
 
@@ -472,7 +472,7 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
        if (SQL_AFFECTEDROWS() == 1) {
                if (!empty($templ) && !empty($subj)) {
                        // Run SQL command and check for success
        if (SQL_AFFECTEDROWS() == 1) {
                if (!empty($templ) && !empty($subj)) {
                        // Run SQL command and check for success
-                       $result = SQL_QUERY_ESC($SQL, $DATA, __FUNCTION__, __LINE__);
+                       $result = SQL_QUERY_ESC($sql, $DATA, __FUNCTION__, __LINE__);
 
                        // Add all data to content
                        global $DATA;
 
                        // Add all data to content
                        global $DATA;
index 8072c29321c12352e9888307cef2a964e9cd54d8..b6e6ef3b4e041e0a31d58d7f3ad299a428f720e6 100644 (file)
@@ -44,23 +44,23 @@ if ($GLOBALS['output_mode'] == 1) return;
 
 // Create timemark from saved month
 $mark = mktime(0, 0, 0, getConfig('last_month'), date("d", time()), date('Y', time()));
 
 // Create timemark from saved month
 $mark = mktime(0, 0, 0, getConfig('last_month'), date("d", time()), date('Y', time()));
-$SQL = ""; $MODE = "";
+$sql = ""; $MODE = "";
 
 // Shall I sent activation or deactivation mail?
 
 // Shall I sent activation or deactivation mail?
-$SQL = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (beg_ral_notify ";
+$sql = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (beg_ral_notify ";
 switch (getConfig('beg_rallye'))
 {
 case "Y": // Begging rallye is activated
        if (getConfig('beg_ral_en_notify') == "Y")
        {
                // Okay, let's check for member accounts
 switch (getConfig('beg_rallye'))
 {
 case "Y": // Begging rallye is activated
        if (getConfig('beg_ral_en_notify') == "Y")
        {
                // Okay, let's check for member accounts
-               $SQL .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)";
+               $sql .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)";
                $MODE = "en";
        }
         else
        {
                // Do not notify!
                $MODE = "en";
        }
         else
        {
                // Do not notify!
-               $SQL = "";
+               $sql = "";
        }
        break;
 
        }
        break;
 
@@ -68,20 +68,20 @@ case "N": // Begging rallye is deactivated
        if (getConfig('beg_ral_di_notify') == "Y")
        {
                // Okay, let's check for member accounts
        if (getConfig('beg_ral_di_notify') == "Y")
        {
                // Okay, let's check for member accounts
-               $SQL .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify";
+               $sql .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify";
                $MODE = "di";
        }
         else
        {
                // Do not notify!
                $MODE = "di";
        }
         else
        {
                // Do not notify!
-               $SQL = "";
+               $sql = "";
        }
        break;
 }
 
        }
        break;
 }
 
-if (!empty($SQL)) {
+if (!empty($sql)) {
        // The SQL command needs to be finisched here (only confirmed accounts!)
        // The SQL command needs to be finisched here (only confirmed accounts!)
-       $SQL .= ") AND `status`='CONFIRMED' ORDER BY last_online ASC";
+       $sql .= ") AND `status`='CONFIRMED' ORDER BY last_online ASC";
 
        // Prepare data for the template
        define('__BEG_MIN_POINTS' , TRANSLATE_COMMA(getConfig('beg_points')));
 
        // Prepare data for the template
        define('__BEG_MIN_POINTS' , TRANSLATE_COMMA(getConfig('beg_points')));
@@ -99,7 +99,7 @@ if (!empty($SQL)) {
        }
 
        // Check for accounts to be notified
        }
 
        // Check for accounts to be notified
-       $result_main = SQL_QUERY($SQL, __FILE__, __LINE__);
+       $result_main = SQL_QUERY($sql, __FILE__, __LINE__);
        if (SQL_NUMROWS($result_main) > 0) {
                // Normal notification mails or bonus mails?
                $MAIL_MODE = ((getConfig('beg_notify_bonus') > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
        if (SQL_NUMROWS($result_main) > 0) {
                // Normal notification mails or bonus mails?
                $MAIL_MODE = ((getConfig('beg_notify_bonus') > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
index ff07609ab54c7bdf1b1fddb4186b102ef78a116d..6c90799735d03d60dbf20ccbba98c869aeb95f97 100644 (file)
@@ -44,38 +44,38 @@ if ($GLOBALS['output_mode'] == 1) return;
 
 // Create timemark from saved month
 $mark = mktime(0, 0, 0, getConfig('last_month'), date("d", time()), date('Y', time()));
 
 // Create timemark from saved month
 $mark = mktime(0, 0, 0, getConfig('last_month'), date("d", time()), date('Y', time()));
-$SQL = ""; $MODE = "";
+$sql = ""; $MODE = "";
 
 // Shall I sent activation or deactivation mail?
 
 // Shall I sent activation or deactivation mail?
-$SQL = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (bonus_ral_notify ";
+$sql = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (bonus_ral_notify ";
 switch (getConfig('bonus_active'))
 {
 case "Y": // Active rallye is activated
        if (getConfig('bonus_en_notify') == "Y") {
                // Okay, let's check for member accounts
 switch (getConfig('bonus_active'))
 {
 case "Y": // Active rallye is activated
        if (getConfig('bonus_en_notify') == "Y") {
                // Okay, let's check for member accounts
-               $SQL .= "= 0 OR (bonus_ral_notify > 0 AND bonus_ral_en_notify < bonus_ral_di_notify)";
+               $sql .= "= 0 OR (bonus_ral_notify > 0 AND bonus_ral_en_notify < bonus_ral_di_notify)";
                $MODE = "en";
        } else {
                // Do not notify!
                $MODE = "en";
        } else {
                // Do not notify!
-               $SQL = "";
+               $sql = "";
        }
        break;
 
 case "N": // Active rallye is deactivated
        if (getConfig('bonus_di_notify') == "Y") {
                // Okay, let's check for member accounts
        }
        break;
 
 case "N": // Active rallye is deactivated
        if (getConfig('bonus_di_notify') == "Y") {
                // Okay, let's check for member accounts
-               $SQL .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify";
+               $sql .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify";
                $MODE = "di";
        } else {
                // Do not notify!
                $MODE = "di";
        } else {
                // Do not notify!
-               $SQL = "";
+               $sql = "";
        }
        break;
 }
 
        }
        break;
 }
 
-if (!empty($SQL)) {
+if (!empty($sql)) {
        // The SQL command needs to be finisched here (only confirmed accounts!)
        // The SQL command needs to be finisched here (only confirmed accounts!)
-       $SQL .= ") AND `status`='CONFIRMED' ORDER BY last_online ASC";
+       $sql .= ") AND `status`='CONFIRMED' ORDER BY last_online ASC";
 
        // Normal notification mails or bonus mails?
        $MAIL_MODE = ((getConfig('bonus_notify_points') > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
 
        // Normal notification mails or bonus mails?
        $MAIL_MODE = ((getConfig('bonus_notify_points') > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
@@ -88,7 +88,7 @@ if (!empty($SQL)) {
        $RECEIVER = ""; $UIDs = array();
 
        // Check for accounts to be notified
        $RECEIVER = ""; $UIDs = array();
 
        // Check for accounts to be notified
-       $result_main = SQL_QUERY($SQL, __FILE__, __LINE__);
+       $result_main = SQL_QUERY($sql, __FILE__, __LINE__);
        if (SQL_NUMROWS($result_main) > 0) {
                // Okay lets notify all users!
                while (list($uid, $email) = SQL_FETCHROW($result_main)) {
        if (SQL_NUMROWS($result_main) > 0) {
                // Okay lets notify all users!
                while (list($uid, $email) = SQL_FETCHROW($result_main)) {
index 288510d631cd95a701c338fb6a2a3765ebc7ea51..a8f107f87f3c548b99473a2904b79b47df4282a9 100644 (file)
@@ -607,7 +607,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement =
                $DATA_UPDATE = implode(", ", $DATA);
 
                // Generate SQL string
                $DATA_UPDATE = implode(", ", $DATA);
 
                // Generate SQL string
-               $SQL = sprintf("UPDATE `{!_MYSQL_PREFIX!}%s` SET %s WHERE %s LIMIT 1",
+               $sql = sprintf("UPDATE `{!_MYSQL_PREFIX!}%s` SET %s WHERE %s LIMIT 1",
                        $tableName,
                        $DATA_UPDATE,
                        $whereStatement
                        $tableName,
                        $DATA_UPDATE,
                        $whereStatement
@@ -626,7 +626,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement =
                $VALUEs = implode(", ", $VALUEs);
 
                // Generate SQL string
                $VALUEs = implode(", ", $VALUEs);
 
                // Generate SQL string
-               $SQL = sprintf("INSERT INTO {!_MYSQL_PREFIX!}%s (%s) VALUES (%s)",
+               $sql = sprintf("INSERT INTO {!_MYSQL_PREFIX!}%s (%s) VALUES (%s)",
                        $tableName,
                        $KEYs,
                        $VALUEs
                        $tableName,
                        $KEYs,
                        $VALUEs
@@ -637,7 +637,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement =
        SQL_FREERESULT($result);
 
        // Simply run generated SQL string
        SQL_FREERESULT($result);
 
        // Simply run generated SQL string
-       SQL_QUERY($SQL, __FUNCTION__, __LINE__);
+       SQL_QUERY($sql, __FUNCTION__, __LINE__);
 
        // Rebuild cache
        REBUILD_CACHE("config", "config");
 
        // Rebuild cache
        REBUILD_CACHE("config", "config");
@@ -882,7 +882,7 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct
                // "Walk" through all entries
                foreach ($IDs as $id => $sel) {
                        // Construct SQL query
                // "Walk" through all entries
                foreach ($IDs as $id => $sel) {
                        // Construct SQL query
-                       $SQL = sprintf("UPDATE `{!_MYSQL_PREFIX!}_%s` SET",
+                       $sql = sprintf("UPDATE `{!_MYSQL_PREFIX!}_%s` SET",
                                SQL_ESCAPE($table)
                        );
 
                                SQL_ESCAPE($table)
                        );
 
@@ -904,7 +904,7 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct
                                // Does the entry exist?
                                if ((isset($content[$column])) && (isset($statusInfo[$content[$column]]))) {
                                        // Add these entries for update
                                // Does the entry exist?
                                if ((isset($content[$column])) && (isset($statusInfo[$content[$column]]))) {
                                        // Add these entries for update
-                                       $SQL .= sprintf(" %s='%s',", SQL_ESCAPE($column), SQL_ESCAPE($statusInfo[$content[$column]]));
+                                       $sql .= sprintf(" %s='%s',", SQL_ESCAPE($column), SQL_ESCAPE($statusInfo[$content[$column]]));
 
                                        // Remember status
                                        if ($statusColumn == "unknown") {
 
                                        // Remember status
                                        if ($statusColumn == "unknown") {
@@ -926,10 +926,10 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct
                                        // Are there brackets () at the end?
                                        if (substr($entries[$id], -2, 2) == "()") {
                                                // Direct SQL command found
                                        // Are there brackets () at the end?
                                        if (substr($entries[$id], -2, 2) == "()") {
                                                // Direct SQL command found
-                                               $SQL .= sprintf(" %s=%s,", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]));
+                                               $sql .= sprintf(" %s=%s,", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]));
                                        } else {
                                                // Add regular entry
                                        } else {
                                                // Add regular entry
-                                               $SQL .= sprintf(" %s='%s',", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]));
+                                               $sql .= sprintf(" %s='%s',", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]));
 
                                                // Add entry
                                                $content[$key] = $entries[$id];
 
                                                // Add entry
                                                $content[$key] = $entries[$id];
@@ -938,7 +938,7 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct
                        } // END - foreach
 
                        // Finish SQL statement
                        } // END - foreach
 
                        // Finish SQL statement
-                       $SQL = substr($SQL, 0, -1) . sprintf(" WHERE %s=%s AND %s='%s' LIMIT 1",
+                       $sql = substr($sql, 0, -1) . sprintf(" WHERE %s=%s AND %s='%s' LIMIT 1",
                                $idColumn,
                                bigintval($id),
                                $statusColumn,
                                $idColumn,
                                bigintval($id),
                                $statusColumn,
@@ -946,7 +946,7 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct
                        );
 
                        // Run the SQL
                        );
 
                        // Run the SQL
-                       SQL_QUERY($SQL, __FUNCTION__, __LINE__);
+                       SQL_QUERY($sql, __FUNCTION__, __LINE__);
 
                        // Do we have an URL?
                        if (isset($content['url'])) {
 
                        // Do we have an URL?
                        if (isset($content['url'])) {
@@ -967,7 +967,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu
                // Shall we delete here or list for deletion?
                if ($deleteNow) {
                        // The base SQL command:
                // Shall we delete here or list for deletion?
                if ($deleteNow) {
                        // The base SQL command:
-                       $SQL = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s IN (%s)";
+                       $sql = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s IN (%s)";
 
                        // Delete them all
                        $idList = "";
 
                        // Delete them all
                        $idList = "";
@@ -993,7 +993,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu
                        } // END - foreach
 
                        // Run the query
                        } // END - foreach
 
                        // Run the query
-                       SQL_QUERY($SQL, array($table, $idColumn, substr($idList, 0, -1)), __FUNCTION__, __LINE__);
+                       SQL_QUERY($sql, array($table, $idColumn, substr($idList, 0, -1)), __FUNCTION__, __LINE__);
 
                        // Was this fine?
                        if (SQL_AFFECTEDROWS() == count($IDs)) {
 
                        // Was this fine?
                        if (SQL_AFFECTEDROWS() == count($IDs)) {
@@ -1023,7 +1023,7 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc
                                $content = array();
 
                                // Prepare SQL for this row
                                $content = array();
 
                                // Prepare SQL for this row
-                               $SQL = sprintf("UPDATE `{!_MYSQL_PREFIX!}_ SET",
+                               $sql = sprintf("UPDATE `{!_MYSQL_PREFIX!}_ SET",
                                        SQL_ESCAPE($table)
                                );
                                foreach (REQUEST_POST_ARRAY() as $key => $entries) {
                                        SQL_ESCAPE($table)
                                );
                                foreach (REQUEST_POST_ARRAY() as $key => $entries) {
@@ -1045,7 +1045,7 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc
                                                } // END - if
 
                                                // Then add this value
                                                } // END - if
 
                                                // Then add this value
-                                               $SQL .= sprintf(" %s='%s',",
+                                               $sql .= sprintf(" %s='%s',",
                                                        SQL_ESCAPE($key),
                                                        SQL_ESCAPE($entries[$id])
                                                );
                                                        SQL_ESCAPE($key),
                                                        SQL_ESCAPE($entries[$id])
                                                );
@@ -1062,10 +1062,10 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc
                                } // END - foreach
 
                                // Finish SQL command
                                } // END - foreach
 
                                // Finish SQL command
-                               $SQL = substr($SQL, 0, -1) . " WHERE ".$idColumn."=".bigintval($id)." LIMIT 1";
+                               $sql = substr($sql, 0, -1) . " WHERE ".$idColumn."=".bigintval($id)." LIMIT 1";
 
                                // Run this query
 
                                // Run this query
-                               SQL_QUERY($SQL, __FUNCTION__, __LINE__);
+                               SQL_QUERY($sql, __FUNCTION__, __LINE__);
 
                                // Add affected rows
                                $affected += SQL_AFFECTEDROWS();
 
                                // Add affected rows
                                $affected += SQL_AFFECTEDROWS();
index 1095da6e6570f595c87c17576f2c1f60f8f64ce4..730289b0f7ee4a2dbfc7b52b9771bf3b2e8ff76e 100644 (file)
@@ -44,23 +44,23 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 //             0     1        2      3        4          5           6          7      8         9        10
 ADD_DESCR("admin", __FILE__);
 
 //             0     1        2      3        4          5           6          7      8         9        10
-$SQL = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
+$sql = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
  FROM `{!_MYSQL_PREFIX!}_pool`
  WHERE data_type='SEND' OR data_type='DELETED'
  ORDER BY timestamp DESC";
 
 // Check for maximum pages
  FROM `{!_MYSQL_PREFIX!}_pool`
  WHERE data_type='SEND' OR data_type='DELETED'
  ORDER BY timestamp DESC";
 
 // Check for maximum pages
-$result_normal = SQL_QUERY($SQL, __FILE__, __LINE__);
+$result_normal = SQL_QUERY($sql, __FILE__, __LINE__);
 
 // Set offset an current page to default values
 if (!REQUEST_ISSET_GET(('page')))   REQUEST_GET('page')   = "1";
 if (!REQUEST_ISSET_GET(('offset'))) REQUEST_SET_GET('offset', getConfig('mails_page'));
 
 // Add limitation to SQL string
 
 // Set offset an current page to default values
 if (!REQUEST_ISSET_GET(('page')))   REQUEST_GET('page')   = "1";
 if (!REQUEST_ISSET_GET(('offset'))) REQUEST_SET_GET('offset', getConfig('mails_page'));
 
 // Add limitation to SQL string
-$SQL .= " LIMIT ".(REQUEST_GET('offset') * REQUEST_GET('page') - REQUEST_GET('offset')).", ".REQUEST_GET('offset');
+$sql .= " LIMIT ".(REQUEST_GET('offset') * REQUEST_GET('page') - REQUEST_GET('offset')).", ".REQUEST_GET('offset');
 
 // Run SQL query for normal mails
 
 // Run SQL query for normal mails
-$result = SQL_QUERY($SQL, __FILE__, __LINE__);
+$result = SQL_QUERY($sql, __FILE__, __LINE__);
 
 // Calculate pages
 $PAGES = round(SQL_NUMROWS($result_normal) / getConfig('mails_page') + 0.5);
 
 // Calculate pages
 $PAGES = round(SQL_NUMROWS($result_normal) / getConfig('mails_page') + 0.5);
index 40161f3807d8cd5e1879c361cf2280c9fbc10609..e4e566b19a92d49780389f56c80276a4ea91a628 100644 (file)
@@ -52,7 +52,7 @@ ADD_DESCR("admin", __FILE__);
 
 // Normal mails ordered by your members
 //              0     1       2       3       4           5          6          7       8        9          10
 
 // Normal mails ordered by your members
 //              0     1       2       3       4           5          6          7       8        9          10
-$SQL = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
+$sql = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
 FROM `{!_MYSQL_PREFIX!}_pool`
 WHERE data_type IN('ADMIN','TEMP','NEW','ACTIVE')
 ORDER BY timestamp DESC";
 FROM `{!_MYSQL_PREFIX!}_pool`
 WHERE data_type IN('ADMIN','TEMP','NEW','ACTIVE')
 ORDER BY timestamp DESC";
@@ -63,7 +63,7 @@ $SQL2 = "";
 if (REQUEST_ISSET_GET(('mid'))) {
        // Only a specific mail shall be displayed
        //              0     1       2       3       4           5          6          7       8        9          10
 if (REQUEST_ISSET_GET(('mid'))) {
        // Only a specific mail shall be displayed
        //              0     1       2       3       4           5          6          7       8        9          10
-       $SQL = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
+       $sql = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
         FROM `{!_MYSQL_PREFIX!}_pool`
         WHERE id='".bigintval(REQUEST_GET('mid'))."'
         LIMIT 1";
         FROM `{!_MYSQL_PREFIX!}_pool`
         WHERE id='".bigintval(REQUEST_GET('mid'))."'
         LIMIT 1";
@@ -71,7 +71,7 @@ if (REQUEST_ISSET_GET(('mid'))) {
 } elseif (REQUEST_ISSET_GET(('uid'))) {
        // All mails by a specific member shall be displayed
        //              0     1       2       3       4           5          6          7       8        9          10
 } elseif (REQUEST_ISSET_GET(('uid'))) {
        // All mails by a specific member shall be displayed
        //              0     1       2       3       4           5          6          7       8        9          10
-       $SQL = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
+       $sql = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
 FROM `{!_MYSQL_PREFIX!}_pool`
 WHERE sender='".bigintval(REQUEST_GET('uid'))."'
 ORDER by timestamp DESC";
 FROM `{!_MYSQL_PREFIX!}_pool`
 WHERE sender='".bigintval(REQUEST_GET('uid'))."'
 ORDER by timestamp DESC";
@@ -91,7 +91,7 @@ ORDER BY timestamp DESC";
 }
 
 // Check for maximum pages
 }
 
 // Check for maximum pages
-$result_normal = SQL_QUERY($SQL, __FILE__, __LINE__);
+$result_normal = SQL_QUERY($sql, __FILE__, __LINE__);
 
 // Set offset an current page to default values
 if (!REQUEST_ISSET_GET(('page')))   REQUEST_GET('page')   = "1";
 
 // Set offset an current page to default values
 if (!REQUEST_ISSET_GET(('page')))   REQUEST_GET('page')   = "1";
@@ -103,14 +103,14 @@ if (!REQUEST_ISSET_GET(('mid'))) {
        $ADD = " LIMIT ".(bigintval(REQUEST_GET('offset')) * bigintval(REQUEST_GET('page')) - bigintval(REQUEST_GET('offset'))).", ".bigintval(REQUEST_GET('offset'));
 
        // For normal mails
        $ADD = " LIMIT ".(bigintval(REQUEST_GET('offset')) * bigintval(REQUEST_GET('page')) - bigintval(REQUEST_GET('offset'))).", ".bigintval(REQUEST_GET('offset'));
 
        // For normal mails
-       $SQL .= $ADD;
+       $sql .= $ADD;
 
        // For bonus mails
        if (!empty($SQL2)) $SQL2 .= $ADD;
 } // END - if
 
 // Run SQL query for normal mails
 
        // For bonus mails
        if (!empty($SQL2)) $SQL2 .= $ADD;
 } // END - if
 
 // Run SQL query for normal mails
-$result_list = SQL_QUERY($SQL, __FILE__, __LINE__);
+$result_list = SQL_QUERY($sql, __FILE__, __LINE__);
 if ((!empty($SQL2)) && ($WHO == _ALL)) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__);
 
 // Calculate pages
 if ((!empty($SQL2)) && ($WHO == _ALL)) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__);
 
 // Calculate pages
index 98b6f61d1785faa8541c81c7dc32c15cf8861ca3..2eca0754592c72f5338ebac304eef6bbaf3b1726 100644 (file)
@@ -47,17 +47,17 @@ $MSG = "";
 if (REQUEST_ISSET_GET(('rallye')))
 {
        // Activate / deactivate
 if (REQUEST_ISSET_GET(('rallye')))
 {
        // Activate / deactivate
-       $SQL = "";
+       $sql = "";
        if (REQUEST_ISSET_GET(('activate')))
        {
                switch (REQUEST_GET('activate'))
                {
                case "1": // Activate
        if (REQUEST_ISSET_GET(('activate')))
        {
                switch (REQUEST_GET('activate'))
                {
                case "1": // Activate
-                       $SQL = "UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='Y' WHERE id=%s AND is_active='N' LIMIT 1";
+                       $sql = "UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='Y' WHERE id=%s AND is_active='N' LIMIT 1";
                        break;
 
                case "0": // Deactivate
                        break;
 
                case "0": // Deactivate
-                       $SQL = "UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='N' WHERE id=%s AND is_active='Y' LIMIT 1";
+                       $sql = "UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='N' WHERE id=%s AND is_active='Y' LIMIT 1";
                        break;
                }
        }
                        break;
                }
        }
@@ -68,11 +68,11 @@ if (REQUEST_ISSET_GET(('rallye')))
                switch (REQUEST_GET('notify'))
                {
                case "1": // Activate
                switch (REQUEST_GET('notify'))
                {
                case "1": // Activate
-                       $SQL = "UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='Y' WHERE id=%s AND send_notify='N' LIMIT 1";
+                       $sql = "UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='Y' WHERE id=%s AND send_notify='N' LIMIT 1";
                        break;
 
                case "0": // Deactivate
                        break;
 
                case "0": // Deactivate
-                       $SQL = "UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='N' WHERE id=%s AND send_notify='Y' LIMIT 1";
+                       $sql = "UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='N' WHERE id=%s AND send_notify='Y' LIMIT 1";
                        break;
                }
        }
                        break;
                }
        }
@@ -83,19 +83,19 @@ if (REQUEST_ISSET_GET(('rallye')))
                switch (REQUEST_GET('auto'))
                {
                case "1": // Activate
                switch (REQUEST_GET('auto'))
                {
                case "1": // Activate
-                       $SQL = "UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='Y' WHERE id=%s AND auto_add_new_user='N' LIMIT 1";
+                       $sql = "UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='Y' WHERE id=%s AND auto_add_new_user='N' LIMIT 1";
                        break;
 
                case "0": // Deactivate
                        break;
 
                case "0": // Deactivate
-                       $SQL = "UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='N' WHERE id=%s AND auto_add_new_user='Y' LIMIT 1";
+                       $sql = "UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='N' WHERE id=%s AND auto_add_new_user='Y' LIMIT 1";
                        break;
                }
        }
 
        // Run SQL command
                        break;
                }
        }
 
        // Run SQL command
-       if (!empty($SQL))
+       if (!empty($sql))
        {
        {
-               $result = SQL_QUERY_ESC($SQL, array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__);
+               $result = SQL_QUERY_ESC($sql, array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__);
        }
 }
  elseif (REQUEST_ISSET_POST(('remove')))
        }
 }
  elseif (REQUEST_ISSET_POST(('remove')))
index 2e44fc37c9617e5b071d9ef612fabe8307d13524..0c009ba6b8a8435825f9071a1ea0bb61e87319a0 100644 (file)
@@ -51,7 +51,7 @@ if (REQUEST_ISSET_GET(('mid'))) {
        define('__LIST_UNCON_TITLE', getMessage('LIST_UNCONFIRMED_MEMBER_LINKS'));
 
        // SQL query for mail data
        define('__LIST_UNCON_TITLE', getMessage('LIST_UNCONFIRMED_MEMBER_LINKS'));
 
        // SQL query for mail data
-       $SQL = "SELECT DISTINCT s.id, p.sender, p.subject, p.text, p.url, p.timestamp, s.max_rec  FROM `{!_MYSQL_PREFIX!}_pool` AS p
+       $sql = "SELECT DISTINCT s.id, p.sender, p.subject, p.text, p.url, p.timestamp, s.max_rec  FROM `{!_MYSQL_PREFIX!}_pool` AS p
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_stats` AS s
 ON p.id=s.pool_id
 WHERE p.id='".REQUEST_GET('mid')."' LIMIT 1";
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_stats` AS s
 ON p.id=s.pool_id
 WHERE p.id='".REQUEST_GET('mid')."' LIMIT 1";
@@ -66,7 +66,7 @@ WHERE p.id='".REQUEST_GET('mid')."' LIMIT 1";
        define('__LIST_UNCON_TITLE', getMessage('LIST_UNCONFIRMED_BONUS_LINKS'));
 
        // SQL query for mail data (both ids are required for compatiblity to above normal mail
        define('__LIST_UNCON_TITLE', getMessage('LIST_UNCONFIRMED_BONUS_LINKS'));
 
        // SQL query for mail data (both ids are required for compatiblity to above normal mail
-       $SQL = "SELECT id, id, subject, text, url, timestamp, mails_sent FROM `{!_MYSQL_PREFIX!}_bonus` WHERE id='".REQUEST_GET('bid')."' LIMIT 1";
+       $sql = "SELECT id, id, subject, text, url, timestamp, mails_sent FROM `{!_MYSQL_PREFIX!}_bonus` WHERE id='".REQUEST_GET('bid')."' LIMIT 1";
 
        // Column, type and ID for member's mail
        $col = "bonus_id"; $type = "BONUS"; $ID = REQUEST_GET('bid');
 
        // Column, type and ID for member's mail
        $col = "bonus_id"; $type = "BONUS"; $ID = REQUEST_GET('bid');
@@ -81,7 +81,7 @@ WHERE p.id='".REQUEST_GET('mid')."' LIMIT 1";
 // Shall I display links or not?
 if ($listed === true) {
        // Load mail data
 // Shall I display links or not?
 if ($listed === true) {
        // Load mail data
-       $result = SQL_QUERY($SQL, __FILE__, __LINE__);
+       $result = SQL_QUERY($sql, __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Mail order / bonus mail found!
                list($stats_id, $sender, $subj, $text, $url, $stamp, $max) = SQL_FETCHROW($result);
        if (SQL_NUMROWS($result) == 1) {
                // Mail order / bonus mail found!
                list($stats_id, $sender, $subj, $text, $url, $stamp, $max) = SQL_FETCHROW($result);
index 30be6d5f63805748211aaa5acf9161f84c845e85..8605c8c587246c2866c27bf355a59a7a9b84f9cf 100644 (file)
@@ -233,8 +233,8 @@ LIMIT 1",
        } // END = if
 
        // Prepare SQL and run it
        } // END = if
 
        // Prepare SQL and run it
-       $SQL = "SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, status, emails_sent, mails_confirmed, emails_received".$MORE." FROM `{!_MYSQL_PREFIX!}_user_data`".$whereStatement." ORDER BY ".REQUEST_GET(('sortby'));
-       $result_master = SQL_QUERY($SQL, __FILE__, __LINE__);
+       $sql = "SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, status, emails_sent, mails_confirmed, emails_received".$MORE." FROM `{!_MYSQL_PREFIX!}_user_data`".$whereStatement." ORDER BY ".REQUEST_GET(('sortby'));
+       $result_master = SQL_QUERY($sql, __FILE__, __LINE__);
 
        // Calculate page count (0.5 fixes a bug with page count)
        if (getConfig('user_limit') == 0) {
 
        // Calculate page count (0.5 fixes a bug with page count)
        if (getConfig('user_limit') == 0) {
@@ -249,8 +249,8 @@ LIMIT 1",
        if (!REQUEST_ISSET_GET(('offset'))) REQUEST_SET_GET('offset', getConfig('user_limit'));
 
        // Add limitation to SQL string and run him again
        if (!REQUEST_ISSET_GET(('offset'))) REQUEST_SET_GET('offset', getConfig('user_limit'));
 
        // Add limitation to SQL string and run him again
-       $SQL .= " LIMIT ".(REQUEST_GET('offset') * REQUEST_GET('page') - REQUEST_GET('offset')).", ".REQUEST_GET('offset');
-       $result = SQL_QUERY($SQL, __FILE__, __LINE__);
+       $sql .= " LIMIT ".(REQUEST_GET('offset') * REQUEST_GET('page') - REQUEST_GET('offset')).", ".REQUEST_GET('offset');
+       $result = SQL_QUERY($sql, __FILE__, __LINE__);
 
        $result_user = SQL_QUERY("SELECT emails_sent FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED'", __FILE__, __LINE__);
        $user_count = SQL_NUMROWS($result_user);
 
        $result_user = SQL_QUERY("SELECT emails_sent FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED'", __FILE__, __LINE__);
        $user_count = SQL_NUMROWS($result_user);
index adbc2e95ab3d57e8dd4f21b0a41049ecb7703905..d3a8c4f4b8261bfd1ff2382881f58b2ee8c7192c 100644 (file)
@@ -45,7 +45,6 @@ if (((!REQUEST_ISSET_POST(('t_wait'))) || (!REQUEST_ISSET_POST(('payment')))) &&
 }
 
 if (IS_FORM_SENT()) {
 }
 
 if (IS_FORM_SENT()) {
-       $SQL = array();
        switch (REQUEST_GET('do')) {
        case "add":
                ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_payments` (time, payment, mail_title, price) VALUES ('".REQUEST_POST('t_wait')."','".REQUEST_POST('payment')."','".REQUEST_POST('title')."','".REQUEST_POST('price')."')");
        switch (REQUEST_GET('do')) {
        case "add":
                ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_payments` (time, payment, mail_title, price) VALUES ('".REQUEST_POST('t_wait')."','".REQUEST_POST('payment')."','".REQUEST_POST('title')."','".REQUEST_POST('price')."')");
index f17446b43ee3ef30b7ddc35bca7a33f35f64d3b1..229a8beadf8aeef470ce83a04fb2c42a70287b07 100644 (file)
@@ -54,7 +54,7 @@ if (REQUEST_ISSET_POST(('sel'))) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
 if (IS_FORM_SENT()) {
        // Fix older calls from add-new-banner-form
        if (!REQUEST_ISSET_GET(('mode'))) REQUEST_SET_GET('mode', "add");
 if (IS_FORM_SENT()) {
        // Fix older calls from add-new-banner-form
        if (!REQUEST_ISSET_GET(('mode'))) REQUEST_SET_GET('mode', "add");
-       $SQL = "";
+       $sql = "";
        switch (REQUEST_GET('mode'))
        {
        case "add":
        switch (REQUEST_GET('mode'))
        {
        case "add":
index 30aa9d12e2a19179d3268d66be0b663aed2887e1..676e3156dbed67aa6081a27a74a58ee8bb8e8315 100644 (file)
@@ -49,26 +49,26 @@ if (REQUEST_ISSET_POST(('sel'))) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
 if ($SEL > 0) {
        $OUT = "";
        foreach (REQUEST_POST('sel') as $id => $sel) {
 if ($SEL > 0) {
        $OUT = "";
        foreach (REQUEST_POST('sel') as $id => $sel) {
-               $SQL = "";
+               $sql = "";
                // Shall I de-/activate or delete themes?
                if (REQUEST_ISSET_POST(('status'))) {
                        // Change status
                        if (REQUEST_POST('active', $id) == "Y") {
                // Shall I de-/activate or delete themes?
                if (REQUEST_ISSET_POST(('status'))) {
                        // Change status
                        if (REQUEST_POST('active', $id) == "Y") {
-                               $SQL = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='N' WHERE id='".$id."' LIMIT 1";
+                               $sql = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='N' WHERE id='".$id."' LIMIT 1";
                        } else {
                        } else {
-                               $SQL = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='Y' WHERE id='".$id."' LIMIT 1";
+                               $sql = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='Y' WHERE id='".$id."' LIMIT 1";
                        }
                        $OUT = getMessage('ADMIN_THEMES_UPDATED');
                } elseif (REQUEST_ISSET_POST(('del'))) {
                        // Delete themes
                        }
                        $OUT = getMessage('ADMIN_THEMES_UPDATED');
                } elseif (REQUEST_ISSET_POST(('del'))) {
                        // Delete themes
-                       $SQL = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_themes` WHERE id='".$id."' LIMIT 1";
+                       $sql = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_themes` WHERE id='".$id."' LIMIT 1";
                        $OUT = getMessage('ADMIN_THEMES_DELETED');
                }
 
                // Run SQL command?
                        $OUT = getMessage('ADMIN_THEMES_DELETED');
                }
 
                // Run SQL command?
-               if (!empty($SQL)) {
+               if (!empty($sql)) {
                        // Run it
                        // Run it
-                       $result = SQL_QUERY($SQL, __FILE__, __LINE__);
+                       $result = SQL_QUERY($sql, __FILE__, __LINE__);
 
                        // Rebuild cache
                        REBUILD_CACHE("themes", "them");
 
                        // Rebuild cache
                        REBUILD_CACHE("themes", "them");
index 34eb22df63300a0812a1e48e9b471ae3d347c1b6..aba730d1df36b0559a03ff285e1c7547f15e956a 100644 (file)
@@ -298,14 +298,14 @@ case "list_out": // List only outgoing transactions
        switch ($MODE)
        {
        case "list_in":
        switch ($MODE)
        {
        case "list_in":
-               $SQL = "SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
+               $sql = "SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
                $NOTHING = TRANSFER_NO_INCOMING_TRANSFERS;
                define('__TRANSFER_SUM', TRANSFER_TOTAL_INCOMING);
                define('__TRANSFER_TITLE', TRANSFER_LIST_INCOMING);
                break;
 
        case "list_out":
                $NOTHING = TRANSFER_NO_INCOMING_TRANSFERS;
                define('__TRANSFER_SUM', TRANSFER_TOTAL_INCOMING);
                define('__TRANSFER_TITLE', TRANSFER_LIST_INCOMING);
                break;
 
        case "list_out":
-               $SQL = "SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
+               $sql = "SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
                $NOTHING = TRANSFER_NO_OUTGOING_TRANSFERS;
                define('__TRANSFER_SUM', TRANSFER_TOTAL_OUTGOING);
                define('__TRANSFER_TITLE', TRANSFER_LIST_OUTGOING);
                $NOTHING = TRANSFER_NO_OUTGOING_TRANSFERS;
                define('__TRANSFER_SUM', TRANSFER_TOTAL_OUTGOING);
                define('__TRANSFER_TITLE', TRANSFER_LIST_OUTGOING);
@@ -314,7 +314,7 @@ case "list_out": // List only outgoing transactions
 
        // Run the SQL command
        $total = 0;
 
        // Run the SQL command
        $total = 0;
-       $result = SQL_QUERY_ESC($SQL, array($GLOBALS['userid']), __FILE__, __LINE__);
+       $result = SQL_QUERY_ESC($sql, array($GLOBALS['userid']), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                $OUT = ""; $SW = 2;
                while (list($tid, $uid, $points, $reason, $stamp) = SQL_FETCHROW($result)) {
        if (SQL_NUMROWS($result) > 0) {
                $OUT = ""; $SW = 2;
                while (list($tid, $uid, $points, $reason, $stamp) = SQL_FETCHROW($result)) {
index deded196d36932de955e0bad37d461575101f83e..3a85acbd8176483252f528cddf46f48715c74e21 100644 (file)
@@ -680,20 +680,20 @@ function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) {
        //* DEBUG: */ echo __LINE__.":".$MODE."/".$act."/".$wht."*<br />\n";
        if (($MODE != "admin") && ($UPDATE === true)) {
                // Update guest or member menu
        //* DEBUG: */ echo __LINE__.":".$MODE."/".$act."/".$wht."*<br />\n";
        if (($MODE != "admin") && ($UPDATE === true)) {
                // Update guest or member menu
-               $SQL = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s_menu` SET counter=counter+1 WHERE `action`='%s' AND `what`='%s'".$ADD." LIMIT 1",
+               $sql = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s_menu` SET counter=counter+1 WHERE `action`='%s' AND `what`='%s'".$ADD." LIMIT 1",
                        array($MODE, $act, $wht), __FUNCTION__, __LINE__, false);
        } elseif (($wht != "overview") && (!empty($wht))) {
                // Other actions
                        array($MODE, $act, $wht), __FUNCTION__, __LINE__, false);
        } elseif (($wht != "overview") && (!empty($wht))) {
                // Other actions
-               $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what`='%s'".$ADD." ORDER BY action DESC LIMIT 1",
+               $sql = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what`='%s'".$ADD." ORDER BY action DESC LIMIT 1",
                        array($MODE, $act, $wht), __FUNCTION__, __LINE__, false);
        } else {
                // Admin login overview
                        array($MODE, $act, $wht), __FUNCTION__, __LINE__, false);
        } else {
                // Admin login overview
-               $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND (what='' OR `what` IS NULL)".$ADD." ORDER BY action DESC LIMIT 1",
+               $sql = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND (what='' OR `what` IS NULL)".$ADD." ORDER BY action DESC LIMIT 1",
                        array($MODE, $act), __FUNCTION__, __LINE__, false);
        }
 
        // Run SQL command
                        array($MODE, $act), __FUNCTION__, __LINE__, false);
        }
 
        // Run SQL command
-       $result = SQL_QUERY($SQL, __FUNCTION__, __LINE__);
+       $result = SQL_QUERY($sql, __FUNCTION__, __LINE__);
        if ($UPDATE === true) {
                // Check updated/affected rows
                $ret = (SQL_AFFECTEDROWS() == 1);
        if ($UPDATE === true) {
                // Check updated/affected rows
                $ret = (SQL_AFFECTEDROWS() == 1);