]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_payouts.php
AJAX installation is 'basicly finished' :) Plus I threw in a small christmas present...
[mailer.git] / inc / modules / admin / what-list_payouts.php
index 1ad813d8af72d96916d7ba5f5ae5845a199afbd8..a4c330c85a5bb352d8c14e665d1a9e6f77a724d0 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -45,7 +45,7 @@ addYouAreHereLink('admin', __FILE__);
 
 if (isGetRequestElementSet('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",
+       $result = SQL_QUERY_ESC("SELECT `userid`, `target_account`, `payout_total`, `payout_timestamp`, `password` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `id`=%s LIMIT 1",
                array(getRequestElement('pid')), __FILE__, __LINE__);
        list($userid, $tuserid, $points, $tstamp, $tpass) = SQL_FETCHROW($result);
        SQL_FREERESULT($result);
@@ -70,7 +70,7 @@ if (isGetRequestElementSet('pid')) {
                // Load user's data
                if (!fetchUserData($userid)) {
                        // Abort here because it is not valid!
-                       debug_report_bug(__FILE__, __LINE__, 'No user account ' . $userid . ' found.');
+                       reportBug(__FILE__, __LINE__, 'No user account ' . $userid . ' found.');
                } // END - if
 
                if ((getRequestElement('do') == 'accept') && (getUserData('email') != '')) {
@@ -89,7 +89,13 @@ if (isGetRequestElementSet('pid')) {
                                if (!empty($ptype)) {
                                        // Obtain data from payout type
                                        $result = SQL_QUERY_ESC("SELECT
-       `from_account`,`from_pass`,`engine_url`,`engine_ret_ok`,`engine_ret_failed`,`pass_enc`,`allow_url`
+       `from_account`,
+       `from_pass`,
+       `engine_url`,
+       `engine_ret_ok`,
+       `engine_ret_failed`,
+       `pass_enc`,
+       `allow_url`
 FROM
        `{?_MYSQL_PREFIX?}_payout_types`
 WHERE
@@ -118,7 +124,7 @@ LIMIT 1",
                                                } // END - switch
 
                                                // Transfer variables...
-                                               $reason = encodeString(getMessage('ADMIN_PAYOUT_REASON'), false);
+                                               $reason = encodeString(getMessage('ADMIN_PAYOUT_REASON'), FALSE);
 
                                                // Execute transfer
                                                $ret = sendGetRequest($data['engine_url']);
@@ -131,7 +137,7 @@ LIMIT 1",
                                                // Clear task
                                                if ($taskId > 0) {
                                                        runFilterChain('solve_task', $taskId);
-                                               }
+                                               } // END - if
 
                                                // Clear payout request
                                                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_payouts` SET `status`='ACCEPTED' WHERE `id`=%s LIMIT 1",
@@ -154,11 +160,11 @@ LIMIT 1",
                                        } else {
                                                // Something goes wrong... :-(
                                                $content = implode('<br />', $ret);
-                                               loadTemplate('admin_payout_failed_transfer', false, $content);
+                                               loadTemplate('admin_payout_failed_transfer', FALSE, $content);
                                        }
                                } else {
                                        // Cannot load payout id
-                                       loadTemplate('admin_settings_unsaved', false, '{--ADMIN_PAYOUT_FAILED_OBTAIN_PAYOUT_ID--}');
+                                       loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_PAYOUT_FAILED_OBTAIN_PAYOUT_ID--}');
                                }
                        } else {
                                // Prepare content
@@ -169,7 +175,7 @@ LIMIT 1",
                                );
 
                                // Load template
-                               loadTemplate('admin_payout_accept_form', false, $content);
+                               loadTemplate('admin_payout_accept_form', FALSE, $content);
                        }
                } elseif ((getRequestElement('do') == 'reject') && (getUserData('email') != '')) {
                        // Ok, now we can output the form or execute rejecting
@@ -200,7 +206,7 @@ LIMIT 1",
                                );
 
                                // Load template
-                               loadTemplate('admin_payout_reject_form', false, $content);
+                               loadTemplate('admin_payout_reject_form', FALSE, $content);
                        }
                } else {
                        // Cannot load user data
@@ -248,10 +254,10 @@ ORDER BY
                                // Banner/Textlink views/clicks request
                                if (!empty($content['banner'])) {
                                        // Load template for the banner
-                                       $content['target_account'] = loadTemplate('admin_list_payouts_banner', true, $content);
+                                       $content['target_account'] = loadTemplate('admin_list_payouts_banner', TRUE, $content);
                                } else {
                                        // Textlink
-                                       $content['target_account'] = loadTemplate('admin_list_payouts_txt', true, $content);
+                                       $content['target_account'] = loadTemplate('admin_list_payouts_txt', TRUE, $content);
                                }
 
                                // Admins can addionally test the URL for framekillers
@@ -262,14 +268,14 @@ ORDER BY
                        $content['payout_timestamp'] = generateDateTime($content['payout_timestamp'], 2);
 
                        // Add row and switch color
-                       $OUT .= loadTemplate('admin_list_payouts_row', true, $content);
+                       $OUT .= loadTemplate('admin_list_payouts_row', TRUE, $content);
                } // END - while
 
                // Free memory
                SQL_FREERESULT($result);
 
                // Load final template
-               loadTemplate('admin_list_payouts', false, $OUT);
+               loadTemplate('admin_list_payouts', FALSE, $OUT);
        } else {
                // No payout requests are sent so far
                displayMessage('{--ADMIN_PAYOUT_NO_REQUESTS_FOUND--}');