* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * 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 *
addYouAreHereLink('admin', __FILE__);
// Remove empty array index
-if (!isPostRequestParameterSet('max')) {
- unsetPostRequestParameter('add_max');
+if (!isPostRequestElementSet('max')) {
+ unsetPostRequestElement('add_max');
} // END - if
-if (isPostRequestParameterSet('add_max')) {
+if (isPostRequestElementSet('add_max')) {
// Save all settings
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='%s' LIMIT 1",
- array(bigintval(postRequestParameter('max'))), __FILE__, __LINE__);
+ array(bigintval(postRequestElement('max'))), __FILE__, __LINE__);
if (SQL_HASZERONUMS($result)) {
// Add this value (including comment)
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (`value`, `comment`) VALUES ('%s','%s')",
- array(bigintval(postRequestParameter('max')), postRequestParameter('comment')),__FILE__, __LINE__);
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (`value`,`comment`) VALUES ('%s','%s')",
+ array(bigintval(postRequestElement('max')), postRequestElement('comment')),__FILE__, __LINE__);
$content = '{--ADMIN_MAX_VALUE_SAVED--}';
} else {
// Value does alread exists!
- $content = '<span class="notice">{--ADMIN_MAX_VALUE_ALREADY--}</span>';
+ $content = '<span class="bad">{--ADMIN_MAX_VALUE_ALREADY--}</span>';
}
// Free memory
// Display message
displayMessage($content);
-} elseif ((isFormSent()) && (isGetRequestParameterSet('do'))) {
+} elseif ((isFormSent()) && (isGetRequestElementSet('do'))) {
// Change or delete entries...
$TEXT = '';
- foreach (postRequestParameter('id') as $id => $value) {
+ foreach (postRequestElement('id') as $id => $value) {
// Secure id
$id = bigintval($id);
- switch (postRequestParameter('do')) {
+ switch (getRequestElement('do')) {
case 'edit': // Change entries
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_max_receive` SET value='%s', comment='%s' WHERE `id`=%s LIMIT 1",
array(
- bigintval(postRequestParameter('val', $id)),
- postRequestParameter('comm', $id),
+ bigintval(postRequestElement('val', $id)),
+ postRequestElement('comm', $id),
$id
),__FILE__, __LINE__);
$TEXT = '{--ADMIN_MAX_RECEIVE_SAVED--}';
array($id), __FILE__, __LINE__);
$TEXT = '{--ADMIN_MAX_RECEIVE_DELETED--}';
break;
- }
- }
+ } // END - switch
+ } /// END - foreach
if (isset($TEXT)) {
// Display message
} elseif ((isFormSent('delete')) && (ifPostContainsSelections())) {
// Delete entries
$OUT = '';
- foreach (postRequestParameter('sel') as $id => $value) {
+ foreach (postRequestElement('sel') as $id => $value) {
// Load data
- $result = SQL_QUERY_ESC("SELECT `id`, `value`, `comment` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `id`,`value`,`comment` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `id`=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
$content = SQL_FETCHARRAY($result);
SQL_FREERESULT($result);
} elseif ((isFormSent('edit')) && (ifPostContainsSelections())) {
// Edit entries
$OUT = '';
- foreach (postRequestParameter('sel') as $id => $value) {
+ foreach (postRequestElement('sel') as $id => $value) {
// Load data
- $result = SQL_QUERY_ESC("SELECT `id`, `value`, `comment` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `id`,`value`,`comment` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `id`=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
$content = SQL_FETCHARRAY($result);
SQL_FREERESULT($result);
// Load main template
loadTemplate('admin_edit_email_max_rec', false, $content);
} else {
- $result = SQL_QUERY("SELECT `id`, `value`, `comment` FROM `{?_MYSQL_PREFIX?}_max_receive` ORDER BY `value` ASC",
+ $result = SQL_QUERY("SELECT `id`,`value`,`comment` FROM `{?_MYSQL_PREFIX?}_max_receive` ORDER BY `value` ASC",
__FILE__, __LINE__);
if (!SQL_HASZERONUMS($result)) {
// List already existing entries for editing