X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_email.php;h=3242fcc33517ac3f13ee901a4d7ea40c0ebf7c98;hp=8af929b1113dffb1b92686ecdf4023f10aa36868;hb=a226d81121cb96048b1ed85fd8584a87d435b0db;hpb=cf3765c38cf0a76f396aca291f71858936e92956 diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php index 8af929b111..3242fcc335 100644 --- a/inc/modules/admin/what-config_email.php +++ b/inc/modules/admin/what-config_email.php @@ -46,15 +46,15 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Remove empty array index -if (!isPostRequestParameterSet(('max'))) unsetPostRequestParameter(('add_max')); +if (!isPostRequestParameterSet('max')) unsetPostRequestParameter('add_max'); -if (isPostRequestParameterSet(('add_max'))) { +if (isPostRequestParameterSet('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__); if (SQL_HASZERONUMS($result)) { // Add this value (including comment) - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES ('%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (`value`, `comment`) VALUES ('%s','%s')", array(bigintval(postRequestParameter('max')), postRequestParameter('comment')),__FILE__, __LINE__); $content = '{--ADMIN_MAX_VALUE_SAVED--}'; } else { @@ -98,7 +98,7 @@ if (isPostRequestParameterSet(('add_max'))) { // Display message loadTemplate('admin_settings_saved', false, $TEXT); } // END - if -} elseif ((isFormSent('del')) && (countPostSelection() > 0)) { +} elseif ((isFormSent('del')) && (ifPostContainsSelections())) { // Delete entries $OUT = ''; foreach (postRequestParameter('sel') as $id => $value) { @@ -115,7 +115,7 @@ if (isPostRequestParameterSet(('add_max'))) { // Load main template loadTemplate('admin_config_email_del', false, $content); -} elseif ((isFormSent('edit')) && (countPostSelection() > 0)) { +} elseif ((isFormSent('edit')) && (ifPostContainsSelections())) { // Edit entries $OUT = ''; foreach (postRequestParameter('sel') as $id => $value) { @@ -135,7 +135,7 @@ if (isPostRequestParameterSet(('add_max'))) { } else { $result = SQL_QUERY("SELECT `id`, `value`, `comment` FROM `{?_MYSQL_PREFIX?}_max_receive` ORDER BY `value` ASC", __FILE__, __LINE__); - if (SQL_NUMROWS($result) > 0) { + if (!SQL_HASZERONUMS($result)) { // List already existing entries for editing $OUT = ''; while ($content = SQL_FETCHARRAY($result)) {