Fix in CREATE_EXTENSION_DEACTIVATION_TASK() and coding-style updated
authorRoland Häder <roland@mxchange.org>
Fri, 19 Dec 2008 20:30:50 +0000 (20:30 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 19 Dec 2008 20:30:50 +0000 (20:30 +0000)
101 files changed:
beg.php
birthday_confirm.php
click.php
doubler.php
inc/autopurge/purge-general.php
inc/autopurge/purge-inact.php
inc/autopurge/purge-mails.php
inc/autopurge/purge-tsks.php
inc/databases.php
inc/doubler_send.php
inc/extensions.php
inc/extensions/ext-rewrite.php
inc/filters.php
inc/functions.php
inc/gen_sql_patches.php
inc/libs/admins_functions.php
inc/libs/autopurge_functions.php
inc/libs/bonus_functions.php
inc/libs/holiday_functions.php
inc/libs/mediadata_functions.php
inc/libs/online_functions.php
inc/libs/rallye_functions.php
inc/libs/refback_functions.php
inc/libs/sponsor_functions.php
inc/libs/wernis_functions.php
inc/libs/yoomedia_functions.php
inc/mails/beg_mails.php
inc/mails/birthday_mails.php
inc/mails/bonus_mails.php
inc/modules/admin/admin-inc.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-add_rallye.php
inc/modules/admin/what-admin_add.php
inc/modules/admin/what-adminedit.php
inc/modules/admin/what-admins_mails.php
inc/modules/admin/what-config_admins.php
inc/modules/admin/what-config_cats.php
inc/modules/admin/what-config_email.php
inc/modules/admin/what-config_mods.php
inc/modules/admin/what-config_payouts.php
inc/modules/admin/what-config_points.php
inc/modules/admin/what-config_rallye_prices.php
inc/modules/admin/what-config_register.php
inc/modules/admin/what-del_email.php
inc/modules/admin/what-del_holiday.php
inc/modules/admin/what-del_sponsor.php
inc/modules/admin/what-del_transfer.php
inc/modules/admin/what-edit_emails.php
inc/modules/admin/what-edit_sponsor.php
inc/modules/admin/what-edit_user.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-guest_add.php
inc/modules/admin/what-guestedit.php
inc/modules/admin/what-list_country.php
inc/modules/admin/what-list_links.php
inc/modules/admin/what-list_newsletter.php
inc/modules/admin/what-list_payouts.php
inc/modules/admin/what-list_rallyes.php
inc/modules/admin/what-list_sponsor_pay.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-lock_sponsor.php
inc/modules/admin/what-lock_user.php
inc/modules/admin/what-mem_add.php
inc/modules/admin/what-memedit.php
inc/modules/admin/what-refbanner.php
inc/modules/admin/what-repair_amenu.php
inc/modules/admin/what-repair_cats.php
inc/modules/admin/what-repair_gmenu.php
inc/modules/admin/what-repair_mmenu.php
inc/modules/admin/what-theme_import.php
inc/modules/admin/what-unlock_emails.php
inc/modules/admin/what-unlock_sponsor.php
inc/modules/chk_login.php
inc/modules/guest/what-confirm.php
inc/modules/guest/what-login.php
inc/modules/guest/what-register.php
inc/modules/guest/what-sponsor_login.php
inc/modules/member/what-holiday.php
inc/modules/member/what-html_mail.php
inc/modules/member/what-mydata.php
inc/modules/member/what-newsletter.php
inc/modules/member/what-nickname.php
inc/modules/member/what-order.php
inc/modules/member/what-payout.php
inc/modules/member/what-primera.php
inc/modules/member/what-support.php
inc/modules/member/what-themes.php
inc/modules/member/what-transfer.php
inc/modules/member/what-wernis.php
inc/modules/order.php
inc/monthly/monthly_newsletter.php
inc/mysql-manager.php
inc/pool/pool-bonus.php
inc/pool/pool-user.php
inc/profile-updte.php
inc/reset/reset_daily.php
inc/reset/reset_holiday.php
inc/stats_bonus.php
mailid_top.php
ref.php
view.php

diff --git a/beg.php b/beg.php
index cd4b2f6..531e8db 100644 (file)
--- a/beg.php
+++ b/beg.php
@@ -121,7 +121,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                // User id valid and not webmaster's id?
                if (($uid > 0) && (getConfig('beg_uid') != $uid)) {
                        // Update counter
-                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET beg_clicks=beg_clicks+1 WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET beg_clicks=beg_clicks+1 WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
                                array($uid), __FILE__, __LINE__);
 
                        // Check for last entry for userid w/o IP number
index 69530f9..1c71ee6 100644 (file)
@@ -83,7 +83,7 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1",
                        ADD_POINTS_REFSYSTEM("birthday_confirm", $uid, $data['points'], false, "0", $locked, strtolower(getConfig('birthday_mode')));
 
                        // Remove entry from table
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_birthday WHERE userid=%s AND chk_value='%s' LIMIT 1",
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_birthday WHERE userid=%s AND chk_value='%s' LIMIT 1",
                                array($uid, $chk), __FILE__, __LINE__);
 
                        // Update mediadata if version is 0.0.4 or newer
index 515a958..f5dbe4b 100644 (file)
--- a/click.php
+++ b/click.php
@@ -47,7 +47,7 @@ require("inc/config.php");
 if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['banner']))) {
        // Update clicks counter...
        $CLICK = 1;
-       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET clicks=clicks+1 WHERE id=%s LIMIT 1", array(bigintval($_GET['banner'])), __FILE__, __LINE__);
+       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET clicks=clicks+1 WHERE id=%s LIMIT 1", array(bigintval($_GET['banner'])), __FILE__, __LINE__);
        if (SQL_AFFECTEDROWS() == 1) {
                if (!empty($_GET['user'])) {
                        LOAD_URL("ref.php?refid=".bigintval($_GET['user']));
index 060102a..333467c 100644 (file)
@@ -137,7 +137,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                {
                                        // Enough points are left so let's continue with the doubling process
                                        // Create doubling "account" width *DOUBLED* points
-                                       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".GET_REMOTE_ADDR()."', UNIX_TIMESTAMP(), 'N','N')",
+                                       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".GET_REMOTE_ADDR()."', UNIX_TIMESTAMP(), 'N','N')",
                                                array($uid, bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2)), __FILE__, __LINE__);
 
                                        // Subtract entered points
@@ -151,7 +151,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                        // Add second line for the referal but only when uid != refid
                                        if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) {
                                                // Okay add a refid line and apply refid percents
-                                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid,refid,points,remote_ip,timemark,completed,is_ref) VALUES ('%s',0,'%s','".GET_REMOTE_ADDR()."',UNIX_TIMESTAMP(),'N','Y')",
+                                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid,refid,points,remote_ip,timemark,completed,is_ref) VALUES ('%s',0,'%s','".GET_REMOTE_ADDR()."',UNIX_TIMESTAMP(),'N','Y')",
                                                        array(bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2 * getConfig('doubler_ref'))), __FILE__, __LINE__);
 
                                                // And that's why we dont't want to you more than one referal level of doubler-points. ^^^
index 6b5e36b..a24b4c7 100644 (file)
@@ -84,12 +84,12 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid",
                                $uid = $sender; $points += $price; $admin_points += $price;
 
                                // Remove confirmation links from queue
-                               $result_del = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%s",
-                                array(bigintval($mid)), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%s",
+                                       array(bigintval($mid)), __FILE__, __LINE__);
 
                                // Update status of order
-                               $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='DELETED' WHERE id=%s LIMIT 1",
-                                array(bigintval($pool)), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='DELETED' WHERE id=%s LIMIT 1",
+                                       array(bigintval($pool)), __FILE__, __LINE__);
                        } // END - if
                } // END - while
 
@@ -104,14 +104,14 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid",
        if (EXT_IS_ACTIVE("bonus", true)) {
                // Check for bonus campaigns
                $result = SQL_QUERY_ESC("SELECT id, points FROM "._MYSQL_PREFIX."_bonus WHERE data_type='SEND' AND timestamp <= %s ORDER BY id",
-                array(bigintval($PURGE)), __FILE__, __LINE__);
+                       array(bigintval($PURGE)), __FILE__, __LINE__);
                if (SQL_NUMROWS($result) > 0) {
                        // Start deleting procedure
                        $points = 0;
                        while (list($bid, $price) = SQL_FETCHROW($result)) {
                                // Check if confirmation links are purged or not
                                $result_links = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s",
-                                array(bigintval($bid)), __FILE__, __LINE__);
+                                       array(bigintval($bid)), __FILE__, __LINE__);
                                if (SQL_NUMROWS($result_links) > 0) {
                                        // At least one link was found, enougth to pay back the points
                                        $points += $price * SQL_NUMROWS($result_links);
@@ -120,12 +120,12 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid",
                                        SQL_FREERESULT($result_links);
 
                                        // Remove confirmation links from queue
-                                       $result_del = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s",
-                                        array(bigintval($bid)), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s",
+                                               array(bigintval($bid)), __FILE__, __LINE__);
 
                                        // Update status of order
-                                       $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='DELETED' WHERE id=%s LIMIT 1",
-                                        array(bigintval($bid)), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='DELETED' WHERE id=%s LIMIT 1",
+                                               array(bigintval($bid)), __FILE__, __LINE__);
                                } // END - if
                        } // END - while
 
index 33aaa9a..679bd90 100644 (file)
@@ -91,8 +91,8 @@ ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__);
                        SEND_EMAIL($email, AUTOPURGE_MEMBER_INACTIVE_SUBJECT, $msg);
 
                        // Update this account
-                       $result_update = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET ap_notified=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
-                        array(bigintval($uid)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET ap_notified=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
+                               array(bigintval($uid)), __FILE__, __LINE__);
                } // END - while
 
                // Remove last comma
index 89f4dd7..c523c80 100644 (file)
@@ -65,7 +65,7 @@ ORDER BY sender ASC",
                                array(bigintval($sender)), __FILE__, __LINE__));
                        if ($found == 0) {
                                // Okay we found some mails!
-                               $result_remove = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_pool WHERE sender=%s",
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_pool WHERE sender=%s",
                                        array(bigintval($sender)), __FILE__, __LINE__);
                                $DELETED += SQL_AFFECTEDROWS();
 
@@ -99,7 +99,7 @@ ORDER BY sender ASC",
                        $found = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", array(bigintval($sender)), __FILE__, __LINE__));
                        if ($found == 0) {
                                // Okay we found some mails!
-                               $result_remove = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_stats WHERE sender=%s", array(bigintval($sender)), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_stats WHERE sender=%s", array(bigintval($sender)), __FILE__, __LINE__);
                                $DELETED += SQL_AFFECTEDROWS();
 
                                // Reset query (to prevent possible errors) ...
index 96124da..ed61827 100644 (file)
@@ -49,10 +49,10 @@ if ((GET_EXT_VERSION("task") > "0.0") && (getConfig('ap_tasks') == "Y")) {
        $since = bigintval(getConfig('ap_tasks_time'));
 
        // Purge deleted tasks (no notification to admin)
-       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY
+       SQL_QUERY_ESC("DELETE LOW_PRIORITY
 FROM "._MYSQL_PREFIX."_task_system
 WHERE status='DELETED' AND task_created <= (UNIX_TIMESTAMP() - %s)",
-        array($since), __FILE__, __LINE__);
+               array($since), __FILE__, __LINE__);
        $DELETED = SQL_AFFECTEDROWS();
 
        if (($DELETED > 0) && (getConfig('ap_tasks_notify') == "Y")) {
index 90e902e..a1226d4 100644 (file)
@@ -115,7 +115,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // Current SVN revision
-define('CURR_SVN_REVISION', "681");
+define('CURR_SVN_REVISION', "682");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index f5a671d..d584f47 100644 (file)
@@ -89,7 +89,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y"))
                        if (($ref > 0) && ($DOUBLER_UID == $uid) && (!empty($ref))) {
                                // Referal points found so add them and set line(s) to completed='Y'
                                $points += $ref;
-                               $result_ref = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_doubler SET completed='Y' WHERE refid=%s AND completed='N' AND is_ref='Y'",
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_doubler SET completed='Y' WHERE refid=%s AND completed='N' AND is_ref='Y'",
                                        array(bigintval($uid)), __FILE__, __LINE__);
                        } else {
                                // No referal points found
@@ -103,7 +103,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y"))
                        } // END - if
 
                        // Set entry as "payed"
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_doubler SET completed='Y' WHERE id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_doubler SET completed='Y' WHERE id=%s LIMIT 1",
                                array(bigintval($id)), __FILE__, __LINE__);
 
                        $OK = false;
index 1439e97..0e49343 100644 (file)
@@ -228,7 +228,7 @@ function EXTENSION_REGISTER ($ext_name, $task_id, $dry_run = false, $logout = tr
                                RUN_FILTER('pre_extension_installed', array('dry_run' => $dry_run, 'sqls' => $SQLs));
 
                                // Register extension
-                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_extensions (ext_name, ext_active, ext_version) VALUES ('%s','%s','%s')",
+                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_extensions (ext_name, ext_active, ext_version) VALUES ('%s','%s','%s')",
                                        array($ext_name, $EXT_ALWAYS_ACTIVE, $EXT_VERSION), __FILE__, __LINE__);
 
                                // Remove cache file(s) if extension is active
@@ -255,7 +255,7 @@ function EXTENSION_REGISTER ($ext_name, $task_id, $dry_run = false, $logout = tr
                }
        } elseif (($task_id > 0) && (!empty($ext_name))) {
                // Remove task from system when id and extension's name is valid
-               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%s AND status='NEW' LIMIT 1",
+               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%s AND status='NEW' LIMIT 1",
                        array(bigintval($task_id)), __FILE__, __LINE__);
        }
 
@@ -307,7 +307,7 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) {
                // Removal mode?
                if ($load_mode == "remove") {
                        // Delete this extension (remember to remove it from your server *before* you click on welcome!
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
                                array($ext_name), __FILE__, __LINE__);
                } // END - if
        } // END - if
@@ -499,7 +499,7 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) {
                        CREATE_EXTENSION_UPDATE_TASK(GET_CURRENT_ADMIN_ID(), $ext_name, $cacheArray['update_ver'][$ext_name], addslashes($NOTES));
 
                        // Update extension's version
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_version='%s' WHERE ext_name='%s' LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_version='%s' WHERE ext_name='%s' LIMIT 1",
                                array($cacheArray['update_ver'][$ext_name], $ext_name), __FILE__, __LINE__);
 
                        // Remove arrays
@@ -624,7 +624,7 @@ function GET_EXT_ID ($ext_name) {
 // Activate given extension
 function ACTIVATE_EXTENSION ($ext_name) {
        // Activate the extension
-       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='Y' WHERE ext_name='%s' LIMIT 1",
+       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='Y' WHERE ext_name='%s' LIMIT 1",
                array($ext_name), __FILE__, __LINE__);
 
        // Extension has been activated?
@@ -637,7 +637,7 @@ function ACTIVATE_EXTENSION ($ext_name) {
 // Deactivate given extension
 function DEACTIVATE_EXTENSION($ext_name) {
        // Activate the extension
-       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='N' WHERE ext_name='%s' LIMIT 1",
+       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='N' WHERE ext_name='%s' LIMIT 1",
                array($ext_name), __FILE__, __LINE__);
 
        // Extension has been activated?
@@ -703,7 +703,7 @@ function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) {
                }
 
                // Task not created so it's a brand-new extension which we need to register and create a task for!
-               $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created)
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created)
 VALUES (%s,0,'NEW','EXTENSION','%s','%s',UNIX_TIMESTAMP())",
                        array(
                                $admin_id,
@@ -722,7 +722,7 @@ function CREATE_EXTENSION_DEACTIVATION_TASK ($ext) {
        // Not installed and do we have created a task for the admin?
        if ((DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) && (GET_EXT_VERSION($ext) != "")) {
                // Task not created so add it
-               $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created)
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created)
 VALUES (0,0,'NEW','EXTENSION_DEACTIVATION','%s','%s',UNIX_TIMESTAMP())",
                        array(
                                $subject,
@@ -730,9 +730,6 @@ VALUES (0,0,'NEW','EXTENSION_DEACTIVATION','%s','%s',UNIX_TIMESTAMP())",
                        ),  __FILE__, __LINE__, true, false
                );
        } // END - if
-
-       // Free memory
-       SQL_FREERESULT($result);
 }
 
 // Checks if the module has a menu
index e3b6c75..4cb2b00 100644 (file)
@@ -67,7 +67,7 @@ case "remove": // Do stuff when removing extension
 case "activate": // Do stuff when admin activates this extension
        // Check if mod_rewrite is loadeded
        if (!IF_APACHE_MODULE_LOADED('mod_rewrite')) {
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='N' WHERE ext_name='rewrite' LIMIT 1", array(), __FILE__, __LINE__);
+               SQL_QUERY("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='N' WHERE ext_name='rewrite' LIMIT 1", __FILE__, __LINE__);
                $EXT_REPORTS_FAILURE = true;
                ADD_FATAL(MOD_REWRITE_ERROR);
         } // END - if
@@ -162,7 +162,7 @@ default: // Do stuff when extension is loaded
        // Check if mod_rewrite is loadeded
        if (!IF_APACHE_MODULE_LOADED('mod_rewrite')){
                $EXT_REPORTS_FAILURE = true;
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='N' WHERE ext_name='rewrite' LIMIT 1", array(), __FILE__, __LINE__);
+               SQL_QUERY("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='N' WHERE ext_name='rewrite' LIMIT 1", __FILE__, __LINE__);
                if (!IS_ADMIN())ADD_FATAL(MOD_REWRITE_ERROR);
         } // END - if
        break;
index 1355975..8ebe34f 100644 (file)
@@ -477,7 +477,7 @@ function FILTER_UPDATE_LOGIN_DATA () {
                        } // END - if
 
                        // Update last module / online time
-                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET last_module='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET last_module='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1",
                                array($GLOBALS['what'], GET_REMOTE_ADDR(), $GLOBALS['userid']), __FILE__, __LINE__);
                }
        }  else {
index 7a70b79..4d4d5a2 100644 (file)
@@ -1596,11 +1596,11 @@ function SEND_ADMIN_EMAILS_PRO($subj, $template, $content, $UID) {
 
        // Check which admin shall receive this mail
        $result = SQL_QUERY_ESC("SELECT DISTINCT admin_id FROM "._MYSQL_PREFIX."_admins_mails WHERE mail_template='%s' ORDER BY admin_id",
-        array($template), __FILE__, __LINE__);
+               array($template), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Create new entry (to all admins)
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins_mails (admin_id, mail_template) VALUES (0, '%s')",
-                array($template), __FILE__, __LINE__);
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins_mails (admin_id, mail_template) VALUES (0, '%s')",
+                       array($template), __FILE__, __LINE__);
        } else {
                // Load admin IDs...
                $aids = array();
index c6d3a53..732d434 100644 (file)
@@ -46,7 +46,7 @@ if (getConfig('pass_scramble') == "") {
        $scrambleString = genScrambleString(40);
 
        // ... and store it there for future usage
-       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_config` SET pass_scramble='%s' WHERE config=0 LIMIT 1",
+       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_config` SET pass_scramble='%s' WHERE config=0 LIMIT 1",
                array($scrambleString), __FILE__, __LINE__);
 
        // Also remember it in config
@@ -61,7 +61,7 @@ if (getConfig('master_salt') == "") {
        $masterSalt = scrambleString(substr(sha1(GEN_PASS(mt_rand(128, 256))), 0, -40));
 
        // ... and store it there for future usage
-       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_config` SET master_salt='%s' WHERE config=0 LIMIT 1",
+       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_config` SET master_salt='%s' WHERE config=0 LIMIT 1",
                array($masterSalt), __FILE__, __LINE__);
 
        // Also remember it in config
@@ -96,7 +96,7 @@ if (getConfig('file_hash') == "") {
                //* DEBUG: */ die("Secret-Key: ".$secretKey."<br>Cookie: ".get_session('u_hash')."<br>Test: ".$test);
 
                // Write $file_hash to database
-               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_config` SET file_hash='%s' WHERE config=0 LIMIT 1",
+               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_config` SET file_hash='%s' WHERE config=0 LIMIT 1",
                        array($file_hash), __FILE__, __LINE__);
 
                // Is the .htaccess file there?
index 05e1214..b792bbb 100644 (file)
@@ -209,7 +209,7 @@ function ADMINS_CHANGE_ADMIN_ACCOUNT($POST) {
                        // Update admin account
                        if ($default == "allow") {
                                // Allow changing default ACL
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET
 login='%s'".$ADD.",
 email='%s',
 default_acl='%s',
@@ -224,7 +224,7 @@ WHERE id=%s LIMIT 1",
 ), __FILE__, __LINE__);
                        } else {
                                // Do not allow it here
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET
 login='%s'".$ADD.",
 email='%s',
 la_mode='%s'
@@ -351,12 +351,12 @@ function ADMINS_REMOVE_ADMIN_ACCOUNTS ($POST) {
                // Delete only when it's not your own account!
                if (($del == 1) && (GET_CURRENT_ADMIN_ID() != $id)) {
                        // Rewrite his tasks to all admins
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin=0 WHERE assigned_admin=%s",
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin=0 WHERE assigned_admin=%s",
                         array($id), __FILE__, __LINE__);
 
                        // Remove account
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1",
-                        array($id), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins WHERE id=%s LIMIT 1",
+                               array($id), __FILE__, __LINE__);
 
                        // Purge cache
                        CACHE_PURGE_ADMIN_MENU($id);
index 249a4e7..f557eac 100644 (file)
@@ -37,41 +37,36 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
-function AUTOPURGE_ADD_POINTS($uid, $points)
-{
+function AUTOPURGE_ADD_POINTS($uid, $points) {
        global $jackpot;
+
        // Check if he has locked points or not
        $result = SQL_QUERY_ESC("SELECT ref_payout FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
-        array(bigintval($uid)), __FILE__, __LINE__);
+               array(bigintval($uid)), __FILE__, __LINE__);
        list($payout) = SQL_FETCHROW($result);
        SQL_FREERESULT($result);
-       if (($payout > 0) && (!empty($payout)))
-       {
+
+       if (($payout > 0) && (!empty($payout))) {
                // Yes, he has.
                $target = "locked_points";
-       }
-        elseif ($payout == "0")
-       {
+       } elseif ($payout == "0") {
                // No, he has not
                $target = "points";
        }
+
        // Add points...
-       if (empty($payout))
-       {
+       if (empty($payout)) {
                // ... to jackpot account
                ADD_JACKPOT($points);
                if (empty($jackpot)) $jackpot = 0;
                $jackpot += $points;
-       }
-        else
-       {
+       } else {
                // .. to user's account
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET %s=%s+%s WHERE userid=%s AND ref_depth=0 LIMIT 1",
-                array($target, $target, $points, bigintval($uid)), __FILE__, __LINE__);
+               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET %s=%s+%s WHERE userid=%s AND ref_depth=0 LIMIT 1",
+                       array($target, $target, $points, bigintval($uid)), __FILE__, __LINE__);
 
                // Update mediadata as well
-               if ((GET_EXT_VERSION("mediadata") >= "0.0.4") && ($target == "points"))
-               {
+               if ((GET_EXT_VERSION("mediadata") >= "0.0.4") && ($target == "points")) {
                        // Update database
                        MEDIA_UPDATE_ENTRY(array("total_points"), "add", $points);
                }
index 4e1ba34..b137dc6 100644 (file)
@@ -101,11 +101,11 @@ function BONUS_ADD_TURBO_POINTS($mid, $uid, $type) {
        }
 
        // Add points to his account directly
-       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET turbo_bonus=turbo_bonus+".$points." WHERE userid=%s LIMIT 1",
+       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET turbo_bonus=turbo_bonus+".$points." WHERE userid=%s LIMIT 1",
                array(bigintval($uid)), __FILE__, __LINE__);
 
        // Rember this whole data for displaying ranking list
-       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus_turbo (userid, mail_id, bonus_id, level, points, timemark) VALUES ('%s', '%s', '%s', '%s', '%s', UNIX_TIMESTAMP())",
+       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus_turbo (userid, mail_id, bonus_id, level, points, timemark) VALUES ('%s', '%s', '%s', '%s', '%s', UNIX_TIMESTAMP())",
                array(bigintval($uid), bigintval($mail), bigintval($bonus), $rank, $points), __FILE__, __LINE__);
 
        if ((GET_EXT_VERSION("bonus") >= "0.3.5") && (getConfig('bonus_mode') != "ADD") && ($points > 0)) BONUS_POINTS_HANDLER($points);
index 61ce6ab..a63d334 100644 (file)
@@ -38,25 +38,22 @@ if (!defined('__SECURITY')) {
 }
 
 //
-function HOLIDAY_STOP_HOLIDAYS()
-{
+function HOLIDAY_STOP_HOLIDAYS () {
        // Let's find some expired holiday requests...
        $result_stop = SQL_QUERY("SELECT userid, holiday_start, holiday_end, comments
 FROM "._MYSQL_PREFIX."_user_holidays
 WHERE holiday_end <= UNIX_TIMESTAMP()
 ORDER BY userid", __FILE__, __LINE__);
-       if (SQL_NUMROWS($result_stop) > 0)
-       {
+       if (SQL_NUMROWS($result_stop) > 0) {
                // We foud at least one
                $admin = "";
-               while (list($uid, $start, $end, $comments) = SQL_FETCHROW($result_stop))
-               {
+               while (list($uid, $start, $end, $comments) = SQL_FETCHROW($result_stop)) {
                        // Stop holiday
-                       $result_del = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays WHERE userid=%s LIMIT 1",
-                        array(bigintval($uid)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays WHERE userid=%s LIMIT 1",
+                               array(bigintval($uid)), __FILE__, __LINE__);
 
                        // Unlock account
-                       $result_del = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
 SET holiday_active='N', holiday_activated='0'
 WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
 
index f367203..9d89121 100644 (file)
@@ -51,8 +51,8 @@ WHERE media_key = '%s' LIMIT 1", array($key), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result_media) == 0)
                        {
                                // Not found so we create it (mode will be ignored here!)
-                               $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_mediadata (media_key, media_value)
-VALUES ('%s', '%s')", array($key, $value), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_mediadata (media_key, media_value) VALUES ('%s', '%s')",
+                                       array($key, $value), __FILE__, __LINE__);
                        }
                         else
                        {
@@ -65,14 +65,14 @@ VALUES ('%s', '%s')", array($key, $value), __FILE__, __LINE__);
                                if ($mode == "init")
                                {
                                        // Initialize entry
-                                       $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mediadata SET media_value=%s WHERE media_key='%s' LIMIT 1",
-                                        array($value, $key), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mediadata SET media_value=%s WHERE media_key='%s' LIMIT 1",
+                                               array($value, $key), __FILE__, __LINE__);
                                }
                                 else
                                {
                                        // Update entry
-                                       $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mediadata SET media_value=media_value".$mode."%s WHERE media_key='%s' LIMIT 1",
-                                        array($value, $key), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mediadata SET media_value=media_value".$mode."%s WHERE media_key='%s' LIMIT 1",
+                                               array($value, $key), __FILE__, __LINE__);
                                }
                        }
                }
@@ -86,9 +86,8 @@ function MEDIA_GET_ENTRY($key)
 
        // Check for entry
        $result = SQL_QUERY_ESC("SELECT media_value FROM "._MYSQL_PREFIX."_mediadata WHERE media_key='%s' LIMIT 1",
-        array($key), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 1)
-       {
+               array($key), __FILE__, __LINE__);
+       if (SQL_NUMROWS($result) == 1) {
                // Load data
                list($value) = SQL_FETCHROW($result);
        }
index 02c0b41..146d92d 100644 (file)
@@ -123,7 +123,7 @@ WHERE sid='%s' LIMIT 1",
        SQL_FREERESULT($result);
 
        // Purge old entries
-       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_online WHERE timestamp <= (UNIX_TIMESTAMP() - %s)",
+       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_online WHERE timestamp <= (UNIX_TIMESTAMP() - %s)",
                array(getConfig('online_timeout')), __FILE__, __LINE__);
 }
 
index 255bca4..9e096a3 100644 (file)
@@ -49,8 +49,8 @@ function RALLYE_AUTOSTART_RALLYES($result)
        SQL_FREERESULT($result);
 
        // Set notified to Y
-       $result_notified = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_data SET notified='Y' WHERE id=%s LIMIT 1",
-        array(bigintval($id)), __FILE__, __LINE__);
+       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_data SET notified='Y' WHERE id=%s LIMIT 1",
+               array(bigintval($id)), __FILE__, __LINE__);
 
        // Do a snapshot off all user refs
        $result_user = SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
@@ -92,7 +92,7 @@ function RALLYE_AUTOSTART_RALLYES($result)
 
                // Check if line is already included...
                $result_ref = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s AND userid=%s LIMIT 1",
-                array(bigintval($id), bigintval($uid)), __FILE__, __LINE__);
+                       array(bigintval($id), bigintval($uid)), __FILE__, __LINE__);
                if (SQL_NUMROWS($result_ref) == 0) {
                        // Free memory
                        SQL_FREERESULT($result_ref);
@@ -110,9 +110,9 @@ WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p
                        if (empty($cpoints)) $cpoints = "0.00000";
 
                        // Add info line
-                       $result_ref = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_users (rallye_id, userid, refs, curr_points)
+                       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_users (rallye_id, userid, refs, curr_points)
 VALUES ('%s','%s','%s','%s')",
- array(bigintval($id), bigintval($uid), bigintval($cnt), $cpoints), __FILE__, __LINE__);
                              array(bigintval($id), bigintval($uid), bigintval($cnt), $cpoints), __FILE__, __LINE__);
                        $un = true;
                } // END - if
 
@@ -302,7 +302,7 @@ function RALLYE_AUTOADD_USER($uid)
                // Is this user added?
                if (SQL_NUMROWS($result) == 0) {
                        // Add userid and his ref count to table
-                       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_users (rallye_id, userid, refs)
+                       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_users (rallye_id, userid, refs)
 VALUES ('%s','%s','0')",
  array(bigintval($id), bigintval($uid)), __FILE__, __LINE__);
                } else {
@@ -393,7 +393,7 @@ LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
        } // END - if
 
        // Expire rallye
-       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_data SET expired='Y' WHERE id=%s LIMIT 1",
+       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_data SET expired='Y' WHERE id=%s LIMIT 1",
                array(bigintval($id)), __FILE__, __LINE__);
 
        // Run array through (by uid is the most important 2nd-level-array)
@@ -463,7 +463,7 @@ LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
        SEND_ADMIN_NOTIFICATION(RALLYE_ADMIN_EXPIRED.": ".$title, $templ, $cnt, 0);
 
        // Add task
-       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created)
+       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created)
 VALUES ('NEW','RALLYE_EXPIRED','".RALLYE_ADMIN_EXPIRED.": %s','".RALLYE_ADMIN_EXPIRED_TEXT."',UNIX_TIMESTAMP())",
  array($title), __FILE__, __LINE__);
 
@@ -674,18 +674,18 @@ WHERE end_time <= (UNIX_TIMESTAMP() - %s) AND expired='Y'",
                        SEND_ADMIN_NOTIFICATION(RALLYE_ADMIN_PURGED.": ".$title, "admin_rallye_purged", "", 0);
 
                        // Purge whole rallye
-                       $result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%s LIMIT 1",
-                        array(bigintval($id)), __FILE__, __LINE__);
-                       $result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s LIMIT 1",
-                        array(bigintval($id)), __FILE__, __LINE__);
-                       $result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s LIMIT 1",
-                        array(bigintval($id)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%s LIMIT 1",
+                               array(bigintval($id)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s LIMIT 1",
+                               array(bigintval($id)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s LIMIT 1",
+                               array(bigintval($id)), __FILE__, __LINE__);
                }
 
                // Add task
-               $result_task = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created)
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created)
 VALUES ('NEW','RALLYE_PURGED','".RALLYE_ADMIN_PURGED.": %s','".RALLYE_ADMIN_PURGED_TEXT."',UNIX_TIMESTAMP())",
- array($title), __FILE__, __LINE__);
                      array($title), __FILE__, __LINE__);
        }
 
        // Free memory
index cd8d0fb..551f56e 100644 (file)
@@ -73,7 +73,7 @@ function ADD_REFBACK_POINTS ($uid, $ref, $points, $ref_points) {
                                $refback = $points * ($perc / 100) * ($percents / 100);
 
                                // Update refback table ("refid" and "uid" must be exchanged!)
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_refs SET points=points+%s WHERE userid=%s AND refid=%s LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_refs SET points=points+%s WHERE userid=%s AND refid=%s LIMIT 1",
                                        array($refback, $refid, $uid), __FILE__, __LINE__);
                                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):refback={$refback},uid={$uid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")<br />\n";
 
@@ -211,7 +211,7 @@ function UPDATE_REFBACK_TABLE($uid) {
                                if (SQL_NUMROWS($result) == 0) {
                                        // Insert this level
                                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$cacheArray['back_level']},ref={$cacheArray['up_refid'][$cacheArray['back_level']]} - ADD!<br />\n";
-                                       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_refs (userid,level,refid) VALUES (%s,%s,%s)",
+                                       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_refs (userid,level,refid) VALUES (%s,%s,%s)",
                                                array(bigintval($uid), $cacheArray['back_level'], bigintval($cacheArray['up_refid'][$cacheArray['back_level']])), __FILE__, __LINE__);
 
                                        // Move to next referal level and count his counter one up!
@@ -231,7 +231,7 @@ function UPDATE_REFBACK_TABLE($uid) {
                                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level=".($cacheArray['back_level']-$minus).",ref={$cacheArray['up_refid'][$cacheArray['back_level']]},numRows=".SQL_NUMROWS($result)." - BACK!<br />\n";
                                        if (SQL_NUMROWS($result) == 0) {
                                                // Insert this level
-                                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_refs (userid,level,refid) VALUES (%s,%s,%s)",
+                                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_refs (userid,level,refid) VALUES (%s,%s,%s)",
                                                        array(bigintval($uid), ($cacheArray['back_level']-$minus), bigintval($cacheArray['up_refid'][$cacheArray['back_level']])), __FILE__, __LINE__);
                                                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level=".($cacheArray['back_level']-$minus).",ref={$cacheArray['up_refid'][$cacheArray['back_level']]} - RETURNED!<br />\n";
                                        } // END - if
index b0deed1..499abe7 100644 (file)
@@ -455,7 +455,7 @@ function UPDATE_SPONSOR_LOGIN()
        if ($login)
        {
                // Update last online timestamp
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data
+               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data
 SET last_online='".time()."'
 WHERE id='%s' AND password='%s' LIMIT 1",
  array(bigintval($_COOKIE['sponsorid']), $_COOKIE['sponsorpass']), __FILE__, __LINE__);
index d42c6c1..ff4acda 100644 (file)
@@ -326,7 +326,7 @@ function WERNIS_TRANSFER_STATUS ($status) {
 // Log the transfer
 function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = "", $status = "") {
        // Register this wernis movement
-       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_wernis (`userid`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type`, `wernis_api_message`, `wernis_api_status`) VALUES (%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')",
+       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_wernis (`userid`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type`, `wernis_api_message`, `wernis_api_status`) VALUES (%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')",
                array($GLOBALS['userid'], bigintval($wdsId), bigintval($amount), $type, $message, $status), __FILE__, __LINE__);
 }
 
index 327d83b..2f9f64a 100644 (file)
@@ -242,7 +242,7 @@ function YOOMEDIA_EXCLUDE_MAIL ($data, $mode) {
                $mode = YOOMEDIA_CONVERT_MODE($mode);
 
                // Add the entry
-               $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_yoomedia_reload` (`type`,`y_id`,`y_reload`,`inserted`) VALUES ('%s',%s,%s,'0000-00-00 00:00')",
+               SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_yoomedia_reload` (`type`,`y_id`,`y_reload`,`inserted`) VALUES ('%s',%s,%s,'0000-00-00 00:00')",
                        array($mode, bigintval($data['id']), bigintval($data['reload'])), __FILE__, __LINE__);
        } // END - if
 }
@@ -253,7 +253,7 @@ function YOOMEDIA_UNLIST_MAIL ($data, $mode) {
        $mode = YOOMEDIA_CONVERT_MODE($mode);
 
        // Add the entry
-       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1",
+       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1",
                array($mode, bigintval($data['id'])), __FILE__, __LINE__);
 }
 
@@ -314,7 +314,7 @@ function YOOMEDIA_CHECK_RELOAD ($id, $reload, $type) {
                // Are we ready to sent again?
                if (((time() - $time) >= ($reload * 60*60)) && ($time > 0)) {
                        // Remove entry
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_yoomedia_reload WHERE id=%s LIMIT 1",
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_yoomedia_reload WHERE id=%s LIMIT 1",
                                array($id), __FILE__, __LINE__);
                } else {
                        // Dont' sent again this mail
@@ -337,7 +337,7 @@ function YOOMEDIA_RELOAD_LOCK ($data, $mode) {
                $mode = YOOMEDIA_CONVERT_MODE($mode);
 
                // Add the entry
-               $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_yoomedia_reload` (`type`,`y_id`,`y_reload`) VALUES ('%s',%s,%s)",
+               SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_yoomedia_reload` (`type`,`y_id`,`y_reload`) VALUES ('%s',%s,%s)",
                        array($mode, bigintval($data['id']), bigintval($data['reload'])), __FILE__, __LINE__);
        } // END - if
 }
index 832bc5e..b3580e8 100644 (file)
@@ -115,9 +115,11 @@ if (!empty($SQL)) {
                // Okay lets notify all users!
                while(list($uid, $email) = SQL_FETCHROW($result_main)) {
                        // Update account
-                       $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
-SET beg_ral_notify='%s', beg_ral_%s_notify='%s' WHERE userid=%s LIMIT 1",
- array(time(), $MODE, time(), $uid), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
+SET beg_ral_notify='%s', beg_ral_%s_notify='%s'
+WHERE userid=%s
+LIMIT 1",
+                               array(time(), $MODE, time(), $uid), __FILE__, __LINE__);
 
                        // Load email template and send it to the user!
                        if ($MAIL_MODE) {
index c23b1d7..1098443 100644 (file)
@@ -85,8 +85,8 @@ if (SQL_NUMROWS($result_birthday) > 0) {
                        }
 
                        // Insert row into database
-                       $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_birthday (userid, points, chk_value) VALUES ('%s','%s','%s' )",
-                        array(bigintval($uid), getConfig('birthday_points'), $content['check']), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_birthday (userid, points, chk_value) VALUES ('%s','%s','%s' )",
+                               array(bigintval($uid), getConfig('birthday_points'), $content['check']), __FILE__, __LINE__);
 
                        // Load email template with confirmation link
                        $msg = LOAD_EMAIL_TEMPLATE("member_birthday_confirm", $content, bigintval($uid));
@@ -99,8 +99,8 @@ if (SQL_NUMROWS($result_birthday) > 0) {
                SEND_EMAIL($uid, HAPPY_BIRTHDAY, $msg);
 
                // Remember him that he has received a birthday mail
-               $result_bd = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
-                array(bigintval($uid)), __FILE__, __LINE__);
+               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
+                       array(bigintval($uid)), __FILE__, __LINE__);
        }
 
        // Free memory
index 860a337..2df07aa 100644 (file)
@@ -94,9 +94,11 @@ if (!empty($SQL)) {
                // Okay lets notify all users!
                while(list($uid, $email) = SQL_FETCHROW($result_main)) {
                        // Update account
-                       $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
-SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s' WHERE userid=%s LIMIT 1",
- array(time(), $MODE, time(), $uid), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
+SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s'
+WHERE userid=%s
+LIMIT 1",
+                               array(time(), $MODE, time(), $uid), __FILE__, __LINE__);
 
                        // Load email template and send it to the user!
                        if ($MAIL_MODE) {
index 1c30a49..38bd814 100644 (file)
@@ -45,8 +45,8 @@ function REGISTER_ADMIN ($user, $md5, $email=WEBMASTER)
         array($user), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Ok, let's create the admin login
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins (login, password, email) VALUES ('%s', '%s', '%s')",
-                array($user, $md5, $email), __FILE__, __LINE__);
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins (login, password, email) VALUES ('%s', '%s', '%s')",
+                       array($user, $md5, $email), __FILE__, __LINE__);
                $ret = "done";
        } else {
                // Free memory
@@ -137,11 +137,11 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) {
                        set_session('mxchange_admin_last_fail', $data['last_failture']);
 
                        // Update password and reset login failtures
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s',login_failtures=0,last_failture='0000-00-00 00:00:00' WHERE id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s',login_failtures=0,last_failture='0000-00-00 00:00:00' WHERE id=%s LIMIT 1",
                                array($data['password'], $aid), __FILE__, __LINE__);
                } else {
                        // Update password
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s' WHERE id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s' WHERE id=%s LIMIT 1",
                                array($data['password'], $aid), __FILE__, __LINE__);
                }
 
index 5574b35..6543243 100644 (file)
@@ -41,7 +41,7 @@ function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) {
        global $cacheArray, $_CONFIG;
 
        // First check for solved and not assigned tasks and assign them to current admin
-       $result_task = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin='%s' WHERE assigned_admin < 1 AND status != 'NEW'",
+       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin='%s' WHERE assigned_admin < 1 AND status != 'NEW'",
                array(GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
 
        // We currently don't want to install an extension so let's find out if we need...
@@ -133,7 +133,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
 
                                if ($aid == "0") {
                                        // Assgin current admin to unassgigned task
-                                       $result_assign = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin='%s' WHERE id=%s LIMIT 1",
+                                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin='%s' WHERE id=%s LIMIT 1",
                                                array(GET_CURRENT_ADMIN_ID(), bigintval($tid)), __FILE__, __LINE__);
                                } // END - if
 
@@ -364,14 +364,14 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
                        if (!empty($_POST['unassign'])) {
                                // Unassign from tasks
                                foreach ($_POST['task'] as $id => $sel) {
-                                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin=0 WHERE id=%s AND assigned_admin=%s LIMIT 1",
-                                        array(bigintval($id), GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin=0 WHERE id=%s AND assigned_admin=%s LIMIT 1",
+                                               array(bigintval($id), GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
                                }
                        } elseif (isset($_POST['del'])) {
                                // Delete tasks
                                foreach ($_POST['task'] as $id => $sel) {
-                                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%s AND assigned_admin IN (%s,0) LIMIT 1",
-                                        array(bigintval($id), GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%s AND assigned_admin IN (%s,0) LIMIT 1",
+                                               array(bigintval($id), GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
                                }
                        }
 
index d0ffeb9..d5d1e97 100644 (file)
@@ -53,7 +53,7 @@ if (isset($_POST['ok']))
        if (SQL_NUMROWS($result) == 0)
        {
                // Ok, start and end time did not overlap
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_data (admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify)
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_data (admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify)
 VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')",
  array(
        GET_CURRENT_ADMIN_ID(),
index 1766d47..6672890 100644 (file)
@@ -170,7 +170,7 @@ if (!isset($_POST['ok']))
        if (!empty($_POST['menu']))
        {
                // Add sub menu
-               $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
                        array(
                                $_POST['menu'],
                                $_POST['name'],
@@ -184,7 +184,7 @@ if (!isset($_POST['ok']))
         else
        {
                // Add main menu
-               $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')",
                        array(
                                $_POST['name'],
                                $_POST['title'],
index 9416731..7ec9a43 100644 (file)
@@ -156,7 +156,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) {
                        $sel = bigintval($sel);
 
                        // Update entry
-                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET
 title='%s',
 action='%s',
 what='%s',
@@ -180,8 +180,8 @@ WHERE ".$AND." AND id=%s LIMIT 1",
 
        case "del": // Delete menu
                foreach ($_POST['sel'] as $sel => $menu) {
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
-                        array(bigintval($sel)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
+                               array(bigintval($sel)), __FILE__, __LINE__);
                        CACHE_PURGE_ADMIN_MENU(0, "", "", $AND);
                } // END - foreach
 
@@ -225,10 +225,10 @@ WHERE ".$AND." AND id=%s LIMIT 1",
                if ((!empty($tid)) && (!empty($fid)))
                {
                        // Sort menu
-                       $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                        array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
-                       $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                        array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                               array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                               array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
                        CACHE_PURGE_ADMIN_MENU(0, "", "", $AND);
                }
        }
index 879ab6f..6c985fc 100644 (file)
@@ -129,20 +129,20 @@ ORDER BY m.admin_id, m.mail_template", __FILE__, __LINE__);
                                $aid = bigintval($aid);
 
                                // Update entry
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins_mails SET admin_id=%s WHERE id=%s ORDER BY id LIMIT 1",
-                                array($aid, $id), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins_mails SET admin_id=%s WHERE id=%s ORDER BY id LIMIT 1",
+                                       array($aid, $id), __FILE__, __LINE__);
 
                                if (($aid < 1) && (!empty($_POST['template'][$id])))
                                {
                                        // Remove any other admin entries
-                                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins_mails WHERE mail_template='%s' AND id != '%s'",
-                                        array($_POST['template'][$id], $id), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins_mails WHERE mail_template='%s' AND id != '%s'",
+                                               array($_POST['template'][$id], $id), __FILE__, __LINE__);
                                }
                                if ($_POST['admin_new'][$_POST['template'][$id]] > 0)
                                {
                                        // Add new admin
-                                       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins_mails (admin_id, mail_template) VALUES ('%s','%s')",
-                                        array($aid, $_POST['template'][$id]), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins_mails (admin_id, mail_template) VALUES ('%s','%s')",
+                                               array($aid, $_POST['template'][$id]), __FILE__, __LINE__);
                                }
                        }
 
index d74d041..feb20a5 100644 (file)
@@ -83,8 +83,8 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) {
                $id = bigintval($id);
 
                // Update entries
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins_acls SET admin_id=%s, action_menu='%s', what_menu='%s', access_mode='%s' WHERE id=%s LIMIT 1",
-                array($_POST['admin'][$id], $_POST['action_menu'][$id], $_POST['what_menu'][$id], $_POST['mode'][$id], $id),__FILE__, __LINE__);
+               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins_acls SET admin_id=%s, action_menu='%s', what_menu='%s', access_mode='%s' WHERE id=%s LIMIT 1",
+                       array($_POST['admin'][$id], $_POST['action_menu'][$id], $_POST['what_menu'][$id], $_POST['mode'][$id], $id),__FILE__, __LINE__);
        }
 
        // Update cache when installed
@@ -103,7 +103,7 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) {
        foreach ($_POST['sel'] as $id => $sel) {
                // Load data for the ID
                $result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls WHERE id=%s LIMIT 1",
-                array(bigintval($id)), __FILE__, __LINE__);
+                       array(bigintval($id)), __FILE__, __LINE__);
                list($admin, $act, $wht, $mode) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
@@ -145,8 +145,8 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) {
 } elseif ((isset($_POST['remove'])) && ($SEL > 0)) {
        // Remove entries
        foreach ($_POST['sel'] as $id => $sel) {
-               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins_acls WHERE id=%s LIMIT 1",
-                array(bigintval($id)),__FILE__, __LINE__);
+               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins_acls WHERE id=%s LIMIT 1",
+                       array(bigintval($id)),__FILE__, __LINE__);
        }
 
        // Update cache when installed
@@ -179,7 +179,7 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) {
                         array(bigintval($_POST['admin_id']), $_POST['action_menu'], $_POST['what_menu']), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 0) {
                                // Finally add the new ACL
-                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins_acls (admin_id, action_menu, what_menu, access_mode)
+                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admins_acls (admin_id, action_menu, what_menu, access_mode)
 VALUES ('%s','%s','%s','%s')",
  array(
        bigintval($_POST['admin_id']),
index fd795ff..301fc13 100644 (file)
@@ -50,7 +50,7 @@ if (isset($_POST['add'])) {
                array($_POST['catname']), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Category does not exists, we simply add it...
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_cats (cat, visible, sort) VALUES ('%s','%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_cats (cat, visible, sort) VALUES ('%s','%s','%s')",
                        array($_POST['catname'], $_POST['visible'], bigintval($_POST['parent'] + 1)), __FILE__, __LINE__);
                $content = "<SPAN class=\"admin_done\">".CATEGORY_ADDED."</SPAN>";
        } else {
@@ -75,16 +75,16 @@ if (isset($_POST['add'])) {
                        switch ($_GET['do'])
                        {
                        case "edit": // Change categories
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_cats SET cat='%s', visible='%s', sort=%s WHERE id=%s LIMIT 1",
-                                array($cat, $_POST['vis'][$id], $_POST['sort'][$id], $id), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_cats SET cat='%s', visible='%s', sort=%s WHERE id=%s LIMIT 1",
+                                       array($cat, $_POST['vis'][$id], $_POST['sort'][$id], $id), __FILE__, __LINE__);
                                $TEXT = CATEGORIES_SAVED;
                                break;
 
                        case "del": // Delete categories
-                               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1",
-                                array($id), __FILE__, __LINE__);
-                               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_cats WHERE cat_id=%s",
-                                array($id), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1",
+                                       array($id), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_cats WHERE cat_id=%s",
+                                       array($id), __FILE__, __LINE__);
                                $TEXT = CATEGORIES_DELETED;
                                break;
                        }
@@ -98,16 +98,13 @@ if (isset($_POST['add'])) {
                // Display message
                LOAD_TEMPLATE("admin_settings_saved", false, $TEXT);
        }
-}
- elseif ((isset($_POST['del'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0]))))
-{
+} elseif ((isset($_POST['del'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0])))) {
        // Delete categories
        $SW = 2; $OUT = "";
-       foreach ($_POST['sel'] as $id => $value)
-       {
+       foreach ($_POST['sel'] as $id => $value) {
                // Load data of category
                $result = SQL_QUERY_ESC("SELECT cat FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1",
-                array(bigintval($id)), __FILE__, __LINE__);
+                       array(bigintval($id)), __FILE__, __LINE__);
                list($cat) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
index f2190ae..dee0539 100644 (file)
@@ -49,7 +49,7 @@ if (isset($_POST['add_max'])) {
         array(bigintval($_POST['max'])), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Add this value (including comment)
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_max_receive (value, comment) VALUES ('%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_max_receive (value, comment) VALUES ('%s','%s')",
                 array(bigintval($_POST['max']), $_POST['comment']),__FILE__, __LINE__);
                $content = "<SPAN class=\"admin_done\">".MAX_VALUE_SAVED."</SPAN>";
        } else {
@@ -72,14 +72,14 @@ if (isset($_POST['add_max'])) {
                switch ($_GET['do'])
                {
                case "edit": // Change entries
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_max_receive SET value='%s', comment='%s' WHERE id=%s LIMIT 1",
-                        array(bigintval($_POST['val'][$id]), $_POST['comm'][$id], $id),__FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_max_receive SET value='%s', comment='%s' WHERE id=%s LIMIT 1",
+                               array(bigintval($_POST['val'][$id]), $_POST['comm'][$id], $id),__FILE__, __LINE__);
                        $TEXT = MRECEIVE_SAVED;
                        break;
 
                case "del":
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE id=%s LIMIT 1",
-                        array($id), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE id=%s LIMIT 1",
+                               array($id), __FILE__, __LINE__);
                        $TEXT = MRECEIVE_DELETED;
                        break;
                }
index 93ea4ed..5a1e816 100644 (file)
@@ -99,8 +99,8 @@ if (isset($_POST['edit']))
                $id = bigintval($id);
 
                // Update module
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mod_reg SET title='%s', locked='%s', hidden='%s', admin_only='%s', mem_only='%s' WHERE id=%s LIMIT 1",
-                array($_POST['title'][$id], $_POST['locked'][$id], $_POST['hidden'][$id], $_POST['admin'][$id], $_POST['member'][$id], $id),  __FILE__, __LINE__);
+               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mod_reg SET title='%s', locked='%s', hidden='%s', admin_only='%s', mem_only='%s' WHERE id=%s LIMIT 1",
+                       array($_POST['title'][$id], $_POST['locked'][$id], $_POST['hidden'][$id], $_POST['admin'][$id], $_POST['member'][$id], $id),  __FILE__, __LINE__);
        }
 
        // Remove cache file if version matches
index da87317..98ca6cb 100644 (file)
@@ -50,7 +50,7 @@ if ((isset($_POST['add'])) && (!empty($_POST['title'])) && ($_POST['rate'] > 0))
        if (SQL_NUMROWS($result) == 0)
        {
                // Add now
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_payout_types
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_payout_types
 (type, rate, min_points, from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url)
 VALUES ('%s', %d, %d,'%s','%s','%s','%s','%s','%s','%s')",
  array(
@@ -96,7 +96,7 @@ if ((isset($_POST['edit'])) && (SELECTION_COUNT($_POST['sel']) > 0))
                        if ((!empty($_POST['title'][$id])) && ($_POST['rate'][$id] > 0))
                        {
                                // Update entry
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_payout_types SET
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_payout_types SET
 type='%s',
 rate=%s,
 min_points=%s,
@@ -152,8 +152,8 @@ WHERE id='".$id."' LIMIT 1",
                // Delete entries
                foreach ($_POST['sel'] as $id => $sel)
                {
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1",
-                        array(bigintval($id)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1",
+                               array(bigintval($id)), __FILE__, __LINE__);
                }
                $msg = ADMIN_PAYOUT_ENTRIES_DELETED;
        }
index 1e93a7f..bbd75cd 100644 (file)
@@ -86,16 +86,16 @@ if (isset($_POST['ok'])) {
                                $_POST['perc'][$id] = REVERT_COMMA($_POST['perc'][$id]);
 
                                // Update entry
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refdepths SET level='%s', percents='%s' WHERE id=%s LIMIT 1",
-                                array(bigintval($value), $_POST['perc'][$id], $id), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refdepths SET level='%s', percents='%s' WHERE id=%s LIMIT 1",
+                                       array(bigintval($value), $_POST['perc'][$id], $id), __FILE__, __LINE__);
                        }
                        $TEXT = REF_DEPTHS_SAVED;
                        break;
 
                case "del":
                        foreach ($_POST['id'] as $id => $value) {
-                               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1",
-                                array(bigintval($id)), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1",
+                                       array(bigintval($id)), __FILE__, __LINE__);
                        }
                        $TEXT = REF_DEPTHS_DELETED;
                        break;
index 1c06912..d9ed51b 100644 (file)
@@ -54,7 +54,7 @@ if (!empty($_GET['rallye']))
                        if (SQL_NUMROWS($result) == 0)
                        {
                                // Ok, new price level entered!
-                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_prices (rallye_id, price_level, points, info)
+                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_rallye_prices (rallye_id, price_level, points, info)
 VALUES ('%s','%s','%s','%s')",
  array(
        bigintval($_GET['rallye']),
@@ -73,47 +73,37 @@ VALUES ('%s','%s','%s','%s')",
                                LOAD_TEMPLATE("admin_settings_saved", false, RALLYE_PRICE_ALREADY_FOUND);
                        }
                }
-       }
-        elseif (isset($_POST['remove']))
-       {
+       } elseif (isset($_POST['remove'])) {
                // Check if at last one line is selected
                $SEL = SELECTION_COUNT($_POST['sel']);
-               if ($SEL > 0)
-               {
+               if ($SEL > 0) {
                        // Delete selected entries
-                       foreach ($_POST['sel'] as $id => $sel)
-                       {
-                               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE id=%s LIMIT 1",
-                                array(bigintval($id)), __FILE__, __LINE__);
+                       foreach ($_POST['sel'] as $id => $sel) {
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE id=%s LIMIT 1",
+                                       array(bigintval($id)), __FILE__, __LINE__);
                        }
 
                        // Output message
                        LOAD_TEMPLATE("admin_settings_saved", false, RALLYE_ENTRIES_DELETED);
-               }
-                else
-               {
+               } else {
                        LOAD_TEMPLATE("admin_settings_saved", false, RALLYE_ENTRIES_NOT_DELETED);
                }
-       }
-        elseif (isset($_POST['change']))
-       {
+       } elseif (isset($_POST['change'])) {
                // Change entries
-               foreach ($_POST['level'] as $id => $level)
-               {
+               foreach ($_POST['level'] as $id => $level) {
                        // Secure ID
                        $id = bigintval($id);
 
                        // Update entry
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_prices SET rallye_id=%s, price_level='%s', points='%s', info='%s' WHERE id=%s LIMIT 1",
-                        array($_POST['rallye_id'][$id], bigintval($level), $_POST['points'][$id], $_POST['infos'][$id], $id), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_prices SET rallye_id=%s, price_level='%s', points='%s', info='%s' WHERE id=%s LIMIT 1",
+                               array($_POST['rallye_id'][$id], bigintval($level), $_POST['points'][$id], $_POST['infos'][$id], $id), __FILE__, __LINE__);
                }
 
                // Output message
                LOAD_TEMPLATE("admin_settings_saved", false, RALLYE_ENTRIES_CHANGED);
        }
 
-       if (isset($_POST['edit']))
-       {
+       if (isset($_POST['edit'])) {
                // Check if at last one line is selected
                $SEL = SELECTION_COUNT($_POST['sel']);
                if ($SEL > 0)
index dbc53e6..2a31fd6 100644 (file)
@@ -43,8 +43,8 @@ ADD_DESCR("admin", __FILE__);
 // Do we want to save changes?
 if (isset($_POST['ok'])) {
        foreach ($_POST['sel'] as $id => $value) {
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_must_register SET field_required='%s' WHERE id=%s AND field_required != '%s' LIMIT 1",
-                array($value, bigintval($id), $value),__FILE__, __LINE__);
+               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_must_register SET field_required='%s' WHERE id=%s AND field_required != '%s' LIMIT 1",
+                       array($value, bigintval($id), $value),__FILE__, __LINE__);
        }
        LOAD_TEMPLATE("admin_settings_saved", false, REGISTER_ADMIN_CHANGES_SAVED);
 }
index 10ddba9..90da0a9 100644 (file)
@@ -148,7 +148,7 @@ WHERE s.pool_id=%s LIMIT 1",
        }
 } elseif (!empty($_GET['pid'])) {
        // Remove stats entries
-       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s LIMIT 1",
+       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s LIMIT 1",
                array(bigintval($_GET['pid'])), __FILE__, __LINE__);
 
        // Output message
@@ -190,7 +190,7 @@ WHERE s.pool_id=%s LIMIT 1",
 } elseif ((!empty($_GET['nid'])) && (GET_EXT_VERSION("bonus") >= "0.8.7")) {
        // Load data from bonus mail
        $result = SQL_QUERY_ESC("SELECT id, subject, url, timestamp FROM "._MYSQL_PREFIX."_bonus WHERE id=%s",
-        array(bigintval($_GET['nid'])), __FILE__, __LINE__);
+               array(bigintval($_GET['nid'])), __FILE__, __LINE__);
 
        // Delete mail only once
        if (SQL_NUMROWS($result) == 1) {
@@ -199,10 +199,10 @@ WHERE s.pool_id=%s LIMIT 1",
                SQL_FREERESULT($result);
 
                // Delete bonus mail entirely from database
-               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1",
-                array(bigintval($_GET['nid'])), __FILE__, __LINE__);
-               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s",
-                array(bigintval($_GET['nid'])), __FILE__, __LINE__);
+               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1",
+                       array(bigintval($_GET['nid'])), __FILE__, __LINE__);
+               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s",
+                       array(bigintval($_GET['nid'])), __FILE__, __LINE__);
 
                // Prepare data for the template
                define('__ID'     , $id);
index cf06406..b1cd317 100644 (file)
@@ -62,12 +62,12 @@ WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
                        SQL_FREERESULT($result);
 
                        // Update user's account
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
 SET holiday_active='N', holiday_activated='0'
 WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
 
                        // Remove holiday
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays
 WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
 
                        // Prepare loaded data for the
@@ -103,7 +103,7 @@ WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
                unset($content[1]);
 
                // Delete one holiday request (for task)
-               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays
+               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays
 WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
 
                // Send email to user
index 9201543..27bd98d 100644 (file)
@@ -63,12 +63,12 @@ if (!empty($_GET['id']))) {
                        SEND_EMAIL($email, SPONSOR_ADMIN_DEL_SUBJECT, $msg);
 
                        // Remove account
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_sponsor_data WHERE id='%s' LIMIT 1",
-                        array(bigintval($_GET['id'])), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_sponsor_data WHERE id='%s' LIMIT 1",
+                               array(bigintval($_GET['id'])), __FILE__, __LINE__);
 
                        // Remove orders
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_sponsor_orders WHERE sponsorid='%s' LIMIT 1",
-                        array(bigintval($_GET['id'])), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_sponsor_orders WHERE sponsorid='%s' LIMIT 1",
+                               array(bigintval($_GET['id'])), __FILE__, __LINE__);
 
                        // Output message
                        LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_DELETED_1.bigintval($_GET['id']).SPONSOR_DELETED_2);
index 150fa39..5722b74 100644 (file)
@@ -50,10 +50,10 @@ if (isset($_POST['del']))
                // Delete entries...
                foreach ($_POST['sel'] as $id => $sel)
                {
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_in WHERE trans_id=%s LIMIT 1",
-                        array(bigintval($id)), __FILE__, __LINE__);
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_out WHERE trans_id=%s LIMIT 1",
-                        array(bigintval($id)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_in WHERE trans_id=%s LIMIT 1",
+                               array(bigintval($id)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_out WHERE trans_id=%s LIMIT 1",
+                               array(bigintval($id)), __FILE__, __LINE__);
                }
        }
 }
index d073ed9..5505cda 100644 (file)
@@ -67,7 +67,7 @@ if (SQL_NUMROWS($result) > 0)
                // Save changes
                if (!empty($SQL))
                {
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET
 subject='%s',
 text='%s',
 url='%s'
index 631eef7..e24b653 100644 (file)
@@ -109,8 +109,8 @@ if ((!empty($_GET['id'])) && (!empty($_GET['mode']))) {
                                        $POINTS = strval(REVERT_COMMA($_POST['points']));
 
                                        // Add points to account
-                                       $result_add = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET points_amount=points_amount+%s WHERE id='%s' LIMIT 1",
-                                        array($POINTS, bigintval($_GET['id'])), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET points_amount=points_amount+%s WHERE id='%s' LIMIT 1",
+                                               array($POINTS, bigintval($_GET['id'])), __FILE__, __LINE__);
 
                                        // Remember points /reason for the template
                                        define('__POINTS' , TRANSLATE_COMMA($POINTS));
@@ -132,8 +132,8 @@ if ((!empty($_GET['id'])) && (!empty($_GET['mode']))) {
                                        $POINTS = strval(REVERT_COMMA($_POST['points']));
 
                                        // Add points to account
-                                       $result_add = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET points_used=points_used+%s WHERE id='%s' LIMIT 1",
-                                        array($POINTS, bigintval($_GET['id'])), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET points_used=points_used+%s WHERE id='%s' LIMIT 1",
+                                               array($POINTS, bigintval($_GET['id'])), __FILE__, __LINE__);
 
                                        // Remember points /reason for the template
                                        define('__POINTS' , TRANSLATE_COMMA($POINTS));
index b33102a..2f399f0 100644 (file)
@@ -77,7 +77,7 @@ if ((SQL_NUMROWS($result_main) == 1) || (empty($_GET['u_id'])))
                if ($PASS)
                {
                        // We have to add the following things: birthday and max receive mails
-                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET
 gender='%s',
 surname='%s',
 family='%s',
index 2446b3d..293a285 100644 (file)
@@ -61,8 +61,8 @@ if (!empty($_GET['reg_ext'])) {
                        // De/activate extension
                        $ACT = "N"; $EXT_LOAD_MODE = "deactivate";
                        if ($active == "N") { $ACT = "Y"; $EXT_LOAD_MODE = "activate"; }
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='".$ACT."' WHERE id=%s AND ext_active='%s' LIMIT 1",
-                        array(bigintval($ext_id), $active), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='".$ACT."' WHERE id=%s AND ext_active='%s' LIMIT 1",
+                               array(bigintval($ext_id), $active), __FILE__, __LINE__);
 
                        // Run embeded SQL commands
                        EXTENSION_RUN_SQLS($ext_id, $EXT_LOAD_MODE);
@@ -83,12 +83,12 @@ if (!empty($_GET['reg_ext'])) {
                                $active = $_POST['active'][$ext_id];
                                if (GET_EXT_VERSION("sql_patches") >= "0.0.6")  {
                                        // Update also CSS column when extensions sql_patches is newer or exact v0.0.6
-                                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='%s', ext_active='%s' WHERE id=%s LIMIT 1",
-                                        array($_POST['css'][$ext_id], $active, $ext_id), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='%s', ext_active='%s' WHERE id=%s LIMIT 1",
+                                               array($_POST['css'][$ext_id], $active, $ext_id), __FILE__, __LINE__);
                                } else {
                                        // When extension is older than v0.0.6 there is no column for the CSS information
-                                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='%s' WHERE id=%s LIMIT 1",
-                                        array($active, $ext_id), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='%s' WHERE id=%s LIMIT 1",
+                                               array($active, $ext_id), __FILE__, __LINE__);
                                }
 
                                // Run SQLs on activation / deactivation
index 863931e..f4c75d1 100644 (file)
@@ -175,7 +175,7 @@ WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
        // Insert new menu entry
        if (!empty($_POST['menu']))
        {
-               $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')",
  array(
        $_POST['menu'],
        $_POST['name'],
@@ -187,7 +187,7 @@ WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
        }
         else
        {
-               $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (action, title, sort, visible, locked) VALUES ('%s','%s','%s','%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (action, title, sort, visible, locked) VALUES ('%s','%s','%s','%s','%s')",
  array(
        $_POST['name'],
        $_POST['title'],
index df96f45..a949834 100644 (file)
@@ -157,8 +157,8 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
                        $sel = bigintval($sel);
 
                        // Update entry
-                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                        array($menu, $_POST['sel_action'][$sel], $_POST['sel_what'][$sel], $sel),__FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                               array($menu, $_POST['sel_action'][$sel], $_POST['sel_what'][$sel], $sel),__FILE__, __LINE__);
                }
                LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE);
                break;
@@ -167,8 +167,8 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
                foreach ($_POST['sel'] as $sel => $menu)
                {
                        // Delete enty
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
-                        array(bigintval($sel)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
+                               array(bigintval($sel)), __FILE__, __LINE__);
                }
                LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE);
                break;
@@ -180,8 +180,8 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
                        $sel = bigintval($sel);
 
                        // Update entry
-                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                        array($_POST['visible'][$sel], $_POST['locked'][$sel], $sel), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                               array($_POST['visible'][$sel], $_POST['locked'][$sel], $sel), __FILE__, __LINE__);
                }
                LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE);
                break;
@@ -269,9 +269,9 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 
                if ((!empty($tid)) && (!empty($fid))) {
                        // Sort menu
-                       $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
-                       $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
                } // END - if
        } // END - if
index 7977ca3..70ea851 100644 (file)
@@ -49,7 +49,7 @@ if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr'
        if (SQL_NUMROWS($result) == 0)
        {
                // Save entry
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_countries (code, descr, is_active) VALUES ('%s','%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_countries (code, descr, is_active) VALUES ('%s','%s','%s')",
  array(strtoupper(substr($_POST['code'], 0, 2)), $_POST['descr'], $_POST['is_active']), __FILE__, __LINE__);
 
                // Country added
index 5bd5651..1ea98ba 100644 (file)
@@ -74,8 +74,8 @@ if (!empty($_GET['u_id'])) {
                        // Some unconfirmed mails left
                        if ($_GET['del'] == "all") {
                                // Delete all unconfirmed mails by this user
-                               $result_del = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE userid=%s LIMIT %s",
-                                array(bigintval($_GET['u_id']), $nums), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE userid=%s LIMIT %s",
+                                       array(bigintval($_GET['u_id']), $nums), __FILE__, __LINE__);
 
                                // Prepare mail and send it away
                                $msg = LOAD_EMAIL_TEMPLATE("admin-del_links", $nums, bigintval($_GET['u_id']));
index 1e7943f..db649c3 100644 (file)
@@ -44,8 +44,8 @@ if ((!empty($_POST['uid'])) && (!empty($_POST['id'])))
 {
        // Update database...
        // First user's account
-       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nl_until='".time()."+nl_timespan', nl_receive='N', nl_timespan='0' WHERE userid=%s LIMIT 1",
-        array(bigintval($_POST['uid'])), __FILE__, __LINE__);
+       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nl_until='".time()."+nl_timespan', nl_receive='N', nl_timespan='0' WHERE userid=%s LIMIT 1",
+               array(bigintval($_POST['uid'])), __FILE__, __LINE__);
 
        // Next the task system...
        RUN_FILTER('solve_task', bigintval($_POST['id']));
index 0c11dd2..0acf3c9 100644 (file)
@@ -126,7 +126,7 @@ if (!empty($_GET['pid'])) {
                                                }
 
                                                // Clear payout request
-                                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_payouts SET status='ACCEPTED' WHERE id=%s LIMIT 1",
+                                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_payouts SET status='ACCEPTED' WHERE id=%s LIMIT 1",
                                                        array(bigintval($_GET['pid'])), __FILE__, __LINE__);
 
                                                // Send out mail
@@ -165,7 +165,7 @@ if (!empty($_GET['pid'])) {
                                }
 
                                // Clear payout request
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_payouts SET status='REJECTED' WHERE id=%s LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_payouts SET status='REJECTED' WHERE id=%s LIMIT 1",
                                 array(bigintval($_GET['pid'])), __FILE__, __LINE__);
 
                                // Send out mail
index dddae95..23a3c32 100644 (file)
@@ -108,12 +108,12 @@ if (isset($_GET['rallye']))
                foreach ($_POST['sel'] as $id => $sel)
                {
                        // Remove selected rallye entirely...
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%s LIMIT 1",
-                        array(bigintval($id)), __FILE__, __LINE__);
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s",
-                        array(bigintval($id)), __FILE__, __LINE__);
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s",
-                        array(bigintval($id)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%s LIMIT 1",
+                               array(bigintval($id)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s",
+                               array(bigintval($id)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE rallye_id=%s",
+                               array(bigintval($id)), __FILE__, __LINE__);
                }
 
                // Output message
@@ -142,7 +142,7 @@ if (isset($_GET['rallye']))
                        $END   = mktime($_POST['end_hour'][$id]  , $_POST['end_min'][$id]  , $_POST['end_sec'][$id]  , $_POST['end_month'][$id]  , $_POST['end_day'][$id]  , $_POST['end_year'][$id]  );
 
                        // Update entry
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_data SET
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_rallye_data SET
 title='%s',
 descr='%s',
 template='%s',
index 758b749..e8052b9 100644 (file)
@@ -64,7 +64,7 @@ if (isset($_POST['add'])) {
                        $id = bigintval($id);
 
                        // Save entry
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_paytypes
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_paytypes
 SET pay_name='%s', pay_rate='%s', pay_min_count='%s', pay_currency='%s' WHERE id='%s' LIMIT 1",
  array($_POST['name'][$id], $_POST['rate'][$id], bigintval($_POST['min'][$id]), $_POST['curr'][$id], $id),
  __FILE__, __LINE__);
@@ -76,8 +76,8 @@ SET pay_name='%s', pay_rate='%s', pay_min_count='%s', pay_currency='%s' WHERE id
                // Remove entries here...
                foreach ($_POST['id'] as $id => $sel) {
                        // Remove entry
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_sponsor_paytypes WHERE id='%s' LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_sponsor_paytypes WHERE id='%s' LIMIT 1",
                              array(bigintval($id)), __FILE__, __LINE__);
                }
 
                // Generate message
@@ -97,7 +97,7 @@ if (isset($_POST['add'])) {
         array($_POST['pay_name']), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // No entry found so add this line
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_sponsor_paytypes (pay_name, pay_rate, pay_min_count, pay_currency)
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_sponsor_paytypes (pay_name, pay_rate, pay_min_count, pay_currency)
  VALUES ('%s','%s','%s','%s')",
  array(htmlspecialchars($_POST['pay_name']), REVERT_COMMA($_POST['pay_rate']), bigintval($_POST['pay_min_count']), htmlspecialchars($_POST['pay_currency'])),
  __FILE__, __LINE__);
index 9c5d2c2..b9a66f3 100644 (file)
@@ -98,16 +98,16 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L
                        if (isset($_POST['unassign'])) {
                                // Unassign from tasks
                                foreach ($_POST['task'] as $id => $sel) {
-                                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin=0 WHERE id=%s AND assigned_admin=%s LIMIT 1",
-                                        array(bigintval($id), GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin=0 WHERE id=%s AND assigned_admin=%s LIMIT 1",
+                                               array(bigintval($id), GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
                                }
                        } elseif (isset($_POST['del'])) {
                                // Delete tasks
                                foreach ($_POST['task'] as $id => $sel) {
                                        if ($_GET['type'] == "deleted") {
                                                // Delete task immediately
-                                               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%s LIMIT 1",
-                                                array(bigintval($id)),__FILE__, __LINE__);
+                                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%s LIMIT 1",
+                                                       array(bigintval($id)),__FILE__, __LINE__);
                                        } else {
                                                // Mark task as to be deleted (purged by autppurge extension)
                                                ADMIN_DELETE_TASK($id);
index 5c8fcfc..a4aebb3 100644 (file)
@@ -78,8 +78,8 @@ if (!empty($_GET['id'])) {
                                SEND_EMAIL($email, $subject, $msg);
 
                                // Update sponsor's account
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET status='".$status."' WHERE id='%s' LIMIT 1",
-                                array(bigintval($_GET['id'])), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET status='".$status."' WHERE id='%s' LIMIT 1",
+                                       array(bigintval($_GET['id'])), __FILE__, __LINE__);
                        } elseif (!empty($_POST['no'])) {
                                // No don't lock / unlock now!
                                LOAD_URL(URL."/modules.php?module=admin&what=list_sponsor&id=".bigintval($_GET['id']));
index a2dc750..e96c9a5 100644 (file)
@@ -58,11 +58,11 @@ if (!empty($_GET['u_id'])) {
                        // Ok, lock the account!
                        if (GET_EXT_VERSION("user") >= "0.3.5") {
                                // Lock with reason
-                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='LOCKED',lock_reason='%s',lock_timestamp=NOW() WHERE userid=%s LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='LOCKED',lock_reason='%s',lock_timestamp=NOW() WHERE userid=%s LIMIT 1",
                                        array($_POST['reason'], bigintval($_GET['u_id'])), __FILE__, __LINE__);
                        } else {
                                // Lock with no lock reason saved
-                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='LOCKED' WHERE userid=%s LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='LOCKED' WHERE userid=%s LIMIT 1",
                                        array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
                        }
 
@@ -82,11 +82,11 @@ if (!empty($_GET['u_id'])) {
                        // Ok, unlock the account!
                        if (GET_EXT_VERSION("user") >= "0.3.5") {
                                // Reset lock reason as well
-                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED',lock_reason='',lock_timestamp='0000-00-00 00:00' WHERE userid=%s LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED',lock_reason='',lock_timestamp='0000-00-00 00:00' WHERE userid=%s LIMIT 1",
                                        array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
                        } else {
                                // No lock reason to reset
-                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED' WHERE userid=%s LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED' WHERE userid=%s LIMIT 1",
                                        array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
                        }
 
index b83d9d0..ff8ffde 100644 (file)
@@ -175,7 +175,7 @@ if (!isset($_POST['ok']))
        // Insert new menu entry
        if (!empty($_POST['menu']))
        {
-               $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')",
  array(
        $_POST['menu'],
        $_POST['name'],
@@ -187,7 +187,7 @@ if (!isset($_POST['ok']))
        }
         else
        {
-               $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
  array(
        $_POST['name'],
        $_POST['title'],
index 2bf60d3..e560bf9 100644 (file)
@@ -200,18 +200,18 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
                switch ($_POST['ok'])
                {
                case "edit": // Edit menu
-                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                        array($menu, $_POST['sel_act'][$sel], $_POST['sel_what'][$sel], $sel), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                               array($menu, $_POST['sel_act'][$sel], $_POST['sel_what'][$sel], $sel), __FILE__, __LINE__);
                        break;
 
                case "del": // Delete menu
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
-                        array($sel), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
+                               array($sel), __FILE__, __LINE__);
                        break;
 
                case "status": // Change status of menus
-                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                        array($_POST['visible'][$sel], $_POST['locked'][$sel], $sel), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                               array($_POST['visible'][$sel], $_POST['locked'][$sel], $sel), __FILE__, __LINE__);
                        break;
                }
                break;
@@ -247,10 +247,10 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 
                if ((!empty($tid)) && (!empty($fid))) {
                        // Sort menu
-                       $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                        array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
-                       $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                        array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                               array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                               array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
                } // END - -fi
        }
 
index 1ebd709..c2ec5fe 100644 (file)
@@ -61,7 +61,7 @@ if (isset($_POST['ok']))
                if (SQL_NUMROWS($result) == 0)
                {
                        // Add banner
-                       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_refbanner (url, alternate, visible)
+                       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_refbanner (url, alternate, visible)
 VALUES ('%s','%s','%s')",
  array($_POST['url'], $_POST['alternate'], $_POST['visible']), __FILE__, __LINE__);
                }
@@ -79,8 +79,8 @@ VALUES ('%s','%s','%s')",
                        $id = bigintval($id);
 
                        // Update entry
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET url='%s', alternate='%s', visible='%s' WHERE id=%s LIMIT 1",
-                        array($_POST['url'][$id], $_POST['alternate'][$id], $_POST['visible'], $id), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET url='%s', alternate='%s', visible='%s' WHERE id=%s LIMIT 1",
+                               array($_POST['url'][$id], $_POST['alternate'][$id], $_POST['visible'], $id), __FILE__, __LINE__);
                }
                break;
        }
@@ -129,10 +129,9 @@ VALUES ('%s','%s','%s')",
        if (($SEL > 0) && (isset($_POST['del'])))
        {
                // Delete banner
-               foreach ($_POST['sel'] as $id => $sel)
-               {
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_refbanner WHERE id=%s LIMIT 1",
-                        array(bigintval($id)), __FILE__, __LINE__);
+               foreach ($_POST['sel'] as $id => $sel) {
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_refbanner WHERE id=%s LIMIT 1",
+                               array(bigintval($id)), __FILE__, __LINE__);
                }
        }
 
index 83f62f7..13aeda7 100644 (file)
@@ -49,7 +49,7 @@ while(list($id, $act) = SQL_FETCHROW($result_fix)) {
        $ACTIONS[] = $act;
 
        // Fix weight
-       $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort=%s WHERE id=%s LIMIT 1",
+       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort=%s WHERE id=%s LIMIT 1",
                array($cnt, $id), __FILE__, __LINE__);
        $REP += SQL_AFFECTEDROWS();
 
@@ -58,7 +58,7 @@ while(list($id, $act) = SQL_FETCHROW($result_fix)) {
 }
 
 // Set logout weight to 999
-$result_sort = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__);
+SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__);
 
 // Now sort every each menu
 foreach ($ACTIONS as $act) {
@@ -67,7 +67,7 @@ foreach ($ACTIONS as $act) {
        $cnt = 1;
        while (list($id) = SQL_FETCHROW($result_fix)) {
                // Fix weight
-               $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort=%s WHERE id=%s LIMIT 1",
+               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort=%s WHERE id=%s LIMIT 1",
                        array($cnt, $id), __FILE__, __LINE__);
                $REP += SQL_AFFECTEDROWS();
 
index 9354642..6fd582d 100644 (file)
@@ -52,8 +52,8 @@ if (SQL_NUMROWS($result) > 0)
                if (SQL_NUMROWS($result_user) == 0)
                {
                        // Ok, we found something to remove
-                       $result_remove = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%s",
-                        array(bigintval($uid)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%s",
+                               array(bigintval($uid)), __FILE__, __LINE__);
                        $REMOVED += SQL_AFFECTEDROWS();
                }
                 else
index 6c40330..eea9b4f 100644 (file)
@@ -66,7 +66,7 @@ foreach ($ACTIONS as $act) {
        $cnt = 1;
        while (list($id) = SQL_FETCHROW($result_fix)) {
                // Fix weight
-               $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort=%s WHERE id=%s LIMIT 1",
+               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort=%s WHERE id=%s LIMIT 1",
                        array($cnt, $id), __FILE__, __LINE__);
                $REP += SQL_AFFECTEDROWS();
 
index faff373..f382278 100644 (file)
@@ -49,7 +49,7 @@ while(list($id, $act) = SQL_FETCHROW($result_fix)) {
        $ACTIONS[] = $act;
 
        // Fix weight
-       $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort=%s WHERE id=%s LIMIT 1",
+       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort=%s WHERE id=%s LIMIT 1",
                array($cnt, $id), __FILE__, __LINE__);
        $REP += SQL_AFFECTEDROWS();
 
@@ -57,7 +57,7 @@ while(list($id, $act) = SQL_FETCHROW($result_fix)) {
        $cnt++;
 }
 // Set logout weight to 999
-$result_sort = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__);
+SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__);
 
 // Now sort every each menu
 foreach ($ACTIONS as $act) {
@@ -66,7 +66,7 @@ foreach ($ACTIONS as $act) {
        $cnt = 1;
        while (list($id) = SQL_FETCHROW($result_fix)) {
                // Fix weight
-               $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort=%s WHERE id=%s LIMIT 1",
+               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort=%s WHERE id=%s LIMIT 1",
                        array($cnt, $id), __FILE__, __LINE__);
                $REP += SQL_AFFECTEDROWS();
 
index 8d8e5de..1df771d 100644 (file)
@@ -57,7 +57,7 @@ if (!empty($_POST['theme'])) {
                        include($file);
 
                        // Register it ith the exchange
-                       $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_themes` (`theme_path`, `theme_active`, `theme_ver`, `theme_name`)
+                       SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_themes` (`theme_path`, `theme_active`, `theme_ver`, `theme_name`)
 VALUES ('%s','N','%s','%s')",
                                array($_POST['theme'], $THEME_VERSION, $THEME_NAME), __FILE__, __LINE__);
 
index 9419a62..55e09e7 100644 (file)
@@ -93,7 +93,7 @@ LIMIT 1",
                                        // Check for bonus extension version >= 0.4.4 for the order bonus
                                        if ((GET_EXT_VERSION("bonus") >= "0.4.4") && (getConfig('bonus_active') == "Y")) {
                                                // Add points directly
-                                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET bonus_order=bonus_order+".getConfig('bonus_order')." WHERE userid=%s LIMIT 1",
+                                               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__);
 
                                                // Subtract bonus points from system
@@ -107,7 +107,7 @@ LIMIT 1",
                                        SEND_EMAIL($DATA['sender'], MEMBER_ORDER_ACCEPTED, $msg_user);
 
                                        // Unlock selected email
-                                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='NEW' WHERE id=%s AND data_type='ADMIN' LIMIT 1",
+                                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='NEW' WHERE id=%s AND data_type='ADMIN' LIMIT 1",
                                                array($id), __FILE__, __LINE__);
                                } // END - if
                        } // END - foreach
@@ -147,7 +147,7 @@ LIMIT 1",
                                if ((empty($_POST['redirect'])) || ($_POST['redirect'] == "http://")) $_POST['redirect'] = URL;
 
                                // Redirect URL
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET url='%s', data_type='NEW' WHERE id=%s LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET url='%s', data_type='NEW' WHERE id=%s LIMIT 1",
                                        array($_POST['redirect'], $id),__FILE__, __LINE__);
 
                                // Prepare data for the row template
index b970743..0e95965 100644 (file)
@@ -103,14 +103,14 @@ ORDER BY sp.pay_name",
                        SQL_FREERESULT($result_main);
 
                        // Unlock sponsor account
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET status='CONFIRMED'
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET status='CONFIRMED'
 WHERE id='%s' AND status='PENDING' LIMIT 1",
  array($id), __FILE__, __LINE__);
 
                        // Update, if applyable, referal count and points
                        if (($refid > 0) && ($refid != $id)) {
                                // Update referal account
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data
 SET points_amount=points_amount+%s, ref_count=ref_count+1
 WHERE id='%s' LIMIT 1",
  array(getConfig('sponsor_ref_points'), bigintval($refid)), __FILE__, __LINE__);
index 88f9d52..e53914b 100644 (file)
@@ -81,7 +81,7 @@ LIMIT 1",
        $bonus = false;
        if ((GET_EXT_VERSION("sql_patches") >= "0.2.8") && (GET_EXT_VERSION("bonus") >= "0.2.1") && (getConfig('bonus_login_yn') == "Y")) {
                // Update last login if far enougth away
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
+               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
 SET last_login=UNIX_TIMESTAMP()
 WHERE userid=%s AND last_login < (UNIX_TIMESTAMP() - %s)
 LIMIT 1",
index 902efb8..333d777 100644 (file)
@@ -52,7 +52,7 @@ if (!empty($_GET['hash'])) {
                list ($uid, $email, $rid) = SQL_FETCHROW($result);
 
                // Unlock his account (but only when it is on UNCONFIRMED!)
-               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED', ref_payout=%s, user_hash=NULL WHERE user_hash='%s' AND status='UNCONFIRMED' LIMIT 1",
+               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED', ref_payout=%s, user_hash=NULL WHERE user_hash='%s' AND status='UNCONFIRMED' LIMIT 1",
                        array(getConfig('ref_payout'), $_GET['hash']), __FILE__, __LINE__);
                if (SQL_AFFECTEDROWS() == 1) {
                        $msg = LOAD_EMAIL_TEMPLATE("confirm-member", array('points' => getConfig('points_register')), bigintval($uid));
@@ -64,7 +64,7 @@ if (!empty($_GET['hash'])) {
                        if (($rid > 0) && ($rid != $uid)) {
                                // Select the referal userid
                                $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
-                                array(bigintval($rid)), __FILE__, __LINE__);
+                                       array(bigintval($rid)), __FILE__, __LINE__);
                                if (SQL_NUMROWS($result) == 1) {
                                        // Update ref counter...
                                        UPDATE_REF_COUNTER($rid);
@@ -84,8 +84,8 @@ if (!empty($_GET['hash'])) {
                                        // If version matches add ref bonus to refid's account
                                        if ((GET_EXT_VERSION("bonus") >= "0.4.4") && (getConfig('bonus_active') == "Y")) {
                                                // Add points (directly only!)
-                                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET bonus_ref=bonus_ref+%s WHERE userid=%s LIMIT 1",
-                                                array(getConfig('bonus_ref'), bigintval($rid)), __FILE__, __LINE__);
+                                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET bonus_ref=bonus_ref+%s WHERE userid=%s LIMIT 1",
+                                                       array(getConfig('bonus_ref'), bigintval($rid)), __FILE__, __LINE__);
 
                                                // Subtract points from system
                                                BONUS_POINTS_HANDLER(getConfig('bonus_ref'));
index 1cd74d3..8f8074f 100644 (file)
@@ -173,7 +173,7 @@ if (IS_MEMBER()) {
 
                        if ($login) {
                                // Update database records
-                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET total_logins=total_logins+1".$ADD." WHERE userid=%s LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET total_logins=total_logins+1".$ADD." WHERE userid=%s LIMIT 1",
                                        array($uid), __FILE__, __LINE__);
                                if (SQL_AFFECTEDROWS() == 1) {
                                        // Procedure to checking for login data
@@ -271,7 +271,7 @@ if (IS_MEMBER()) {
                if ($status == "CONFIRMED") {
                        // Ooppps, this was missing! ;-) We should update the database...
                        $NEW_PASS = GEN_PASS();
-                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET password='%s' WHERE userid=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET password='%s' WHERE userid=%s LIMIT 1",
                                array(generateHash($NEW_PASS), $uid), __FILE__, __LINE__);
 
                        // Prepare data and message for email
index 7fe0bf2..c44257b 100644 (file)
@@ -229,7 +229,7 @@ if ((isset($_POST['ok'])) && ((!$FAILED) || (IS_ADMIN()))) {
        // Create user's account... //
        //////////////////////////////
        //
-       $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_user_data` (gender, surname, family, street_nr,%s, zip, city, email, birth_day, birth_month, birth_year, password, max_mails, receive_mails, refid, status, user_hash, REMOTE_ADDR, joined, last_update".$ADD1.")
+       SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_user_data` (gender, surname, family, street_nr,%s, zip, city, email, birth_day, birth_month, birth_year, password, max_mails, receive_mails, refid, status, user_hash, REMOTE_ADDR, joined, last_update".$ADD1.")
 VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONFIRMED','%s','%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()".$ADD2.")",
        array(
                $countryRow,
@@ -275,7 +275,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
                // Add only when the line was not found (maybe some more secure?)
                $locked = "points";
                if (getConfig('ref_payout') > 0) $locked = "locked_points"; // Pay him later. First he has to confirm some mails!
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid, ref_depth, ".$locked.") VALUES (%s,0,'%s')",
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid, ref_depth, ".$locked.") VALUES (%s,0,'%s')",
                 array(bigintval($userid), getConfig('points_register')), __FILE__, __LINE__);
 
                // Update mediadata as well
@@ -290,7 +290,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
                foreach ($_POST['cat'] as $cat => $joined) {
                        if ($joined == "Y") {
                                // Insert category entry
-                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_cats (userid, cat_id) VALUES (%s, %s)",
+                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_cats (userid, cat_id) VALUES (%s, %s)",
                                 array(bigintval($userid), bigintval($cat)), __FILE__, __LINE__);
                        } // END - if
                } // END - foreach
index 895e228..e185ae8 100644 (file)
@@ -78,7 +78,7 @@ LIMIT 1", array($_GET['hash']), __FILE__, __LINE__);
                // Unconfirmed account or changed email address?
                if ($SPONSOR['status'] == "UNCONFIRMED") {
                        // Set account to pending
-                       $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET status='PENDING'
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET status='PENDING'
 WHERE id='%s' AND hash='%s' AND status='UNCONFIRMED' LIMIT 1",
  array(bigintval($SPONSOR['id']), $_GET['hash']), __FILE__, __LINE__);
 
@@ -99,7 +99,7 @@ WHERE id='%s' AND hash='%s' AND status='UNCONFIRMED' LIMIT 1",
                        }
                } elseif ($SPONSOR['status'] == "EMAIL") {
                        // Changed email adress need to be confirmed
-                       $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET status='CONFIRMED'
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET status='CONFIRMED'
 WHERE id='%s' AND hash='%s' AND status='EMAIL' LIMIT 1",
  array(bigintval($SPONSOR['id']), $_GET['hash']), __FILE__, __LINE__);
 
@@ -198,7 +198,7 @@ WHERE email='%s' AND id='%s' AND status='CONFIRMED' LIMIT 1",
                        SEND_EMAIL($_POST['email'], SPONSOR_LOST_PASSWORD_SUBJ, $msg_sponsor);
 
                        // Update password
-                       $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET password='%s'
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET password='%s'
 WHERE id='%s' LIMIT 1",
  array(md5($SPONSOR['password']), bigintval($SPONSOR['id'])), __FILE__, __LINE__);
 
index ecbbe17..61446af 100644 (file)
@@ -104,11 +104,11 @@ if (isset($_POST['ok']))
         else
        {
                // Everything went okay so let's store his request and send mails
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_holidays (userid, holiday_start, holiday_end, comments) VALUES ('%s','%s','%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_holidays (userid, holiday_start, holiday_end, comments) VALUES ('%s','%s','%s','%s')",
                 array($GLOBALS['userid'], $START, $END, $_POST['comments']), __FILE__, __LINE__);
 
                // Activate holiday system
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
+               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
 SET holiday_active='N', holiday_activated=UNIX_TIMESTAMP()
 WHERE userid=%s LIMIT 1",
                 array($GLOBALS['userid']), __FILE__, __LINE__);
@@ -129,7 +129,7 @@ WHERE userid=%s LIMIT 1",
                SEND_ADMIN_NOTIFICATION(HOLIDAY_ADMIN_SUBJECT, "admin_holiday_request", $_POST['comments'], $GLOBALS['userid']);
 
                // Create task
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','HOLIDAY_REQUEST','%s','%s', UNIX_TIMESTAMP())",
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','HOLIDAY_REQUEST','%s','%s', UNIX_TIMESTAMP())",
                 array($GLOBALS['userid'], HOLIDAY_ADMIN_SUBJECT, $msg), __FILE__, __LINE__);
 
                // Display message
@@ -162,12 +162,12 @@ WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
                        define('__HOLIDAY_END'  , MAKE_DATETIME($end  , "3"));
 
                        // Deactivate it now
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
 SET holiday_active='N', holiday_activated='0'
 WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
 
                        // Remove entry
-                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays
 WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
 
                        // Send email to admin
@@ -228,7 +228,7 @@ WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
                                SQL_FREERESULT($result);
 
                                // Remove entry and reload URL
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
 SET holiday_active='N'
 WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
                                LOAD_URL("modules.php?module=login&amp;what=holiday");
index 319f3cc..c961f04 100644 (file)
@@ -49,8 +49,8 @@ ADD_DESCR("member", __FILE__);
 if (isset($_POST['ok']))
 {
        // Save settings
-       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET html='%s' WHERE userid=%s LIMIT 1",
-        array($_POST['html'], $GLOBALS['userid']), __FILE__, __LINE__);
+       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET html='%s' WHERE userid=%s LIMIT 1",
+               array($_POST['html'], $GLOBALS['userid']), __FILE__, __LINE__);
        LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_SETTINGS_SAVED);
 }
  else
index 185681b..d874b3b 100644 (file)
@@ -229,7 +229,7 @@ case "save": // Save entered data
                        if (EXT_IS_ACTIVE("country"))
                        {
                                // New way
-                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET
+                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET
 gender='%s', surname='%s', family='%s',
 street_nr='%s',
 country_code=%s, zip=%s, city='%s',
@@ -260,7 +260,7 @@ array(
                         else
                        {
                                // Old way
-                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET
+                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET
 gender='%s', surname='%s', family='%s',
 street_nr='%s',
 country='%s', zip=%s, city='%s',
@@ -304,7 +304,7 @@ array(
        break;
 
 case "notify": // Switch off notfication
-       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
+       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
         array($GLOBALS['userid']), __FILE__, __LINE__);
        $URL = URL."/modules.php?module=login&amp;what=welcome&msg=".urlencode(PROFILE_UPDATED);
        break;
index 8868b04..d089725 100644 (file)
@@ -57,14 +57,14 @@ define('__CHARGE_VALUE', TRANSLATE_COMMA(getConfig('nl_charge')));
 if ((isset($_POST['ok'])) && ($status == "Y") && ($span == "0"))
 {
        // Save request
-       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nl_timespan='".(getConfig('one_day') * 30)."' WHERE userid=%s LIMIT 1",
-        array($GLOBALS['userid']), __FILE__, __LINE__);
+       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nl_timespan='".(getConfig('one_day') * 30)."' WHERE userid=%s LIMIT 1",
+               array($GLOBALS['userid']), __FILE__, __LINE__);
 
        // Load admin message
        $admin_msg = LOAD_EMAIL_TEMPLATE("admin_newsletter_request", array(), $GLOBALS['userid']);
 
        // Add task
-       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, status, task_type, subject, text, task_created, userid)
+       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, status, task_type, subject, text, task_created, userid)
 VALUES ('0','NEW','NL_UNSUBSCRIBE','".ADMIN_NL_SUBJECT."','".$admin_msg."', UNIX_TIMESTAMP(),'%s')", array($GLOBALS['userid']), __FILE__, __LINE__);
 
        // Send mail to member
index 0f30312..794862a 100644 (file)
@@ -64,7 +64,7 @@ if ($VALID) {
                array($_POST['nickname'], $GLOBALS['userid']), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Nickname not in use, so set it now
-               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nickname='%s' WHERE userid=%s LIMIT 1",
+               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nickname='%s' WHERE userid=%s LIMIT 1",
                        array($_POST['nickname'], $GLOBALS['userid']), __FILE__, __LINE__);
                $content = NICKNAME_SAVED;
        } else {
index 2d0917b..b9593df 100644 (file)
@@ -247,7 +247,7 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME
                        $MAX_SEND = count($TEST);
 
                        // Update receiver list
-                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET receive_mails=receive_mails-1 WHERE userid IN (%s) LIMIT %s",
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET receive_mails=receive_mails-1 WHERE userid IN (%s) LIMIT %s",
                                array(str_replace(";", ", ", $RECEIVER), $MAX_SEND), __FILE__, __LINE__);
 
                        // Is calculated max receivers larger than wanted receivers then reset it
@@ -268,7 +268,7 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME
                                        $id = 0;
                                        if (EXT_IS_ACTIVE("html_mail")) {
                                                // HTML extension is active
-                                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_pool (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip, html_msg)
+                                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_pool (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip, html_msg)
  VALUES ('%s','%s','%s','%s','%s','TEMP','%s','%s','%s','%s','%s','%s')",
 array(
        $GLOBALS['userid'],
@@ -285,7 +285,7 @@ array(
 ), __FILE__, __LINE__);
                                        } else {
                                                // No HTML extension is active
-                                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_pool (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip)
+                                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_pool (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip)
  VALUES ('%s','%s','%s','%s','%s','TEMP','%s','%s','%s','%s','%s')",
 array(
        $GLOBALS['userid'],
@@ -304,7 +304,7 @@ array(
                                        // Change current order
                                        if (EXT_IS_ACTIVE("html_mail")) {
                                                // HTML extension is active
-                                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET
+                                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET
 subject='%s',
 text='%s',
 receivers='%s',
@@ -330,7 +330,7 @@ array(
 ), __FILE__, __LINE__);
                                        } else {
                                                // No HTML extension is active
-                                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET
+                                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET
 subject='%s',
 text='%s',
 receivers='%s',
index 8fbcba6..88dbcc9 100644 (file)
@@ -202,7 +202,7 @@ ORDER BY p.payout_timestamp DESC",
                                if ($allow == "Y")
                                {
                                        // Banner/textlink ordered
-                                       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_payouts (userid, payout_total, payout_id, payout_timestamp, status, target_url, link_text, banner_url)
+                                       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_payouts (userid, payout_total, payout_id, payout_timestamp, status, target_url, link_text, banner_url)
 VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')",
  array(
        $GLOBALS['userid'],
@@ -227,7 +227,7 @@ VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')",
                                 else
                                {
                                        // e-currency payout requested
-                                       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_payouts (userid, payout_total, target_account, target_bank, payout_id, payout_timestamp, status, password)
+                                       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_payouts (userid, payout_total, target_account, target_bank, payout_id, payout_timestamp, status, password)
 VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')",
  array(
        $GLOBALS['userid'],
@@ -249,7 +249,7 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')",
                                }
 
                                // Generate task
-                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, status, task_type, subject, text, task_created, userid)
+                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, status, task_type, subject, text, task_created, userid)
 VALUES (0, 'NEW','PAYOUT_REQUEST','[payout:] ".PAYOUT_REQUEST_ADMIN."','%s', UNIX_TIMESTAMP(), %s)",
  array(
        $msg_adm,
index ae24e03..5889898 100644 (file)
@@ -197,7 +197,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) {
                                        SUB_POINTS("primera_payout", $GLOBALS['userid'], $_POST['amount']);
 
                                        // Update primera nickname
-                                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `primera_userid`=%s WHERE userid=%s LIMIT 1",
+                                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `primera_userid`=%s WHERE userid=%s LIMIT 1",
                                                array($_POST['primera_nickname'], $GLOBALS['userid']), __FILE__, __LINE__);
 
                                        // All done!
index 1e89808..13cc548 100644 (file)
@@ -71,7 +71,7 @@ if ((!isset($_POST['ok'])) || (empty($_POST['qsummary']))) {
        SEND_EMAIL($GLOBALS['userid'], $subj_m, $msg_m);
 
        // Drop a message in the admin's area
-       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','SUPPORT_MEMBER','%s','%s', UNIX_TIMESTAMP())",
+       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','SUPPORT_MEMBER','%s','%s', UNIX_TIMESTAMP())",
                array($GLOBALS['userid'], $subj_a, $_POST['qsummary'].":".array('text' => $_POST['qdetails'])), __FILE__, __LINE__);
 
        // Form sent
index ca19069..6256909 100644 (file)
@@ -47,8 +47,8 @@ ADD_DESCR("member", __FILE__);
 
 if (!empty($_POST['member_theme'])) {
        // Save theme to member's profile
-       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET curr_theme='%s' WHERE userid=%s LIMIT 1",
-         array($_POST['member_theme'], $GLOBALS['userid']), __FILE__, __LINE__);
+       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET curr_theme='%s' WHERE userid=%s LIMIT 1",
+               array($_POST['member_theme'], $GLOBALS['userid']), __FILE__, __LINE__);
 
        // Set new theme for guests
        $newTheme = SQL_ESCAPE($_POST['member_theme']);
index 5d1670b..06406df 100644 (file)
@@ -184,10 +184,10 @@ case "new": // Start new transfer
                        define('__TRANS_ID', bigintval(GEN_RANDOM_CODE("10", mt_rand(0, 99999), $GLOBALS['userid'], $_POST['reason'])));
 
                        // Add entries to both tables
-                       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_transfers_in (userid, from_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
+                       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_transfers_in (userid, from_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
                                array(bigintval($_POST['to_uid']), $GLOBALS['userid'], bigintval($_POST['points']), $_POST['reason'], __TRANS_ID),
                                __FILE__, __LINE__);
-                       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_transfers_out (userid, to_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
+                       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_transfers_out (userid, to_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
                                array($GLOBALS['userid'], bigintval($_POST['to_uid']), bigintval($_POST['points']), $_POST['reason'], __TRANS_ID),
                                __FILE__, __LINE__);
 
@@ -554,8 +554,8 @@ case "": // Overview page
 
        if (isset($_POST['ok'])) {
                // Save settings
-               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET opt_in='%s' WHERE userid=%s LIMIT 1",
-                array($_POST['opt_in'], $GLOBALS['userid']), __FILE__, __LINE__);
+               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET opt_in='%s' WHERE userid=%s LIMIT 1",
+                       array($_POST['opt_in'], $GLOBALS['userid']), __FILE__, __LINE__);
 
                // Rember for next switch() command
                $opt_in = $_POST['opt_in'];
index 1773a61..c6e74e4 100644 (file)
@@ -235,7 +235,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) {
                                                ADD_POINTS_REFSYSTEM("wernis_withdraw", $GLOBALS['userid'], bigintval($_POST['amount']), false, 0, false, "direct");
 
                                                // Update the user data as well..
-                                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
+                                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
                                                        array(bigintval($_POST['wds66_id']), $GLOBALS['userid']), __FILE__, __LINE__);
 
                                                // All done!
@@ -270,7 +270,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) {
                                                SUB_POINTS("wernis_payout", $GLOBALS['userid'], $_POST['amount']);
 
                                                // Update WDS66 id
-                                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
+                                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
                                                        array(bigintval($_POST['wds66_id']), $GLOBALS['userid']), __FILE__, __LINE__);
 
                                                // All done!
index 0b3a5a4..8df4615 100644 (file)
@@ -63,20 +63,20 @@ if (empty($URL)) {
        }
 
        // Update sending pool
-       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='%s' WHERE id=%s AND sender=%s AND data_type='TEMP' LIMIT 1",
-        array($type, bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__);
+       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='%s' WHERE id=%s AND sender=%s AND data_type='TEMP' LIMIT 1",
+               array($type, bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__);
 
        // Finally is the entry valid?
        if (SQL_AFFECTEDROWS() == 1) {
                // Load personal data...
                $result = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
-                array($GLOBALS['userid']), __FILE__, __LINE__);
+                       array($GLOBALS['userid']), __FILE__, __LINE__);
                list($gender, $sname, $fname, $email) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
                // Load mail again...              0       1        2           3          4      5      6         7
                $result = SQL_QUERY_ESC("SELECT subject, text, receivers, payment_id, timestamp, url, cat_id, target_send FROM "._MYSQL_PREFIX."_pool WHERE id=%s AND sender=%s LIMIT 1",
-                array(bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__);
+                       array(bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__);
                $DATA = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
                if (empty($DATA[0])) $DATA[0] = DEFAULT_SUBJECT_LINE;
index 85107a4..19172f1 100644 (file)
@@ -46,18 +46,15 @@ if (($CSS == 1) || (!defined('__DAILY_RESET'))) return;
 // Get current month (2 digits)
 $curr = date("m", time());
 
-if (getConfig('last_month') != $curr)
-{
+if (getConfig('last_month') != $curr) {
        // Check for unsubscribed members
        $result = SQL_QUERY("SELECT userid, nl_until FROM `"._MYSQL_PREFIX."_user_data` WHERE nl_receive='N' ORDER BY userid", __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) > 0)
-       {
+       if (SQL_NUMROWS($result) > 0) {
                // Some unsubscriptions are found so we reset them to receive newsletters
-               while(list($uid, $until) = SQL_FETCHROW($result))
-               {
+               while(list($uid, $until) = SQL_FETCHROW($result)) {
                        // Update account
-                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nl_receive='Y', nl_until='0' WHERE userid=%s LIMIT 1",
-                        array(bigintval($uid)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nl_receive='Y', nl_until='0' WHERE userid=%s LIMIT 1",
+                               array(bigintval($uid)), __FILE__, __LINE__);
 
                        // Send email to him
                        $msg = LOAD_EMAIL_TEMPLATE("member_newsletter_reset", true, bigintval($uid));
index 7a4e983..0e2b0ce 100644 (file)
@@ -160,12 +160,12 @@ function CHECK_MODULE ($mod) {
                        if (GET_EXT_VERSION("sql_patches") >= "0.3.6") {
                                // Since 0.3.6 we have a has_menu column, this took me a half hour
                                // to find a loop here... *sigh*
-                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_mod_reg
+                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_mod_reg
 (module, locked, hidden, mem_only, admin_only, has_menu) VALUES
 ('%s','Y','N','N','N','N')", array($mod_chk), __FILE__, __LINE__);
                        } else {
                                // Wrong/missing sql_patches!
-                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_mod_reg
+                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_mod_reg
 (module, locked, hidden, mem_only, admin_only) VALUES
 ('%s','Y','N','N','N')", array($mod_chk), __FILE__, __LINE__);
                        }
@@ -678,20 +678,20 @@ function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false)
        if (($MODE != "admin") && ($UPDATE))
        {
                // 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",
-                array($MODE, $act, $wht), __FILE__, __LINE__, false);
+               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), __FILE__, __LINE__, false);
        }
         elseif ($wht != "overview")
        {
                // Other actions
                $SQL = SQL_QUERY_ESC("SELECT id, what FROM "._MYSQL_PREFIX."_%s_menu WHERE action='%s'".$ADD." ORDER BY action DESC LIMIT 1",
-                array($MODE, $act), __FILE__, __LINE__, false);
+                       array($MODE, $act), __FILE__, __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",
-                array($MODE, $act), __FILE__, __LINE__, false);
+                       array($MODE, $act), __FILE__, __LINE__, false);
        }
 
        // Run SQL command
@@ -871,7 +871,7 @@ function SEND_MODE_MAILS($mod, $modes)
 function COUNT_MODULE($mod) {
        if ($mod != "css") {
                // Do count all other modules but not accesses on CSS file css.php!
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mod_reg SET clicks=clicks+1 WHERE module='%s' LIMIT 1",
+               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mod_reg SET clicks=clicks+1 WHERE module='%s' LIMIT 1",
                        array($mod), __FILE__, __LINE__);
        } // END - if
 }
@@ -1017,7 +1017,7 @@ function REMOVE_RECEIVER (&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=fa
                        if (SQL_NUMROWS($result) == 0)
                        {
                                // No, so we add one!
-                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_links (%s, userid, link_type) VALUES ('%s','%s','%s')",
+                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_links (%s, userid, link_type) VALUES ('%s','%s','%s')",
                                 array($rowName, $stats_id, bigintval($uid), $type), __FILE__, __LINE__);
                                $ret = "done";
                        }
@@ -1190,7 +1190,7 @@ function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify=false, $rid
                        // No entry updated?
                        if (SQL_AFFECTEDROWS() < 1) {
                                // First ref in this level! :-)
-                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid,ref_depth,%s) VALUES (%s,'%s',%s)",
+                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid,ref_depth,%s) VALUES (%s,'%s',%s)",
                                        array($data, bigintval($uid), bigintval($GLOBALS['ref_level']), $ref_points), __FILE__, __LINE__);
                                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - INSERTED! (".SQL_AFFECTEDROWS().")<br />\n";
                        } // END - if
@@ -1255,14 +1255,14 @@ function UPDATE_REF_COUNTER ($uid) {
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$cacheArray['ref_level'][$uid]}<br />\n";
 
        // Update counter
-       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refsystem SET counter=counter+1 WHERE userid=%s AND level='%s' LIMIT 1",
+       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refsystem SET counter=counter+1 WHERE userid=%s AND level='%s' LIMIT 1",
                array(bigintval($uid), $cacheArray['ref_level'][$uid]), __FILE__, __LINE__);
 
        // When no entry was updated then we have to create it here
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):updated=".SQL_AFFECTEDROWS()."<br />\n";
        if (SQL_AFFECTEDROWS() < 1) {
                // First count!
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_refsystem (userid, level, counter) VALUES (%s,%s,1)",
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_refsystem (userid, level, counter) VALUES (%s,%s,1)",
                        array(bigintval($uid), $cacheArray['ref_level'][$uid]), __FILE__, __LINE__);
                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid}<br />\n";
        } // END - if
@@ -1545,7 +1545,7 @@ WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
                SQL_FREERESULT($result);
 
                // Delete points entries as well
-               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_points WHERE userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
+               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_points WHERE userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
 
                // Update mediadata as well
                if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
@@ -1558,12 +1558,12 @@ WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
        }
 
        // Delete category selections as well...
-       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%s",
+       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%s",
         array(bigintval($uid)), __FILE__, __LINE__);
 
        // Remove from rallye if found
        if (EXT_IS_ACTIVE("rallye")) {
-               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE userid=%s",
+               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE userid=%s",
                 array(bigintval($uid)), __FILE__, __LINE__);
        }
 
@@ -1572,7 +1572,7 @@ WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
        SEND_EMAIL($uid, ADMIN_DEL_ACCOUNT, $msg);
 
        // Ok, delete the account!
-       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
+       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
 }
 //
 function META_DESCRIPTION ($mod, $wht) {
@@ -1595,13 +1595,13 @@ function ADD_JACKPOT($points) {
        $result = SQL_QUERY("SELECT points FROM "._MYSQL_PREFIX."_jackpot WHERE ok='ok' LIMIT 1", __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Create line
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_jackpot (ok, points) VALUES ('ok','%s')", array($points), __FILE__, __LINE__);
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_jackpot (ok, points) VALUES ('ok','%s')", array($points), __FILE__, __LINE__);
        } else {
                // Free memory
                SQL_FREERESULT($result);
 
                // Update points
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_jackpot SET points=points+%s WHERE ok='ok' LIMIT 1",
+               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_jackpot SET points=points+%s WHERE ok='ok' LIMIT 1",
                        array($points), __FILE__, __LINE__);
        }
 }
@@ -1698,7 +1698,7 @@ function GET_WHAT($modCheck) {
 // Subtract points from database and mediadata cache
 function SUB_POINTS ($subject, $uid, $points) {
        // Add points to used points
-       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `used_points`=`used_points`+%s WHERE userid=%s LIMIT 1",
+       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `used_points`=`used_points`+%s WHERE userid=%s LIMIT 1",
         array($points, bigintval($uid)), __FILE__, __LINE__);
 
        // Insert booking record
@@ -1895,7 +1895,7 @@ function ADD_BONUS_MAIL_TO_QUEUE ($subject, $text, $receiverList, $points, $seco
                if ($mode == "html") $HTML = "Y";
 
                // Add HTML mail
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus
 (subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, html_msg)
 VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s','%s')",
  array(
@@ -1912,7 +1912,7 @@ VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s','%s
 ), __FILE__, __LINE__);
        } else {
                // Add regular mail
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus
 (subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent)
 VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s')",
  array(
index 078a221..0d93da0 100644 (file)
@@ -65,7 +65,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                        $DATA['url'] = COMPILE_CODE($DATA['url']);
 
                        // Message is active in queue
-                       $result_queue = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='QUEUE' WHERE id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='QUEUE' WHERE id=%s LIMIT 1",
                                array(bigintval($DATA['id'])), __FILE__, __LINE__);
 
                        // "Explode" all receivers into an array
@@ -129,7 +129,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
 
                                                if (GET_EXT_VERSION("user") >= "0.1.4") {
                                                        // Update mails received for receiver
-                                                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
+                                                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
                                                                array(bigintval($uid)), __FILE__, __LINE__);
                                                } // END - if
 
@@ -159,7 +159,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                        //* DEBUG: */ echo "-L:".__LINE__."/".SELECTION_COUNT($dummy)."-<br />";
                        if (SELECTION_COUNT($dummy) == 0) {
                                // Queue reached!
-                               $result_done = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='SEND', target_send='0', receivers='' WHERE id=%s LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='SEND', target_send='0', receivers='' WHERE id=%s LIMIT 1",
                                        array(bigintval($DATA['id'])), __FILE__, __LINE__);
                                //* DEBUG: */ echo "*L:".__LINE__."*<br />";
 
@@ -171,8 +171,8 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                } // END - if
                        } elseif ($GLOBALS['pool_cnt'] >= getConfig('max_send')) {
                                // Update bonus pool
-                               $result_done = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='NEW', target_send=%s, receivers='%s' WHERE id=%s LIMIT 1",
-                                array(SELECTION_COUNT($dummy), implode(";", $dummy), bigintval($DATA['id'])), __FILE__, __LINE__);
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='NEW', target_send=%s, receivers='%s' WHERE id=%s LIMIT 1",
+                                       array(SELECTION_COUNT($dummy), implode(";", $dummy), bigintval($DATA['id'])), __FILE__, __LINE__);
                                //* DEBUG: */ echo "*L:".__LINE__."<PRE>";
                                //* DEBUG: */ print_r($dummy);
                                //* DEBUG: */ echo "</PRE>\n!!!<br />";
index abdb16f..12afa10 100644 (file)
@@ -61,7 +61,7 @@ if (SQL_NUMROWS($result_main) > 0) {
        // Parse all mails
        while ($DATA = SQL_FETCHROW($result_main)) {
                // Set mail order as "active". That means it will be sent out
-               $result_active = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='ACTIVE' WHERE id=%s AND data_type='NEW' LIMIT 1",
+               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='ACTIVE' WHERE id=%s AND data_type='NEW' LIMIT 1",
                        array($DATA[0]), __FILE__, __LINE__);
 
                // Check fetched data for HTML
@@ -109,7 +109,7 @@ if (SQL_NUMROWS($result_main) > 0) {
                                        //* DEBUG: */ echo "!L:".__LINE__."/".SQL_NUMROWS($result_stats)."!<br />";
                                        if (SQL_NUMROWS($result_stats) == 0) {
                                                // No entry was found, so we add him!
-                                               $result_stats = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_stats (pool_id , userid, cat_id, payment_id, subject, url , max_rec , timestamp_ordered, timestamp_sstart) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())",
+                                               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_stats (pool_id , userid, cat_id, payment_id, subject, url , max_rec , timestamp_ordered, timestamp_sstart) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())",
                                                        array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[9]), bigintval($DATA[5]), $DATA[2], $DATA[7], $DATA[8], bigintval($DATA[6])), __FILE__, __LINE__);
 
                                                // Receive it's ID for the links table
@@ -156,12 +156,12 @@ if (SQL_NUMROWS($result_main) > 0) {
                                                        SEND_EMAIL($email, $DATA[2], $mailText, $HTML);
 
                                                        // Count sent mails...
-                                                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_sent=emails_sent+1 WHERE userid=%s LIMIT 1",
+                                                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_sent=emails_sent+1 WHERE userid=%s LIMIT 1",
                                                                array(bigintval($DATA[1])), __FILE__, __LINE__);
 
                                                        if (GET_EXT_VERSION("user") >= "0.1.4") {
                                                                // Update mails received for receiver
-                                                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
+                                                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
                                                                        array(bigintval($uid)), __FILE__, __LINE__);
                                                        } // END - if
 
@@ -220,11 +220,11 @@ if (SQL_NUMROWS($result_main) > 0) {
                                                SQL_FREERESULT($result_sender);
 
                                                // Set status to SEND because we completely send it away
-                                               $result_done = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='SEND', target_send='0', receivers='' WHERE id=%s LIMIT 1",
+                                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='SEND', target_send='0', receivers='' WHERE id=%s LIMIT 1",
                                                        array(bigintval($DATA[0])), __FILE__, __LINE__);
 
                                                // Update send-completed-time
-                                               $result_user = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_stats SET timestamp_send=UNIX_TIMESTAMP() WHERE pool_id=%s LIMIT 1",
+                                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_stats SET timestamp_send=UNIX_TIMESTAMP() WHERE pool_id=%s LIMIT 1",
                                                        array(bigintval($DATA[0])), __FILE__, __LINE__);
 
                                                $LAST_SENT_ID = $DATA[0]; $GLOBALS['pool_cnt'] = 0;
@@ -245,7 +245,7 @@ if (SQL_NUMROWS($result_main) > 0) {
                                                // There are some mails left to send for next round, so we reset the status back to NEW (=still not fully delivered)
                                                $ADD = "";
                                                if ($GLOBALS['pool_cnt'] <= $DATA[8]) $ADD = ", target_send=target_send-".$GLOBALS['pool_cnt'];
-                                               $result_queue = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='NEW', receivers='%s'".$ADD." WHERE id=%s LIMIT 1",
+                                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='NEW', receivers='%s'".$ADD." WHERE id=%s LIMIT 1",
                                                 array(implode(";", $dummy), bigintval($DATA[0])), __FILE__, __LINE__);
 
                                                //* DEBUG: */ echo"*EXIT/L:".__LINE__."*<br />";
@@ -258,7 +258,7 @@ if (SQL_NUMROWS($result_main) > 0) {
                                        // User does not exists so we have add the sender's points back to sender's account
                                        if (($RECEIVERS[0] == "0") || (empty($RECEIVERS[0]))) {
                                                // List was empty
-                                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='SEND' WHERE id=%s LIMIT 1",
+                                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='SEND' WHERE id=%s LIMIT 1",
                                                 array(bigintval($DATA[0])), __FILE__, __LINE__);
                                        } else {
                                                // Is the userid set?
@@ -279,8 +279,8 @@ if (SQL_NUMROWS($result_main) > 0) {
                                        unset($dummy[$key]);
 
                                        // Update receivers
-                                       $result_queue = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET receivers='%s' WHERE id=%s LIMIT 1",
-                                        array(implode(";", $dummy), bigintval($DATA[0])), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET receivers='%s' WHERE id=%s LIMIT 1",
+                                               array(implode(";", $dummy), bigintval($DATA[0])), __FILE__, __LINE__);
                                }
                        }
                }
index 417ad61..cad1433 100644 (file)
@@ -70,8 +70,8 @@ ORDER BY userid", array(getConfig('profile_update'), getConfig('resend_profile_u
                        SEND_EMAIL($DATA[1], PROFILE_OUTDATED, $msg);
 
                        // Update profile data
-                       $result_update = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET last_profile_sent=UNIX_TIMESTAMP(), notified='Y' WHERE userid=%s LIMIT 1",
-                        array(bigintval($DATA[0])), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET last_profile_sent=UNIX_TIMESTAMP(), notified='Y' WHERE userid=%s LIMIT 1",
+                               array(bigintval($DATA[0])), __FILE__, __LINE__);
                }
        }
 
index d2b5f92..b289fb5 100644 (file)
@@ -72,8 +72,9 @@ WHERE userid=%s AND locked_points != 0.00000 ORDER BY ref_depth",
                        while (list($dep, $locked) = SQL_FETCHROW($result_points))
                        {
                                //* DEBUG: */ echo basename(__FILE__).":uid={$uid},depth={$dep},locked={$locked}<br />\n";
-                               $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s, locked_points=0.00000
-WHERE userid=%s AND ref_depth=%d LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s, locked_points=0.00000
+WHERE userid=%s AND ref_depth=%d
+LIMIT 1",
                                 array($locked, bigintval($uid), $dep), __FILE__, __LINE__);
 
                                // Update mediadata as well
index 3048ee5..1881d7f 100644 (file)
@@ -71,8 +71,9 @@ WHERE userid=%s AND holiday_start <= UNIX_TIMESTAMP() AND holiday_end > UNIX_TIM
                        SEND_EMAIL($uid, HOLIDAY_MEMBER_ACTIVATED, $msg);
 
                        // Update account
-                       $result_update = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET holiday_active='Y'
-WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET holiday_active='Y'
+WHERE userid=%s
+LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
                }
 
                // Free memory
index 77ad76a..f47523f 100644 (file)
@@ -50,8 +50,8 @@ if (SQL_NUMROWS($result_bonus) > 0) {
        // We found some mail orders...
        while(list($id, $uid, $subj, $stamp, $clicks, $url) = SQL_FETCHROW($result_bonus)) {
                // Add points
-               $result_points = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET bonus_stats=bonus_stats+%s WHERE userid=%s LIMIT 1",
-                array(getConfig('bonus_stats'), bigintval($uid)), __FILE__, __LINE__);
+               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET bonus_stats=bonus_stats+%s WHERE userid=%s LIMIT 1",
+                       array(getConfig('bonus_stats'), bigintval($uid)), __FILE__, __LINE__);
 
                // Prepare array
                $content = array(
index f95e1af..27da0b7 100644 (file)
@@ -118,7 +118,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
 
                                        if ($status == "CONFIRMED") {
                                                // Update last activity
-                                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET last_online=UNIX_TIMESTAMP(), last_module='mailid_top' WHERE userid=%s LIMIT 1",
+                                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET last_online=UNIX_TIMESTAMP(), last_module='mailid_top' WHERE userid=%s LIMIT 1",
                                                        array($url_uid), __FILE__, __LINE__);
 
                                                // User has confirmed his account so we can procede...
@@ -173,7 +173,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                                        switch ($ltype)
                                                                        {
                                                                        case "NORMAL":
-                                                                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_stats SET clicks=clicks + 1 WHERE id=%s LIMIT 1",
+                                                                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_stats SET clicks=clicks + 1 WHERE id=%s LIMIT 1",
                                                                                        array($url_mid), __FILE__, __LINE__);
 
                                                                                // Update mediadata as well
@@ -185,7 +185,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                                                break;
 
                                                                        case "BONUS":
-                                                                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET clicks=clicks + 1 WHERE id=%s LIMIT 1",
+                                                                               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET clicks=clicks + 1 WHERE id=%s LIMIT 1",
                                                                                        array($url_bid), __FILE__, __LINE__);
 
                                                                                // Update mediadata as well
@@ -232,7 +232,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                                                } // END - if
 
                                                                                // Count down ref_payout value
-                                                                               $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET ref_payout=ref_payout-1 WHERE userid=%s AND ref_payout > 0 LIMIT 1",
+                                                                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET ref_payout=ref_payout-1 WHERE userid=%s AND ref_payout > 0 LIMIT 1",
                                                                                        array($url_uid), __FILE__, __LINE__);
 
                                                                                // Add points
@@ -276,7 +276,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                                        }
 
                                                                        // Remove link from table
-                                                                       $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE id=%s LIMIT 1",
+                                                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE id=%s LIMIT 1",
                                                                                array(bigintval($lid)), __FILE__, __LINE__);
                                                                        break;
 
diff --git a/ref.php b/ref.php
index ba76c41..4b34282 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -93,7 +93,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                // Is the refid valid?
                if ($ref > 0) {
                        // Update ref counter
-                       $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET ref_clicks=ref_clicks+1 WHERE userid=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET ref_clicks=ref_clicks+1 WHERE userid=%s LIMIT 1",
                                array(bigintval($ref)), __FILE__, __LINE__);
                } // END - if
        } else {
index 6993c8b..57eb0a7 100644 (file)
--- a/view.php
+++ b/view.php
@@ -53,7 +53,7 @@ if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['b
        if (SQL_NUMROWS($result) == 1)  {
                list($url) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET counter=counter+1 WHERE id=%s LIMIT 1", array(bigintval($_GET['banner'])), __FILE__, __LINE__);
+               SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET counter=counter+1 WHERE id=%s LIMIT 1", array(bigintval($_GET['banner'])), __FILE__, __LINE__);
 
                $type = substr($url, -3);
                @header ("Content-Type: image/".$type);