From: Roland Häder Date: Thu, 29 Jul 2010 21:01:34 +0000 (+0000) Subject: More usage of isValdUserId() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=425acd4e0e78608016f9fc2872aafc0140f49b71;p=mailer.git More usage of isValdUserId() --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index b182f967ed..0a0fe07f24 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -49,8 +49,8 @@ ./inc/functions.php:2255: // @TODO This is still very static, rewrite it somehow ./inc/gen_sql_patches.php:96:// @TODO Rewrite this to a filter ./inc/install-functions.php:59: // @TODO DEACTIVATED: changeDataInFile(getCachePath() . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0); -./inc/language/de.php:1118:// @TODO Rewrite these two constants -./inc/language/de.php:1133:// @TODO Rewrite these three constants +./inc/language/de.php:1117:// @TODO Rewrite these two constants +./inc/language/de.php:1132:// @TODO Rewrite these three constants ./inc/language/de.php:300: // @TODO Following two are unused? ./inc/language/de.php:811:// @TODO Are these constants longer used? ./inc/language-functions.php:234: // @TODO These are all valid languages, again hard-coded diff --git a/inc/autopurge/purge-general.php b/inc/autopurge/purge-general.php index 8a7735c2f9..286622c289 100644 --- a/inc/autopurge/purge-general.php +++ b/inc/autopurge/purge-general.php @@ -78,7 +78,7 @@ ORDER BY SQL_FREERESULT($result_links); // At least one link was found, enougth to pay back the points - if (($userid != $content['userid']) && ($userid > 0) && ($points > 0)) { + if (($userid != $content['userid']) && (isValidUserId($userid)) && ($points > 0)) { // Directly add points back to senders account addPointsAutoPurge($userid, $points); $points = '0'; diff --git a/inc/language/de.php b/inc/language/de.php index 5ece1e6fa0..a905e24c22 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -890,7 +890,7 @@ addMessages(array( 'ADMIN_USER_PROFILE_TITLE' => "Mitgliedsprofil aufrufen", 'LIST_UNCONFIRMED_MEMBER_LINKS' => "Unbestätigte Maillinks eines Mitgliedes auflisten", 'MEMBER_ENTER_MORE_MIN_RECEIVERS' => "Geben Sie mehr als {?order_min?} Empfänger ein.", - 'NO_TEMPLATE_SUPPLIED' => "Keinen Template-Namen übergeben! Bug im Script erkannt. Bitte den Webmaster ({?WEBMASTER?}) verständigen.", + 'NO_TEMPLATE_SUPPLIED' => "Keinen Templatenamen übergeben! Bug im Script erkannt. Bitte den Webmaster ({?WEBMASTER?}) verständigen.", '_OR' => "oder", 'GUEST_NEW_PASSWORD_SEND' => "Neues Passwort ist zu Ihrem Postfach unterwegs.", 'UNDER_CONSTRUCTION' => "Funktion noch im Aufbau.", @@ -964,8 +964,7 @@ addMessages(array( 'DEFAULT_POINTS' => "Punkte", 'PROBLEM_POINTS_OVERVIEW_UNAVAILABLE' => "{?POINTS?}-Übersicht derzeit nicht verfügbar.", 'ADMIN_NOTHING_SELECTED_CHANGE' => "Sie haben nichts zum Ändern des Status ausgewählt.", - 'TEMPLATE_CONTENT' => "Template-Content:", - 'TEMPLATE_DATA' => "Template-Daten:", + 'TEMPLATE_CONTENT' => "Templatedaten:", 'ADMIN_LINK_DELETE_USER_TITLE' => "Mitglied löschen (mit Abfrage)", 'ADMIN_LINK_EDIT_USER_TITLE' => "Mitglied editieren", 'ADMIN_LINK_LOCK_USER_TITLE' => "Mitglied sperren", diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index a374d0a42d..4b550e706d 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -47,7 +47,7 @@ if (!defined('__SECURITY')) { function generateDoublerTable ($userid = '0', $done = 'N', $ref = 'N', $sort = 'ASC') { if (empty($cnt)) $cnt = '0'; $add = ''; $DT_MODE = '0'; - if ($userid > 0) { + if (isValidUserId($userid)) { // Load entries only from a single user $add = sprintf(" AND `userid`=%s", bigintval($userid)); $mode = 'member'; $COLS = 4; $DT_MODE = 2; diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index ca7e60fb54..26babebf3f 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -468,7 +468,7 @@ function markReferalRallyesAsExpired ($result) { $prices['active'][$key] = $active; // Allow valid and active users with at least one ref to get points - if (($userid > 0) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) { + if ((isValidUserId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) { $total++; } // END - if } // END - foreach @@ -486,7 +486,7 @@ function markReferalRallyesAsExpired ($result) { // Run array through (by userid is the most important 2nd-level-array) foreach($prices['userid'] as $key => $userid) { // Allow valid and active users with at least one ref to get points - if (($userid > 0) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0)) { + if ((isValidUserId($userid)) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0)) { // Transfer data to array for the mail template $DATA['level'] = $prices['level'][$key]; $DATA['points'] = $prices['points'][$key]; diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 546f27d070..8468645b28 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -876,7 +876,7 @@ function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = '0') { } // END - if // Is the exlude userid set? - if ($excludeUserId > 0) { + if (isValidUserId($excludeUserId)) { // Then add it $userids['url_userid'][$excludeUserId] = $excludeUserId; } // END - if diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index 758ad55be1..fd7ac7740d 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -428,7 +428,7 @@ function doNewUserPassword ($email, $userid) { // Nickname entered $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' OR `userid`='%s' OR `email`='%s' LIMIT 1", array($userid, $userid, $email), __FUNCTION__, __LINE__); - } elseif (($userid > 0) && (empty($email))) { + } elseif ((isValidUserId($userid)) && (empty($email))) { // Direct userid entered $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", array(bigintval($userid)), __FUNCTION__, __LINE__); diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 0b483d1c7f..5c20771c89 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -623,7 +623,7 @@ function adminAddMenuSelectionBox ($menu, $type, $name, $default = '') { // Creates a user-profile link for the admin. This function can also be used for many other purposes function generateUserProfileLink ($userid, $title = '', $what = 'list_user') { - if (($title == '') && ($userid > 0)) { + if (($title == '') && (isValidUserId($userid))) { // Set userid as title $title = $userid; } elseif ($userid == 0) { @@ -1247,7 +1247,7 @@ function setAdminMenuHasEntries ($action, $hasEntries) { // Creates a link to the user's admin-profile function adminCreateUserLink ($userid) { // Is the userid set correctly? - if ($userid > 0) { + if (isValidUserId($userid)) { // Create a link to that profile return '{%url=modules.php?module=admin&what=list_user&userid=' . bigintval($userid) . '%}'; } // END - if diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index 9a95ae6950..b846eb8b56 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -53,7 +53,7 @@ if (isGetRequestParameterSet('pid')) { SQL_FREERESULT($result); // Obtain some data - if (!isGetRequestParameterSet('task') && (!empty($userid)) && ($userid > 0)) { + if (!isGetRequestParameterSet('task') && (!empty($userid)) && (isValidUserId($userid))) { // Get task id from database $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `userid`=%s AND `task_type`='PAYOUT_REQUEST' AND `task_created`=%s LIMIT 1", array(bigintval($userid), bigintval($tstamp)), __FILE__, __LINE__); @@ -68,7 +68,7 @@ if (isGetRequestParameterSet('pid')) { $taskId = getRequestParameter('task'); } - if ((!empty($taskId)) && (!empty($userid)) && ($userid > 0)) { + if ((!empty($taskId)) && (!empty($userid)) && (isValidUserId($userid))) { // Load user's data if (!fetchUserData($userid)) { // Abort here because it is not valid! diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index ce69ffa3ee..33bbd3fd13 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -863,7 +863,7 @@ function removeReceiver (&$receivers, $key, $userid, $pool_id, $stats_id = '', $ $ret = 'failed'; // Is the userid valid? - if ($userid > 0) { + if (isValidUserId($userid)) { // Remove entry from array unset($receivers[$key]); diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php index 10d1780fea..290770b259 100644 --- a/inc/pool/pool-user.php +++ b/inc/pool/pool-user.php @@ -238,7 +238,7 @@ if (!SQL_HASZERONUMS($result_main)) { array(bigintval($DATA['id'])), __FILE__, __LINE__); } else { // Is the userid set? - if ($userid > 0) { + if (isValidUserId($userid)) { // User does not exists, pay points back $points = getPaymentPoints($DATA['payment_id']); addPointsDirectly('pool_payback', $DATA['sender'], $points); @@ -267,7 +267,7 @@ if (!SQL_HASZERONUMS($result_main)) { // Walk through all points foreach ($pointsBack as $userid => $PB) { // Add points only when we have points left to add and a valid user id - if (($PB > 0) && ($userid > 0)) { + if (($PB > 0) && (isValidUserId($userid))) { // Prepare content $content = array( 'points' => $PB diff --git a/mailid.php b/mailid.php index b7d50bf0b4..bc7848c2d8 100644 --- a/mailid.php +++ b/mailid.php @@ -58,33 +58,33 @@ setContentType('text/html'); redirectOnUninstalledExtension('mailid'); // Init -$url_userid = '0'; -$url_bid = '0'; -$url_mid = '0'; +$userId = '0'; +$bonusId = '0'; +$mailId = '0'; // Secure all data -if (isGetRequestParameterSet('userid')) $url_userid = bigintval(getRequestParameter('userid')); -if (isGetRequestParameterSet('mailid')) $url_mid = bigintval(getRequestParameter('mailid')); -if (isGetRequestParameterSet('bonusid')) $url_bid = bigintval(getRequestParameter('bonusid')); +if (isGetRequestParameterSet('userid')) $userId = bigintval(getRequestParameter('userid')); +if (isGetRequestParameterSet('mailid')) $mailId = bigintval(getRequestParameter('mailid')); +if (isGetRequestParameterSet('bonusid')) $bonusId = bigintval(getRequestParameter('bonusid')); // 01 1 12 2 2 21 1 2210 -if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFatalErrorsDetected())) { +if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalErrorsDetected())) { // Init result $result_link = false; // Maybe he wants to confirm an email? - if ($url_mid > 0) { + if ($mailId > 0) { // Normal-Mails $result_link = SQL_QUERY_ESC("SELECT `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1", - array($url_mid, $url_userid), __FILE__, __LINE__); + array($mailId, $userId), __FILE__, __LINE__); $type = 'mailid'; - $urlId = $url_mid; - } elseif ($url_bid > 0) { + $urlId = $mailId; + } elseif ($bonusId > 0) { // Bonus-Mail $result_link = SQL_QUERY_ESC("SELECT `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1", - array($url_bid, $url_userid), __FILE__, __LINE__); + array($bonusId, $userId), __FILE__, __LINE__); $type = 'bonusid'; - $urlId = $url_bid; + $urlId = $bonusId; } else { // Problem: No id entered redirectToUrl('modules.php?module=index'); @@ -99,7 +99,7 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa case 'NORMAL': // Is the stats id valid? $result = SQL_QUERY_ESC("SELECT `pool_id`, `url`, `subject` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1", - array($url_mid), __FILE__, __LINE__); + array($mailId), __FILE__, __LINE__); break; case 'BONUS': @@ -108,7 +108,7 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa // Bonus-Mails $result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", - array($url_bid), __FILE__, __LINE__); + array($bonusId), __FILE__, __LINE__); break; default: // Invalid mail type @@ -127,13 +127,13 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa setExtraTitle($title); // Is the user's id unlocked? - if (fetchUserData($url_userid)) { + if (fetchUserData($userId)) { // Status must be CONFIRMED if (getUserData('status') == 'CONFIRMED') { // Update last activity if not admin if (!isAdmin()) { // Is not admin, so update last activity - updateLastActivity($url_userid); + updateLastActivity($userId); } // END - if // User has confirmed his account so we can procede... @@ -155,7 +155,7 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa case 'BONUS': $result = SQL_QUERY_ESC("SELECT `points`, `time` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", - array($url_bid), __FILE__, __LINE__); + array($bonusId), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { list($points, $time) = SQL_FETCHROW($result); $payment = '0.00000'; @@ -185,7 +185,7 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa if (($time > 0) && (($payment > 0) || ($points > 0))) { // Export data into constants for the template $content = array( - 'userid' => $url_userid, + 'userid' => $userId, 'type' => $type, 'data' => $urlId, 'url' => $URL diff --git a/mailid_top.php b/mailid_top.php index 5c4b8afecb..5b54056787 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -60,35 +60,35 @@ redirectOnUninstalledExtension('mailid'); redirectOnUninstalledExtension('other'); // Init variables -$url_userid = '0'; -$url_bid = '0'; -$url_mid = '0'; +$userId = '0'; +$bonusId = '0'; +$mailId = '0'; $code = '0'; $mode = ''; // Secure all data -if (isGetRequestParameterSet('userid')) $url_userid = bigintval(getRequestParameter('userid')); -if (isGetRequestParameterSet('mailid')) $url_mid = bigintval(getRequestParameter('mailid')); -if (isGetRequestParameterSet('bonusid')) $url_bid = bigintval(getRequestParameter('bonusid')); +if (isGetRequestParameterSet('userid')) $userId = bigintval(getRequestParameter('userid')); +if (isGetRequestParameterSet('mailid')) $mailId = bigintval(getRequestParameter('mailid')); +if (isGetRequestParameterSet('bonusid')) $bonusId = bigintval(getRequestParameter('bonusid')); if (isGetRequestParameterSet('code')) $code = bigintval(getRequestParameter('code')); if (isGetRequestParameterSet('mode')) $mode = getRequestParameter('mode'); // 01 1 12 2 2 21 1 22 10 -if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFatalErrorsDetected())) { +if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalErrorsDetected())) { // No image? Then output header if ($mode != 'img') loadIncludeOnce('inc/header.php'); // Maybe he wants to confirm an email? - if ($url_mid > 0) { + if ($mailId > 0) { $result_main = SQL_QUERY_ESC("SELECT `id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1", - array($url_mid, $url_userid), __FILE__, __LINE__); + array($mailId, $userId), __FILE__, __LINE__); $type = 'mailid'; - $urlId = $url_mid; - } elseif ($url_bid > 0) { + $urlId = $mailId; + } elseif ($bonusId > 0) { $result_main = SQL_QUERY_ESC("SELECT `id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1", - array($url_bid, $url_userid), __FILE__, __LINE__); + array($bonusId, $userId), __FILE__, __LINE__); $type = 'bonusid'; - $urlId = $url_bid; + $urlId = $bonusId; } if (SQL_NUMROWS($result_main) == 1) { @@ -102,12 +102,12 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa switch ($ltype) { case 'NORMAL': $result_mailid = SQL_QUERY_ESC("SELECT `pool_id`, `userid`, `id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1", - array($url_mid), __FILE__, __LINE__); + array($mailId), __FILE__, __LINE__); break; case 'BONUS': $result_mailid = SQL_QUERY_ESC("SELECT `id`, `id`, `is_notify` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", - array($url_bid), __FILE__, __LINE__); + array($bonusId), __FILE__, __LINE__); break; default: // Unknown type @@ -127,7 +127,7 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa if ($ltype == 'BONUS') $sender = '0'; // Is the user id valid? - if (fetchUserData($url_userid) === true) { + if (fetchUserData($userId) === true) { // Is the user status CONFIRMED? if (getUserData('status') == 'CONFIRMED') { // User has confirmed his account so we can procede... @@ -175,7 +175,7 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa $img_code = '0'; if (!empty($code)) { // Generate code - $img_code = generateRandomCode(getConfig('code_length'), $code, $url_userid, $urlId); + $img_code = generateRandomCode(getConfig('code_length'), $code, $userId, $urlId); } // END - if // @TODO Rewrite this to a filter @@ -189,26 +189,26 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa switch ($ltype) { case 'NORMAL': SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `clicks`=`clicks`+1 WHERE `id`=%s LIMIT 1", - array($url_mid), __FILE__, __LINE__); + array($mailId), __FILE__, __LINE__); // Update mediadata as well if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) { // Update database updateMediadataEntry(array('total_clicks', 'normal_clicks'), 'add', 1); } // END - if - $stats_data = $url_mid; + $stats_data = $mailId; break; case 'BONUS': SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `clicks`=`clicks`+1 WHERE `id`=%s LIMIT 1", - array($url_bid), __FILE__, __LINE__); + array($bonusId), __FILE__, __LINE__); // Update mediadata as well if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) { // Update database updateMediadataEntry(array('total_clicks', 'bonus_clicks'), 'add', 1); } // END - if - $stats_data = $url_bid; + $stats_data = $bonusId; break; default: // Unknown type @@ -224,18 +224,18 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa if (isExtensionInstalledAndNewer('user', '0.1.2')) { // Update counter SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET mails_confirmed=mails_confirmed + 1 WHERE `userid`=%s LIMIT 1", - array($url_userid), __FILE__, __LINE__); + array($userId), __FILE__, __LINE__); // Update random confirmed as well? if (isExtensionInstalledAndNewer('user', '0.3.4')) { // Update second counter SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `rand_confirmed`=`rand_confirmed` + 1 WHERE `userid`=%s LIMIT 1", - array($url_userid), __FILE__, __LINE__); + array($userId), __FILE__, __LINE__); } // END - if } // END - if // Insert stats record - insertUserStatsRecord($url_userid, $type, $stats_data); + insertUserStatsRecord($userId, $type, $stats_data); // Right code entered? if (bigintval(postRequestParameter('gfx_check')) == $img_code) { @@ -250,26 +250,26 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa // Count down ref_payout value 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_userid), __FILE__, __LINE__); + array($userId), __FILE__, __LINE__); // Add points // @TODO Try to rewrite the following unset() unset($GLOBALS['ref_level']); - addPointsThroughReferalSystem('mailid_okay', $url_userid, $payment); + addPointsThroughReferalSystem('mailid_okay', $userId, $payment); // Shall I add bonus points for "turbo clickers" ? if (isExtensionInstalledAndNewer('bonus', '0.2.2')) { // Is an active-rallye running and this is not a notification mail? if ((isBonusRallyeActive()) && ($notify != 'Y')) { // Shall I exclude the webmaster's own userid from the active-rallye? - if ((((getBonusUserId() == $url_userid) && (getConfig('bonus_include_own') == 'Y')) || (getBonusUserId() != $url_userid)) && (getConfig('def_refid') != $url_userid)) { + if ((((getBonusUserId() == $userId) && (getConfig('bonus_include_own') == 'Y')) || (getBonusUserId() != $userId)) && (getConfig('def_refid') != $userId)) { // Add points and remember ranking are done in this function.... - addTurboBonus($urlId, $url_userid, $type); + addTurboBonus($urlId, $userId, $type); // Set template to mailid_points_done2 which contains a link to the ranking list $template = 'mailid_points_done2'; if ($locked) $template = 'mailid_points_locked2'; - $content['userid'] = $url_userid; + $content['userid'] = $userId; $content['type'] = $type; $content['data'] = $urlId; } // END - if @@ -277,7 +277,7 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa } // END - if // Load total points - $content['total'] = getTotalPoints($url_userid); + $content['total'] = getTotalPoints($userId); // Load template loadTemplate($template, false, $content); @@ -302,13 +302,13 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa if ($code > 0) { // Export data into constants for the template $content['code'] = $code; - $content['userid'] = $url_userid; + $content['userid'] = $userId; $content['type'] = $type; $content['data'] = $urlId; $content['banner'] = loadTemplate('mailid_banner', true); if (getConfig('code_length') > 0) { // Generate Code - $content['image'] = generateCaptchaCode($code, $type, $urlId, $url_userid); + $content['image'] = generateCaptchaCode($code, $type, $urlId, $userId); $templ = 'mailid_enter_code'; } else { // Disabled code @@ -329,7 +329,7 @@ if ((isValidUserId($url_userid)) && (($url_mid > 0) || ($url_bid > 0)) && (!ifFa // Export data into constants for the template $content['time'] = $time; $content['tim2'] = strlen($time); - $content['userid'] = $url_userid; + $content['userid'] = $userId; $content['type'] = $type; $content['data'] = $urlId; $content['rand'] = mt_rand(0, 99999);