]> git.mxchange.org Git - mailer.git/commitdiff
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 cd4b2f6363ed08de5c4b0a734c59d61fc4f76362..531e8dbf719f7ce74c7bece01ae1c64896fad504 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 69530f99f06390558687a38c93831ba015030da6..1c71ee60db0d2fd8876519f463266abe2307d3cc 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 515a958587ba3583e8e94c20978026c9cc85c834..f5dbe4bd91d9af879dd93ce520a935c1c68f7b8a 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 060102a3986d8f7902cc0c60924ac9c109f5d8da..333467cc25810cc00877d34db8fc15e985047653 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 6b5e36b990b1d46cb854c20f0d03b69b56f898d1..a24b4c7cdc120b4dfd47def0d447b4c162b5d12f 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 33aaa9acd947c00e04142abe8295b0a8277d6a89..679bd906bc6a52de0203f98fc94bd1d4ad8c6152 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 89f4dd7d632175357da2a62c1368191fb12da49f..c523c807ac13aa255efddd5c6e7a5b6c34a8ad54 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 96124da6be91095b8d2ae3c10fa53c8818ec8459..ed61827b87dacce7a2eb4db9664e2702473382a6 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 90e902ea18809157defd66876790a59848d4a3cd..a1226d45912a847b65839644a5d2c7361f5692cc 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 f5a671d9ae25f1207df68468482ecb6a918f7594..d584f47f4b9e00918f0acd0a422b9264a7526530 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 1439e97a8c18e1e9bc0be0828af2670fdb0c3629..0e49343d0ac81b16312485f88395ff9b563964d6 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 e3b6c75f4dd44870feacac5ab55f356b3e8158a1..4cb2b00ca072997470b3ca0c0fe2c25f7a2a2be1 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 1355975dd7c81e50fe950f1a26226e73cb33d343..8ebe34f0c6a24180a9b0122cd1c194b42d9b47b7 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 7a70b794c3ed6d46c04663a60e81fbd80143c3f1..4d4d5a203f4fc1ef25a396f8a6b492263b18ef73 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 c6d3a5373b3908b798a579dd547fab13696b13b9..732d4345b1637a2eedcb262ec42681a734495c9d 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 05e121443d6f47f43a5b197b06bc1e3da185005e..b792bbbb4f978cf72c80e6650887090be8ce2c87 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 249a4e70cbd7926aa30a81dab63698bf6f110122..f557eac2c50975c82678b38e1ccd5be15d8cc9bb 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 4e1ba34bd64130805a8affad8528d15f5ae09c4d..b137dc6c33140cf47ba462f9d7dbbaa5f00e2d36 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 61ce6ab20470f0e7bb54218fd44d28eebe3deb94..a63d334d27bfecfd9346640df3a979a7f29eaefe 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 f367203b5da425cb458326a230b24e66f5e191a0..9d89121a5cb5a527236454c818aeb4b4b421da8e 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 02c0b4166336ca35043b6448801dc40e2348f711..146d92da35e577aba4044b042006d092777e1d90 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 255bca49bb76d12d43efbc207112c9b336876e1d..9e096a317e5d761be0a2ac3de513272a537c1592 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 cd8d0fb4de53ae16d9a2ebdc048185a10cefc779..551f56e4cf3877321ffe3b8e41670960e717e038 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 b0deed1830631e2ac4f3ac56b45bfbde94b9004d..499abe7e9fee74877bf93b5e78c91720c9461fcb 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 d42c6c1ba20b26e74195087c18ff25c0f9f8f16b..ff4acda10f36d43bc1c508a356d57c3b34a74e53 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 327d83bc8ef5cfab9db34f1cb644db387a69007f..2f9f64a2375d4fd31403c258a7d4979b0380f517 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 832bc5e7d851667b9dbf227eb8e492ccdbef8f9f..b3580e82c036c4f571672c8fd5b1dee06743ca0c 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 c23b1d7bfd9790564b9003c5e7772a33fa526e51..1098443155e0e2f1d82e8622de693c397a9e6393 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 860a33701c3c6f1cc7b95a9ae7da0c413861653a..2df07aa5a3341fe336803d03e1158349f9163548 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 1c30a49649e7d66e39f2f7f5fe2a8e8fd7f99c36..38bd814274fdaf32df5e7870b8188c10b01c0b30 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 5574b354e4b79b9282f954d4bbefac594eeb2f4a..65432430c4508356a5dc07e2826e8330ef56ddf0 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 d0ffeb91690c2476e8e196412d003ce17dae4a39..d5d1e97066ed3cbcf8bfe3f1cee489673d824735 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 1766d4708297e7a0e8204794be567a2ff859abf8..6672890f334258cfbbce50db8801a489feb7f48f 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 9416731ffdaa1fd3efb591fe549e57a99d38a5f2..7ec9a43c84324c8ba45884ba1708da263c6511a8 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 879ab6f3dc05ea08815338cac8fe8d218ca0e41d..6c985fccc3fe9312e35a8c02ad979e62de2c6b5c 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 d74d041d96281c950ab87a8d6986528d30242405..feb20a53ec26e7ecab8b4f8ae1176016b3a120db 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 fd795ff259337216bd159d5e487a3f98cf31aecf..301fc13c5afd912919532370d0639f317359151c 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 f2190ae37e9c1d3512c1ab45e8f8fe0852ac6527..dee05390c5f474732f5c182f924f6e4cfbc9dd66 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 93ea4ed61b3abe458c807c71f20f23a1c98add8e..5a1e816364b537833c607720475af1736ffc3b42 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 da87317ea191ff5021bf0fde925ec67a27897a72..98ca6cb4e367d9fcd5e13d9dde71facce052694a 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 1e93a7ff5195ce1481ba60a29d56fcea203e4a2c..bbd75cdddd23d4da49a7f806ba136ba78616eb62 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 1c069121fd262db859c6c138279a461bf67af94a..d9ed51b3818295f08d10e340194807d9624b8c6b 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 dbc53e62f77efbd1ddbf162a13f7d43c39c8ed72..2a31fd6155cfd456ee7d108d883e0c2a951a5f47 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 10ddba988c63fc8a02a016d8a8bdb7dcec4279ed..90da0a95d01dbdb99182274cb65fdf04da00330d 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 cf06406ba3227f1d0962eea2df8a1872e05f0978..b1cd317782099d417ad50e51495a654fdedbf028 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 920154324a3b51e0f031656d63e0e701da42b78e..27bd98d9baa86301e29b569d347ab2d6cb4246fb 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 150fa39e6dcbe823dc4ace5556f24a7d15a961b9..5722b74e1aec960a4399afce3d466ce8cd25d4b4 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 d073ed9011f4ca0ccf63964ebe40045340efe1e9..5505cdaca4e806b2e7f09a2d209fbaa0971b989a 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 631eef75314a46e14a88bced7ce0b8bca4082716..e24b65335fd9943abbaff3126e204469e054a824 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 b33102a09cae5cf90f475a03cd9ec670b1ab5fb2..2f399f092352c9ca6261561c88d9111d4c47bd39 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 2446b3df907cb7b5ea8abc47328b7a5616edb24a..293a28558d024923c4abbcd17910f69c87147e8f 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 863931eb6117c108f720ed8bac96c14e64b2675e..f4c75d15abee9ec5d875c6f6e247dec381f0fcac 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 df96f458b158a91a6bca0514ef48743d1397861c..a949834f6655c1a992ebe02cec66e44490d06cf0 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 7977ca3ba018a8f6679264d1475cbe5ae3adf9dd..70ea85152ecca172d897b47a6783deb8f6c9782f 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 5bd565114405e47538d365b2eddcdc62b0c73363..1ea98ba5483c98563c6d563bfe19d90bc98b8edd 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 1e7943f7429995b10b35f9d3fcd5451f0ddef9b2..db649c3b1867dc9922634652e9a67a1a69bb87db 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 0c11dd2e44b5e03ce366a7de29692c0790e1d688..0acf3c9a4ba34fa54c1db15e41ac936f6690df30 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 dddae955bb540d1131704f1178011817f8305f6d..23a3c32c59e892d228b82bd6e8a50bc720380403 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 758b749703ba9f97bfd673b271b9f0a8f52c9849..e8052b9a08ccafa0ea05698cb726089fe82343ee 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 9c5d2c2ecf04f2fe633b4685ce4e401a88427759..b9a66f3e4b853c7f63ba90329b3ddd1acf2197b0 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 5c8fcfcf79cd25323a5c520321d672b70292213c..a4aebb3c8b3dd0fe8fc2abf78bb116c7565cf45e 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 a2dc75028cc1a2feee20e14e5980c12ea35c97b9..e96c9a5847c08f6f707d6898169bda8bb981ee0f 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 b83d9d013071b8528d47c7c50ea1fe968313b5ea..ff8ffde4cb1bedfc78d20006b45f4b8fe2acdfb7 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 2bf60d34fdcbe9284113576f28390ce8c8d36088..e560bf92e4c7187db4b990491e2d9df639b156ba 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 1ebd70910161e73d3d6337f9b42c26642d92e575..c2ec5fe322adabeaea0c20a8c5c4987077923deb 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 83f62f7017d944d24b5217cc46e0aa3f405e275d..13aeda75a263af49044e66684330d0aaad6fa5f2 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 9354642fe279ccbbed07f30687d3c99a7b5c410c..6fd582db274ac1b38a42c649fc990ce877de0170 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 6c40330e25e8a3057e4840e7da365be2ae9b9a32..eea9b4f55adba89eb325ffaa97678b2dc86e6399 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 faff3738cb325b035d9e26e9321ae73d4b923a11..f382278e0b03ddf73fa9b1844c004ecdeef5ee32 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 8d8e5de725bf5bc60a714edd222ed0863588d776..1df771d2cf23af205d636907cdb0e6ebd9d81c72 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 9419a62dc4ea90a5224a70f21d3678b21aa22273..55e09e7d5481fb65260c40e6eaed192e8a407bcf 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 b970743b93a211b90671ad701f596d2f6940b866..0e959659de2e299136e4c8a354bb99d64ae97195 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 88f9d5281a1d808e79fc07786b712a236e439123..e53914bff563e9570a58b92d8751428ab68054c9 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 902efb8165af2d4eae30f3baf530e5c37305c798..333d777b451bc576d2d0b2de91ee73aa4b2bde4b 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 1cd74d3e09611910e57a8493b619c7226ac9de13..8f8074f9fd4bcf6f4d056714fb5ad61045d98796 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 7fe0bf2b7c18a10f4b2007a30fae54f220649fe7..c44257b4be2a217c92da0ebf02c9804bf51f976e 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 895e2280de8cac8ce12b0ae7abe9992b1e87c213..e185ae89f3880beba0a6597a88b80d13b8937203 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 ecbbe17930ea4d6d8a06cff2f31667b4ddd321f0..61446af679e7a32bdf6117b369ff6f03c04af12d 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 319f3cc5e52a584205a7a4b6794d49928174e232..c961f043d4b7968f67ef748c9ba910913fa71827 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 185681b6b2965e400a71e7da314b5ed694d3e98d..d874b3beecf9ac9144b97944e4034a9584c81317 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 8868b04a40e7723d9ec1da4568407a89da8a0524..d0897250351d3fb8d262413f4051edc7779f12ae 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 0f303129a42bc0efe14b1d67b8d06c90dc974cb8..794862a32fec37397ee918bca1303bf63a679a33 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 2d0917b5035147cef43e5a29e899345ca25244c5..b9593dfbb7b3ba9b3cec15c81f535bb737ceae06 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 8fbcba686af6ccf4d3c846405723f71d1857e2e0..88dbcc90be60c6ae7328eda74ff0e62de9197d9f 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 ae24e03d4940feee5f5ab4bddac5937aec504af8..5889898c2c52bfd6f7d1531fb777e45a54c7e244 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 1e8980809eda3930aa8b0a09f876ab8446c638b4..13cc548ee8e1701c222e762acdf40f5c90c96f99 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 ca190695b59adb50706c014bc5983efb6f463adb..62569097bf55aaaeb4dca19926c208eed631cf28 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 5d1670bccf6bc7adcfb411e2ba05ed68684a1db7..06406df1f02f765b4f52fae85e31b4e8e45b3700 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 1773a61282e6101235036f8dd64ca53e9f6387cb..c6e74e40940d3d557c2d8fcbc0d010ccd5d7c9c5 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 0b3a5a4f7df1c6d9eb930abb1b00857acc1146f5..8df46153fc3307a7d9aea2c5b4d63e04d9ba9b85 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 85107a4af8583d9d03709daff1e74fee750650ca..19172f1df14b39a91a6e14c621ad804b37916a9c 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 7a4e9833adb57d38c63fa226e44989630bb21d61..0e2b0ce593ca410d4351efa5b4a18e00d248c83a 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 078a2210730d249ac2309df3c570d7bff1700e87..0d93da0e2b41820f303c6c17de40bf84db4e02b4 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 abdb16f260a07f1e3e506dd241376b4c1993603f..12afa10400155eabf48663f0edfdfddd00e275d8 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 417ad61d3084f87314af7c00673aabc3f398ac1b..cad1433c9023d6a96f4ed36aca33e8648187b092 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 d2b5f927a989f2e9a1c123c8ad7c1cd35559f497..b289fb53075a6fc20017e8656e73b2efe114d155 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 3048ee52420f106722c01ad6538c627713ac992b..1881d7ff43130e78eadaf0b3fb4b6de27b261f18 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 77ad76ae39ee123a48e632e5f5d70df224c18529..f47523fe2bae80a93bc94628ce361e767ea0467b 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 f95e1af07d11824348beabf49b6075cd91e25cdd..27da0b7caad766ad991ea81c62556912f36ea683 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 ba76c41b6d5e4b589f08cbbcbdc32bd9ca00bfe6..4b34282a65e9fbc606c9057b698d6618fd81e609 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 6993c8ba37ec5f075784e1b7149e259828c61ae1..57eb0a77f118ffecec952885687061f8514b774e 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);