X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fadmin%2Fwhat-list_sponsor_pay.php;h=e4eff806bc86121b3478ce9ff9fa10c4ec242f25;hb=2df9f7a53f8b1dd5164f87824a324ccb3b6634cb;hp=4efd831b63a6a777e5c8189299369eb4d698d254;hpb=c76a064ef78992c6eab593314d51f1841f8fb266;p=mailer.git diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index 4efd831b63..e4eff806bc 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 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 * @@ -47,25 +47,25 @@ $message = ''; if (isFormSent('add')) { // Check input variables - if (!isPostRequestParameterSet('pay_name')) unsetPostRequestParameter('add'); - if ((round(postRequestParameter('pay_rate')) == 0) || (!isPostRequestParameterSet('pay_rate'))) unsetPostRequestParameter('add'); + if (!isPostRequestElementSet('pay_name')) unsetPostRequestElement('add'); + if ((round(postRequestElement('pay_rate')) == 0) || (!isPostRequestElementSet('pay_rate'))) unsetPostRequestElement('add'); - setPostRequestParameter('pay_min_count', bigintval(postRequestParameter('pay_min_count'))); + setPostRequestElement('pay_min_count', bigintval(postRequestElement('pay_min_count'))); - if ((postRequestParameter('pay_min_count') == '0') || (!isPostRequestParameterSet('pay_min_count'))) unsetPostRequestParameter('add'); - if (!isPostRequestParameterSet('pay_currency')) unsetPostRequestParameter('add'); + if ((postRequestElement('pay_min_count') == '0') || (!isPostRequestElementSet('pay_min_count'))) unsetPostRequestElement('add'); + if (!isPostRequestElementSet('pay_currency')) unsetPostRequestElement('add'); } elseif ((isFormSent('edit')) || (isFormSent('delete')) || (isFormSent('do_edit')) || (isFormSent('do_delete'))) { // Check if at least one entry was selected - if (!isPostRequestParameterSet('id')) { + if (!isPostRequestElementSet('id')) { // Nothing selected for editing / deleting??? - unsetPostRequestParameter('edit'); - unsetPostRequestParameter('delete'); - unsetPostRequestParameter('do_edit'); - unsetPostRequestParameter('do_delete'); + unsetPostRequestElement('edit'); + unsetPostRequestElement('delete'); + unsetPostRequestElement('do_edit'); + unsetPostRequestElement('do_delete'); } elseif (isFormSent('do_edit')) { // Change entries here... - foreach (postRequestParameter('id') as $id => $sel) { + foreach (postRequestElement('id') as $id => $sel) { // Secure id $id = bigintval($id); @@ -81,10 +81,10 @@ WHERE `id`=%s LIMIT 1", array( - postRequestParameter('name', $id), - postRequestParameter('rate', $id), - bigintval(postRequestParameter('min', $id)), - postRequestParameter('curr', $id), + postRequestElement('name', $id), + postRequestElement('rate', $id), + bigintval(postRequestElement('min', $id)), + postRequestElement('curr', $id), $id ), __FILE__, __LINE__); } @@ -93,7 +93,7 @@ LIMIT 1", $message = '{--SPONSOR_PAY_ENTRIES_CHANGED--}'; } elseif (isFormSent('do_delete')) { // Remove entries here... - foreach (postRequestParameter('id') as $id => $sel) { + foreach (postRequestElement('id') as $id => $sel) { // Remove entry SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -112,22 +112,22 @@ LIMIT 1", if (isFormSent('add')) { // Check if entry with same name does exists $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `pay_name`='%s' LIMIT 1", - array(postRequestParameter('pay_name')), __FILE__, __LINE__); + array(postRequestElement('pay_name')), __FILE__, __LINE__); if (SQL_HASZERONUMS($result)) { // No entry found so add this line SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`, `pay_rate`, `pay_min_count`, `pay_currency`) VALUES ('%s','%s','%s','%s')", array( - postRequestParameter('pay_name'), - convertCommaToDot(postRequestParameter('pay_rate')), - bigintval(postRequestParameter('pay_min_count')), - postRequestParameter('pay_currency') + postRequestElement('pay_name'), + convertCommaToDot(postRequestElement('pay_rate')), + bigintval(postRequestElement('pay_min_count')), + postRequestElement('pay_currency') ), __FILE__, __LINE__); // Payment type added! - $message = getMaskedMessage('ADMIN_SPONSOR_PAYTYPE_ADDED', postRequestParameter('pay_name')); + $message = '{%message,ADMIN_SPONSOR_PAYTYPE_ADDED=' . postRequestElement('pay_name') . '%}'; } else { // Entry does already exists - $message = getMaskedMessage('ADMIN_SPONSOR_PAYTYPE_ALREADY', postRequestParameter('pay_name')); + $message = '{%message,ADMIN_SPONSOR_PAYTYPE_ALREADY=' . postRequestElement('pay_name') . '%}'; } // Free memory @@ -138,7 +138,7 @@ if (isFormSent('add')) { } elseif ((isFormSent('edit')) || (isFormSent('delete'))) { // Load all data $OUT = ''; - foreach (postRequestParameter('id') as $id => $sel) { + foreach (postRequestElement('id') as $id => $sel) { // Load entry $result = SQL_QUERY_ESC("SELECT `id`, `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -173,14 +173,18 @@ if (isFormSent('add')) { } else { // Load all payment types $result = SQL_QUERY("SELECT - `id`, `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` + `id`, + `pay_name`, + `pay_rate`, + `pay_min_count`, + `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` ORDER BY `pay_name` ASC", __FILE__, __LINE__); - // Do we have some paytypes setup? + // Are there some payment types setup? if (!SQL_HASZERONUMS($result)) { // Prepare variables for listing $OUT = '';