X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_payouts.php;h=d53474bca9cb97364480c757f01aa6e19aa3b8c5;hp=da518d24747f2f018ef84bfdb31d29d75f28884a;hb=6914ebaaae909093df86d010e4c754a43d1a1aed;hpb=a226d81121cb96048b1ed85fd8584a87d435b0db diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index da518d2474..d53474bca9 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -53,22 +53,22 @@ 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__); - list($task) = SQL_FETCHROW($result); + list($taskId) = SQL_FETCHROW($result); SQL_FREERESULT($result); - if (empty($task)) $task = '0'; + if (empty($taskId)) $taskId = '0'; } elseif ((empty($userid)) || ($userid == '0')) { // Cannot obtain member id! loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_FAILED_OBTAIN_USERID--}'); } else { // Get task id from URL - $task = getRequestParameter('task'); + $taskId = getRequestParameter('task'); } - if ((!empty($task)) && (!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! @@ -117,7 +117,7 @@ LIMIT 1", $data['from_pass'] = base64_encode($data['from_pass']); $tpass = base64_encode($tpass); break; - } + } // END - switch // Transfer variables... $reason = encodeString(getMessage('ADMIN_PAYOUT_REASON'), false); @@ -131,8 +131,8 @@ LIMIT 1", if ($ret[0] == $data['engine_ret_ok']) { // Clear task - if ($task > 0) { - runFilterChain('solve_task', $task); + if ($taskId > 0) { + runFilterChain('solve_task', $taskId); } // Clear payout request @@ -160,12 +160,12 @@ LIMIT 1", } } else { // Cannot load payout id - loadTemplate('admin_settings_saved', false, '