X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_payouts.php;h=a4c330c85a5bb352d8c14e665d1a9e6f77a724d0;hb=1d22c70e65e858422ee0d17a7612f4b5c0757a42;hp=b846eb8b56352f3925ca4d6267d15375ff2ecb67;hpb=425acd4e0e78608016f9fc2872aafc0140f49b71;p=mailer.git
diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php
index b846eb8b56..a4c330c85a 100644
--- a/inc/modules/admin/what-list_payouts.php
+++ b/inc/modules/admin/what-list_payouts.php
@@ -14,12 +14,10 @@
* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
- * Needs to be in all Files and every File needs "svn propset *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009, 2010 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * 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 *
* it under the terms of the GNU General Public License as published by *
@@ -43,17 +41,17 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
} // END - if
// Add description as navigation point
-addMenuDescription('admin', __FILE__);
+addYouAreHereLink('admin', __FILE__);
-if (isGetRequestParameterSet('pid')) {
+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",
- array(getRequestParameter('pid')), __FILE__, __LINE__);
+ $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);
// Obtain some data
- if (!isGetRequestParameterSet('task') && (!empty($userid)) && (isValidUserId($userid))) {
+ if (!isGetRequestElementSet('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__);
@@ -62,25 +60,25 @@ if (isGetRequestParameterSet('pid')) {
if (empty($taskId)) $taskId = '0';
} elseif ((empty($userid)) || ($userid == '0')) {
// Cannot obtain member id!
- loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_FAILED_OBTAIN_USERID--}');
+ displayMessage('{--ADMIN_PAYOUT_FAILED_OBTAIN_USERID--}');
} else {
// Get task id from URL
- $taskId = getRequestParameter('task');
+ $taskId = getRequestElement('task');
}
if ((!empty($taskId)) && (!empty($userid)) && (isValidUserId($userid))) {
// 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 ((getRequestParameter('do') == 'accept') && (getUserData('email') != '')) {
+ if ((getRequestElement('do') == 'accept') && (getUserData('email') != '')) {
// Ok, now we can output the form or execute accepting
if (isFormSent()) {
// Obtain payout type and other data
$result = SQL_QUERY_ESC("SELECT `payout_id` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `id`=%s LIMIT 1",
- array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__);
// Load ptype (id)
list($ptype) = SQL_FETCHROW($result);
@@ -91,7 +89,13 @@ if (isGetRequestParameterSet('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
@@ -120,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']);
@@ -133,47 +137,47 @@ 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",
- array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__);
// Send out mail
- $message = loadEmailTemplate('member_payout_accepted', postRequestParameter('text'), $userid);
+ $message = loadEmailTemplate('member_payout_accepted', postRequestElement('text'), $userid);
// Output message
if ($data['allow_url'] == 'Y') {
// Banner / Textlink request
- loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_BANNER_ACCEPTED_NOTIFIED--}');
+ displayMessage('{--ADMIN_PAYOUT_BANNER_ACCEPTED_NOTIFIED--}');
} else {
// Normal request
- loadTemplate('admin_settings_saved', false, '{--ADMIN_PAYOUT_ACCEPTED_NOTIFIED--}');
+ displayMessage('{--ADMIN_PAYOUT_ACCEPTED_NOTIFIED--}');
}
// Finally send mail
- sendEmail(getUserData('email'), '{--MEMBER_PAYOUT_ACCEPTED_SUBJECT--}', $message);
+ sendEmail(getUserData('userid'), '{--MEMBER_PAYOUT_ACCEPTED_SUBJECT--}', $message);
} else {
// Something goes wrong... :-(
$content = implode('
', $ret);
- loadTemplate('admin_payout_failed_transfer', false, $content);
+ loadTemplate('admin_payout_failed_transfer', FALSE, $content);
}
} else {
// Cannot load payout id
- loadTemplate('admin_settings_saved', false, '