From 89c00e43d2ce1dd1afe11c2c8485307342805f97 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 19 Dec 2008 20:30:50 +0000 Subject: [PATCH] Fix in CREATE_EXTENSION_DEACTIVATION_TASK() and coding-style updated --- beg.php | 2 +- birthday_confirm.php | 2 +- click.php | 2 +- doubler.php | 4 +- inc/autopurge/purge-general.php | 20 +++++----- inc/autopurge/purge-inact.php | 4 +- inc/autopurge/purge-mails.php | 4 +- inc/autopurge/purge-tsks.php | 4 +- inc/databases.php | 2 +- inc/doubler_send.php | 4 +- inc/extensions.php | 19 ++++----- inc/extensions/ext-rewrite.php | 4 +- inc/filters.php | 2 +- inc/functions.php | 6 +-- inc/gen_sql_patches.php | 6 +-- inc/libs/admins_functions.php | 10 ++--- inc/libs/autopurge_functions.php | 29 ++++++-------- inc/libs/bonus_functions.php | 4 +- inc/libs/holiday_functions.php | 15 +++---- inc/libs/mediadata_functions.php | 17 ++++---- inc/libs/online_functions.php | 2 +- inc/libs/rallye_functions.php | 32 +++++++-------- inc/libs/refback_functions.php | 6 +-- inc/libs/sponsor_functions.php | 2 +- inc/libs/wernis_functions.php | 2 +- inc/libs/yoomedia_functions.php | 8 ++-- inc/mails/beg_mails.php | 8 ++-- inc/mails/birthday_mails.php | 8 ++-- inc/mails/bonus_mails.php | 8 ++-- inc/modules/admin/admin-inc.php | 8 ++-- inc/modules/admin/overview-inc.php | 12 +++--- inc/modules/admin/what-add_rallye.php | 2 +- inc/modules/admin/what-admin_add.php | 4 +- inc/modules/admin/what-adminedit.php | 14 +++---- inc/modules/admin/what-admins_mails.php | 12 +++--- inc/modules/admin/what-config_admins.php | 12 +++--- inc/modules/admin/what-config_cats.php | 23 +++++------ inc/modules/admin/what-config_email.php | 10 ++--- inc/modules/admin/what-config_mods.php | 4 +- inc/modules/admin/what-config_payouts.php | 8 ++-- inc/modules/admin/what-config_points.php | 8 ++-- .../admin/what-config_rallye_prices.php | 34 ++++++---------- inc/modules/admin/what-config_register.php | 4 +- inc/modules/admin/what-del_email.php | 12 +++--- inc/modules/admin/what-del_holiday.php | 6 +-- inc/modules/admin/what-del_sponsor.php | 8 ++-- inc/modules/admin/what-del_transfer.php | 8 ++-- inc/modules/admin/what-edit_emails.php | 2 +- inc/modules/admin/what-edit_sponsor.php | 8 ++-- inc/modules/admin/what-edit_user.php | 2 +- inc/modules/admin/what-extensions.php | 12 +++--- inc/modules/admin/what-guest_add.php | 4 +- inc/modules/admin/what-guestedit.php | 16 ++++---- inc/modules/admin/what-list_country.php | 2 +- inc/modules/admin/what-list_links.php | 4 +- inc/modules/admin/what-list_newsletter.php | 4 +- inc/modules/admin/what-list_payouts.php | 4 +- inc/modules/admin/what-list_rallyes.php | 14 +++---- inc/modules/admin/what-list_sponsor_pay.php | 8 ++-- inc/modules/admin/what-list_task.php | 8 ++-- inc/modules/admin/what-lock_sponsor.php | 4 +- inc/modules/admin/what-lock_user.php | 8 ++-- inc/modules/admin/what-mem_add.php | 4 +- inc/modules/admin/what-memedit.php | 20 +++++----- inc/modules/admin/what-refbanner.php | 13 +++--- inc/modules/admin/what-repair_amenu.php | 6 +-- inc/modules/admin/what-repair_cats.php | 4 +- inc/modules/admin/what-repair_gmenu.php | 2 +- inc/modules/admin/what-repair_mmenu.php | 6 +-- inc/modules/admin/what-theme_import.php | 2 +- inc/modules/admin/what-unlock_emails.php | 6 +-- inc/modules/admin/what-unlock_sponsor.php | 4 +- inc/modules/chk_login.php | 2 +- inc/modules/guest/what-confirm.php | 8 ++-- inc/modules/guest/what-login.php | 4 +- inc/modules/guest/what-register.php | 6 +-- inc/modules/guest/what-sponsor_login.php | 6 +-- inc/modules/member/what-holiday.php | 12 +++--- inc/modules/member/what-html_mail.php | 4 +- inc/modules/member/what-mydata.php | 6 +-- inc/modules/member/what-newsletter.php | 6 +-- inc/modules/member/what-nickname.php | 2 +- inc/modules/member/what-order.php | 10 ++--- inc/modules/member/what-payout.php | 6 +-- inc/modules/member/what-primera.php | 2 +- inc/modules/member/what-support.php | 2 +- inc/modules/member/what-themes.php | 4 +- inc/modules/member/what-transfer.php | 8 ++-- inc/modules/member/what-wernis.php | 4 +- inc/modules/order.php | 8 ++-- inc/monthly/monthly_newsletter.php | 13 +++--- inc/mysql-manager.php | 40 +++++++++---------- inc/pool/pool-bonus.php | 10 ++--- inc/pool/pool-user.php | 20 +++++----- inc/profile-updte.php | 4 +- inc/reset/reset_daily.php | 5 ++- inc/reset/reset_holiday.php | 5 ++- inc/stats_bonus.php | 4 +- mailid_top.php | 10 ++--- ref.php | 2 +- view.php | 2 +- 101 files changed, 392 insertions(+), 415 deletions(-) diff --git a/beg.php b/beg.php index cd4b2f6363..531e8dbf71 100644 --- 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 diff --git a/birthday_confirm.php b/birthday_confirm.php index 69530f99f0..1c71ee60db 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -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 diff --git a/click.php b/click.php index 515a958587..f5dbe4bd91 100644 --- 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'])); diff --git a/doubler.php b/doubler.php index 060102a398..333467cc25 100644 --- a/doubler.php +++ b/doubler.php @@ -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. ^^^ diff --git a/inc/autopurge/purge-general.php b/inc/autopurge/purge-general.php index 6b5e36b990..a24b4c7cdc 100644 --- a/inc/autopurge/purge-general.php +++ b/inc/autopurge/purge-general.php @@ -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 diff --git a/inc/autopurge/purge-inact.php b/inc/autopurge/purge-inact.php index 33aaa9acd9..679bd906bc 100644 --- a/inc/autopurge/purge-inact.php +++ b/inc/autopurge/purge-inact.php @@ -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 diff --git a/inc/autopurge/purge-mails.php b/inc/autopurge/purge-mails.php index 89f4dd7d63..c523c807ac 100644 --- a/inc/autopurge/purge-mails.php +++ b/inc/autopurge/purge-mails.php @@ -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) ... diff --git a/inc/autopurge/purge-tsks.php b/inc/autopurge/purge-tsks.php index 96124da6be..ed61827b87 100644 --- a/inc/autopurge/purge-tsks.php +++ b/inc/autopurge/purge-tsks.php @@ -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")) { diff --git a/inc/databases.php b/inc/databases.php index 90e902ea18..a1226d4591 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -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); diff --git a/inc/doubler_send.php b/inc/doubler_send.php index f5a671d9ae..d584f47f4b 100644 --- a/inc/doubler_send.php +++ b/inc/doubler_send.php @@ -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; diff --git a/inc/extensions.php b/inc/extensions.php index 1439e97a8c..0e49343d0a 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -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 diff --git a/inc/extensions/ext-rewrite.php b/inc/extensions/ext-rewrite.php index e3b6c75f4d..4cb2b00ca0 100644 --- a/inc/extensions/ext-rewrite.php +++ b/inc/extensions/ext-rewrite.php @@ -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; diff --git a/inc/filters.php b/inc/filters.php index 1355975dd7..8ebe34f0c6 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -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 { diff --git a/inc/functions.php b/inc/functions.php index 7a70b794c3..4d4d5a203f 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -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(); diff --git a/inc/gen_sql_patches.php b/inc/gen_sql_patches.php index c6d3a5373b..732d4345b1 100644 --- a/inc/gen_sql_patches.php +++ b/inc/gen_sql_patches.php @@ -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."
Cookie: ".get_session('u_hash')."
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? diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index 05e121443d..b792bbbb4f 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -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); diff --git a/inc/libs/autopurge_functions.php b/inc/libs/autopurge_functions.php index 249a4e70cb..f557eac2c5 100644 --- a/inc/libs/autopurge_functions.php +++ b/inc/libs/autopurge_functions.php @@ -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); } diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index 4e1ba34bd6..b137dc6c33 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -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); diff --git a/inc/libs/holiday_functions.php b/inc/libs/holiday_functions.php index 61ce6ab204..a63d334d27 100644 --- a/inc/libs/holiday_functions.php +++ b/inc/libs/holiday_functions.php @@ -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__); diff --git a/inc/libs/mediadata_functions.php b/inc/libs/mediadata_functions.php index f367203b5d..9d89121a5c 100644 --- a/inc/libs/mediadata_functions.php +++ b/inc/libs/mediadata_functions.php @@ -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); } diff --git a/inc/libs/online_functions.php b/inc/libs/online_functions.php index 02c0b41663..146d92da35 100644 --- a/inc/libs/online_functions.php +++ b/inc/libs/online_functions.php @@ -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__); } diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index 255bca49bb..9e096a317e 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -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 diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index cd8d0fb4de..551f56e4cf 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -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__."(".__LINE__."):refback={$refback},uid={$uid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")
\n"; @@ -211,7 +211,7 @@ function UPDATE_REFBACK_TABLE($uid) { if (SQL_NUMROWS($result) == 0) { // Insert this level //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level={$cacheArray['back_level']},ref={$cacheArray['up_refid'][$cacheArray['back_level']]} - ADD!
\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__."(".__LINE__."):uid={$uid},level=".($cacheArray['back_level']-$minus).",ref={$cacheArray['up_refid'][$cacheArray['back_level']]},numRows=".SQL_NUMROWS($result)." - BACK!
\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__."(".__LINE__."):uid={$uid},level=".($cacheArray['back_level']-$minus).",ref={$cacheArray['up_refid'][$cacheArray['back_level']]} - RETURNED!
\n"; } // END - if diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index b0deed1830..499abe7e9f 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -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__); diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index d42c6c1ba2..ff4acda10f 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -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__); } diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index 327d83bc8e..2f9f64a237 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -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 } diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php index 832bc5e7d8..b3580e82c0 100644 --- a/inc/mails/beg_mails.php +++ b/inc/mails/beg_mails.php @@ -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) { diff --git a/inc/mails/birthday_mails.php b/inc/mails/birthday_mails.php index c23b1d7bfd..1098443155 100644 --- a/inc/mails/birthday_mails.php +++ b/inc/mails/birthday_mails.php @@ -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 diff --git a/inc/mails/bonus_mails.php b/inc/mails/bonus_mails.php index 860a33701c..2df07aa5a3 100644 --- a/inc/mails/bonus_mails.php +++ b/inc/mails/bonus_mails.php @@ -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) { diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 1c30a49649..38bd814274 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -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__); } diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index 5574b354e4..65432430c4 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -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__); } } diff --git a/inc/modules/admin/what-add_rallye.php b/inc/modules/admin/what-add_rallye.php index d0ffeb9169..d5d1e97066 100644 --- a/inc/modules/admin/what-add_rallye.php +++ b/inc/modules/admin/what-add_rallye.php @@ -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(), diff --git a/inc/modules/admin/what-admin_add.php b/inc/modules/admin/what-admin_add.php index 1766d47082..6672890f33 100644 --- a/inc/modules/admin/what-admin_add.php +++ b/inc/modules/admin/what-admin_add.php @@ -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'], diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php index 9416731ffd..7ec9a43c84 100644 --- a/inc/modules/admin/what-adminedit.php +++ b/inc/modules/admin/what-adminedit.php @@ -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); } } diff --git a/inc/modules/admin/what-admins_mails.php b/inc/modules/admin/what-admins_mails.php index 879ab6f3dc..6c985fccc3 100644 --- a/inc/modules/admin/what-admins_mails.php +++ b/inc/modules/admin/what-admins_mails.php @@ -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__); } } diff --git a/inc/modules/admin/what-config_admins.php b/inc/modules/admin/what-config_admins.php index d74d041d96..feb20a53ec 100644 --- a/inc/modules/admin/what-config_admins.php +++ b/inc/modules/admin/what-config_admins.php @@ -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']), diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index fd795ff259..301fc13c5a 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -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 = "".CATEGORY_ADDED.""; } 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); diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php index f2190ae37e..dee05390c5 100644 --- a/inc/modules/admin/what-config_email.php +++ b/inc/modules/admin/what-config_email.php @@ -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 = "".MAX_VALUE_SAVED.""; } 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; } diff --git a/inc/modules/admin/what-config_mods.php b/inc/modules/admin/what-config_mods.php index 93ea4ed61b..5a1e816364 100644 --- a/inc/modules/admin/what-config_mods.php +++ b/inc/modules/admin/what-config_mods.php @@ -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 diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php index da87317ea1..98ca6cb4e3 100644 --- a/inc/modules/admin/what-config_payouts.php +++ b/inc/modules/admin/what-config_payouts.php @@ -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; } diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index 1e93a7ff51..bbd75cdddd 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -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; diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index 1c069121fd..d9ed51b381 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -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) diff --git a/inc/modules/admin/what-config_register.php b/inc/modules/admin/what-config_register.php index dbc53e62f7..2a31fd6155 100644 --- a/inc/modules/admin/what-config_register.php +++ b/inc/modules/admin/what-config_register.php @@ -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); } diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php index 10ddba988c..90da0a95d0 100644 --- a/inc/modules/admin/what-del_email.php +++ b/inc/modules/admin/what-del_email.php @@ -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); diff --git a/inc/modules/admin/what-del_holiday.php b/inc/modules/admin/what-del_holiday.php index cf06406ba3..b1cd317782 100644 --- a/inc/modules/admin/what-del_holiday.php +++ b/inc/modules/admin/what-del_holiday.php @@ -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 diff --git a/inc/modules/admin/what-del_sponsor.php b/inc/modules/admin/what-del_sponsor.php index 920154324a..27bd98d9ba 100644 --- a/inc/modules/admin/what-del_sponsor.php +++ b/inc/modules/admin/what-del_sponsor.php @@ -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); diff --git a/inc/modules/admin/what-del_transfer.php b/inc/modules/admin/what-del_transfer.php index 150fa39e6d..5722b74e1a 100644 --- a/inc/modules/admin/what-del_transfer.php +++ b/inc/modules/admin/what-del_transfer.php @@ -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__); } } } diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php index d073ed9011..5505cdaca4 100644 --- a/inc/modules/admin/what-edit_emails.php +++ b/inc/modules/admin/what-edit_emails.php @@ -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' diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index 631eef7531..e24b65335f 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -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)); diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index b33102a09c..2f399f0923 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -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', diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index 2446b3df90..293a28558d 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -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 diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index 863931eb61..f4c75d15ab 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -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'], diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index df96f458b1..a949834f66 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -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 diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php index 7977ca3ba0..70ea85152e 100644 --- a/inc/modules/admin/what-list_country.php +++ b/inc/modules/admin/what-list_country.php @@ -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 diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php index 5bd5651144..1ea98ba548 100644 --- a/inc/modules/admin/what-list_links.php +++ b/inc/modules/admin/what-list_links.php @@ -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'])); diff --git a/inc/modules/admin/what-list_newsletter.php b/inc/modules/admin/what-list_newsletter.php index 1e7943f742..db649c3b18 100644 --- a/inc/modules/admin/what-list_newsletter.php +++ b/inc/modules/admin/what-list_newsletter.php @@ -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'])); diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index 0c11dd2e44..0acf3c9a4b 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -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 diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index dddae955bb..23a3c32c59 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -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', diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index 758b749703..e8052b9a08 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -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__); diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index 9c5d2c2ecf..b9a66f3e4b 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -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); diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index 5c8fcfcf79..a4aebb3c8b 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.php @@ -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'])); diff --git a/inc/modules/admin/what-lock_user.php b/inc/modules/admin/what-lock_user.php index a2dc75028c..e96c9a5847 100644 --- a/inc/modules/admin/what-lock_user.php +++ b/inc/modules/admin/what-lock_user.php @@ -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__); } diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index b83d9d0130..ff8ffde4cb 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -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'], diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index 2bf60d34fd..e560bf92e4 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -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 } diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 1ebd709101..c2ec5fe322 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -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__); } } diff --git a/inc/modules/admin/what-repair_amenu.php b/inc/modules/admin/what-repair_amenu.php index 83f62f7017..13aeda75a2 100644 --- a/inc/modules/admin/what-repair_amenu.php +++ b/inc/modules/admin/what-repair_amenu.php @@ -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(); diff --git a/inc/modules/admin/what-repair_cats.php b/inc/modules/admin/what-repair_cats.php index 9354642fe2..6fd582db27 100644 --- a/inc/modules/admin/what-repair_cats.php +++ b/inc/modules/admin/what-repair_cats.php @@ -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 diff --git a/inc/modules/admin/what-repair_gmenu.php b/inc/modules/admin/what-repair_gmenu.php index 6c40330e25..eea9b4f55a 100644 --- a/inc/modules/admin/what-repair_gmenu.php +++ b/inc/modules/admin/what-repair_gmenu.php @@ -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(); diff --git a/inc/modules/admin/what-repair_mmenu.php b/inc/modules/admin/what-repair_mmenu.php index faff3738cb..f382278e0b 100644 --- a/inc/modules/admin/what-repair_mmenu.php +++ b/inc/modules/admin/what-repair_mmenu.php @@ -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(); diff --git a/inc/modules/admin/what-theme_import.php b/inc/modules/admin/what-theme_import.php index 8d8e5de725..1df771d2cf 100644 --- a/inc/modules/admin/what-theme_import.php +++ b/inc/modules/admin/what-theme_import.php @@ -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__); diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 9419a62dc4..55e09e7d54 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -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 diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index b970743b93..0e959659de 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -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__); diff --git a/inc/modules/chk_login.php b/inc/modules/chk_login.php index 88f9d5281a..e53914bff5 100644 --- a/inc/modules/chk_login.php +++ b/inc/modules/chk_login.php @@ -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", diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index 902efb8165..333d777b45 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -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')); diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 1cd74d3e09..8f8074f9fd 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -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 diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index 7fe0bf2b7c..c44257b4be 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -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 diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index 895e2280de..e185ae89f3 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -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__); diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index ecbbe17930..61446af679 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -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&what=holiday"); diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index 319f3cc5e5..c961f043d4 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -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 diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 185681b6b2..d874b3beec 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -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&what=welcome&msg=".urlencode(PROFILE_UPDATED); break; diff --git a/inc/modules/member/what-newsletter.php b/inc/modules/member/what-newsletter.php index 8868b04a40..d089725035 100644 --- a/inc/modules/member/what-newsletter.php +++ b/inc/modules/member/what-newsletter.php @@ -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 diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index 0f303129a4..794862a32f 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -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 { diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index 2d0917b503..b9593dfbb7 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -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', diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 8fbcba686a..88dbcc90be 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -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, diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index ae24e03d49..5889898c2c 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -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! diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index 1e8980809e..13cc548ee8 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -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 diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php index ca190695b5..62569097bf 100644 --- a/inc/modules/member/what-themes.php +++ b/inc/modules/member/what-themes.php @@ -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']); diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index 5d1670bccf..06406df1f0 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -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']; diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index 1773a61282..c6e74e4094 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -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! diff --git a/inc/modules/order.php b/inc/modules/order.php index 0b3a5a4f7d..8df46153fc 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -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; diff --git a/inc/monthly/monthly_newsletter.php b/inc/monthly/monthly_newsletter.php index 85107a4af8..19172f1df1 100644 --- a/inc/monthly/monthly_newsletter.php +++ b/inc/monthly/monthly_newsletter.php @@ -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)); diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 7a4e9833ad..0e2b0ce593 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -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__."(".__LINE__."):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - INSERTED! (".SQL_AFFECTEDROWS().")
\n"; } // END - if @@ -1255,14 +1255,14 @@ function UPDATE_REF_COUNTER ($uid) { //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},level={$cacheArray['ref_level'][$uid]}
\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__."(".__LINE__."):updated=".SQL_AFFECTEDROWS()."
\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__."(".__LINE__."):uid={$uid}
\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( diff --git a/inc/pool/pool-bonus.php b/inc/pool/pool-bonus.php index 078a221073..0d93da0e2b 100644 --- a/inc/pool/pool-bonus.php +++ b/inc/pool/pool-bonus.php @@ -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)."-
"; 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__."*
"; @@ -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__."
";
 				//* DEBUG: */ print_r($dummy);
 				//* DEBUG: */ echo "
\n!!!
"; diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php index abdb16f260..12afa10400 100644 --- a/inc/pool/pool-user.php +++ b/inc/pool/pool-user.php @@ -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)."!
"; 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__."*
"; @@ -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__); } } } diff --git a/inc/profile-updte.php b/inc/profile-updte.php index 417ad61d30..cad1433c90 100644 --- a/inc/profile-updte.php +++ b/inc/profile-updte.php @@ -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__); } } diff --git a/inc/reset/reset_daily.php b/inc/reset/reset_daily.php index d2b5f927a9..b289fb5307 100644 --- a/inc/reset/reset_daily.php +++ b/inc/reset/reset_daily.php @@ -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}
\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 diff --git a/inc/reset/reset_holiday.php b/inc/reset/reset_holiday.php index 3048ee5242..1881d7ff43 100644 --- a/inc/reset/reset_holiday.php +++ b/inc/reset/reset_holiday.php @@ -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 diff --git a/inc/stats_bonus.php b/inc/stats_bonus.php index 77ad76ae39..f47523fe2b 100644 --- a/inc/stats_bonus.php +++ b/inc/stats_bonus.php @@ -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( diff --git a/mailid_top.php b/mailid_top.php index f95e1af07d..27da0b7caa 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -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 ba76c41b6d..4b34282a65 100644 --- 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 { diff --git a/view.php b/view.php index 6993c8ba37..57eb0a77f1 100644 --- 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); -- 2.39.5