]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_payouts.php
Some more wrappers added, code cleanups:
[mailer.git] / inc / modules / admin / what-list_payouts.php
index cd00ee72957235a3e92adabf80c9b4be4f3cdd25..da518d24747f2f018ef84bfdb31d29d75f28884a 100644 (file)
@@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
-if (isGetRequestParameterSet(('pid'))) {
+if (isGetRequestParameterSet('pid')) {
        // First let's get the member's id
        $result = SQL_QUERY_ESC("SELECT userid, target_account, payout_total, payout_timestamp, password FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `id`=%s LIMIT 1",
                array(getRequestParameter('pid')), __FILE__, __LINE__);
@@ -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)) && ($userid > 0)) {
                // 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__);
@@ -233,9 +233,9 @@ ON
 ORDER BY
        p.payout_timestamp DESC", __FILE__, __LINE__);
 
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // List found payouts
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                while ($content = SQL_FETCHARRAY($result)) {
                        if ($content['status'] == 'NEW') {
                                // Generate links for direct accepting and rejecting
@@ -259,19 +259,13 @@ ORDER BY
 
                                // Admins can addionally test the URL for framekillers
                                $content['target_bank'] = '<a href="' . generateFrametesterUrl($content['url']) . '" target="_blank">{--CLICK_HERE--}</a>';
-                       } else {
-                               // e-currency payout request
-                               if (empty($content['target_account'])) $content['target_account'] = '---';
-                               if (empty($content['target_bank']))    $content['target_bank']    = '---';
-                       }
+                       } // END - if
 
                        // Add/Translate some data
-                       $content['sw']               = $SW;
                        $content['payout_timestamp'] = generateDateTime($content['payout_timestamp'], 2);
 
                        // Add row and switch color
                        $OUT .= loadTemplate('admin_list_payouts_row', true, $content);
-                       $SW = 3 - $SW;
                } // END - while
 
                // Free memory