X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fadmin%2Fwhat-list_sponsor_pay.php;h=77676c6544b9dbc1d89457ad090354ba3a2d5d9b;hb=63f159414369b5ea19a8ca75d8cd8033c45d8341;hp=61d759bff005f4646615430f4e7d274cbc886163;hpb=0f3a135204757cc8750262871c8e62c42300acb4;p=mailer.git diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index 61d759bff0..77676c6544 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 = '{%message,ADMIN_SPONSOR_PAYTYPE_ADDED=' . postRequestParameter('pay_name') . '%}'; + $message = '{%message,ADMIN_SPONSOR_PAYTYPE_ADDED=' . postRequestElement('pay_name') . '%}'; } else { // Entry does already exists - $message = '{%message,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__);