X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_other.php;h=abd6b38f662a55cb842e3161b9fb0d515102b521;hp=9f00f402f812ef5fe34dfe2091c7bfa3255c9465;hb=cd7d344ea7007cfa20413acd3e03e50f0ab86d86;hpb=75ad748a68473ace540251427a74fb781b1145e9 diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index 9f00f402f8..abd6b38f66 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -1,7 +1,7 @@ 0 or your database will crow and crow and crow... - if (!isset($_POST['online_timeout'])) { unset($_POST['ok']); } + if (!isPostRequestElementSet('online_timeout')) { unsetPostRequestElement('ok'); } // Chedck other timestamps (which can be zero!) - if (!isset($_POST['profile_lock'])) { unset($_POST['ok']); } - if (!isset($_POST['url_tlock'])) { unset($_POST['ok']); } - if (!isset($_POST['profile_update'])) { unset($_POST['ok']); } - if (!isset($_POST['resend_profile_update'])) { unset($_POST['ok']); } + if (!isPostRequestElementSet('url_tlock')) { unsetPostRequestElement('ok'); } // Check other settings - if (!isset($_POST['max_send'])) { unset($_POST['ok']); } - if (!isset($_POST['max_tlength'])) { unset($_POST['ok']); } - if (!isset($_POST['unconfirmed'])) { unset($_POST['ok']); } - if (!isset($_POST['code_length'])) { unset($_POST['ok']); } - if (!isset($_POST['reject_url'])) { unset($_POST['ok']); } -} + if (!isPostRequestElementSet('max_send')) { unsetPostRequestElement('ok'); } + if (!isPostRequestElementSet('code_length')) { unsetPostRequestElement('ok'); } + if (!isPostRequestElementSet('reject_url')) { unsetPostRequestElement('ok'); } +} // END - if -OPEN_TABLE("100%", "admin_content admin_content_align", ""); -if (isset($_POST['ok'])) -{ +if (isFormSent('save_config')) { // Update stamps directly - ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'"); -} - else -{ - // Transfer config data into constants for the template (DO NOT set $CONFIG as global in LOAD_TEMPLATE!!!) - define('_CFG_UNCONFIRMED' , $CONFIG['unconfirmed']); - define('_CFG_MAX_TLENGTH' , $CONFIG['max_tlength']); - define('_CFG_CODE_LENGTH' , $CONFIG['code_length']); - define('_CFG_ACT_SYSTEM' , $CONFIG['activate_xchange']); - define('_CFG_MAX_SEND' , $CONFIG['max_send']); - define('_CFG_REJECT_URL' , $CONFIG['reject_url']); + adminSaveSettingsFromPostData(); +} else { + // Time selection boxes + $content['online_timeout'] = createConfigurationTimeSelections('online_timeout' , 'ms'); + $content['url_tlock'] = createConfigurationTimeSelections('url_tlock' , 'WDh'); + + // Prepare more + foreach (array('css_php_direct','css_php_file','css_php_inline','mailid_error_redirect_index','mailid_error_redirect_reject') as $entry) { + $content[$entry] = ''; + } // END - foreach - // Is there the pro-version function avaiable to create selection boxes instead of input boxes? - if (function_exists('CREATE_TIME_SELECTIONS')) - { - // Only pro versions: time selection boxes - define('_CFG_ONLINE_TIMEOUT', CREATE_TIME_SELECTIONS($CONFIG['online_timeout'], "ip_timeout" , "ms")); - define('_CFG_URL_TLOCK' , CREATE_TIME_SELECTIONS($CONFIG['url_tlock'] , "url_tlock" , "WDh")); - define('_CFG_PROFILE_LOCK' , CREATE_TIME_SELECTIONS($CONFIG['profile_lock'] , "profile_lock" , "WDh")); - define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS($CONFIG['profile_update'], "profile_update" , "YM")); - define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS($CONFIG['resend_profile_update'] , "resend_profile_update", "MWD")); - } - else - { - // Normal input boxes - define('_CFG_ONLINE_TIMEOUT', " (".SECS.")"); - define('_CFG_URL_TLOCK' , " (".SECS.")"); - define('_CFG_PROFILE_LOCK' , " (".SECS.")"); - define('_CFG_PROFILE_UPDATE', " (".SECS.")"); - define('_CFG_PROF_REUPDATE' , " (".SECS.")"); - } + for ($i = '0'; $i <= 5; $i++) { + $content['max_comma_' . $i] = ''; + } // END - for - if ($CONFIG['test_text'] == "N") - { - define('_CFG_TEST_TEXT_N', " checked"); - define('_CFG_TEST_TEXT_Y', ""); - } - else - { - define('_CFG_TEST_TEXT_N', ""); - define('_CFG_TEST_TEXT_Y', " checked"); - } - if ($CONFIG['test_subj'] == "N") - { - define('_CFG_TEST_SUBJ_N', " checked"); - define('_CFG_TEST_SUBJ_Y', ""); - } - else - { - define('_CFG_TEST_SUBJ_N', ""); - define('_CFG_TEST_SUBJ_Y', " checked"); - } - if ($CONFIG['url_blacklist'] == "N") - { - define('_CFG_URL_BLIST_N', " checked"); - define('_CFG_URL_BLIST_Y', ""); - } - else - { - define('_CFG_URL_BLIST_N', ""); - define('_CFG_URL_BLIST_Y', " checked"); - } - if ($CONFIG['order_multi_page'] == "N") - { - define('_CFG_ORDER_MULTI_N', " checked"); - define('_CFG_ORDER_MULTI_Y', ""); - } - else - { - define('_CFG_ORDER_MULTI_N', ""); - define('_CFG_ORDER_MULTI_Y', " checked"); - } - if ($CONFIG['autosend_active'] == "N") - { - define('_CFG_AUTOSEND_ACTIVE_N', " checked"); - define('_CFG_AUTOSEND_ACTIVE_Y', ""); - } - else - { - define('_CFG_AUTOSEND_ACTIVE_N', ""); - define('_CFG_AUTOSEND_ACTIVE_Y', " checked"); - } - if ($CONFIG['send_prof_update'] == "N") - { - define('_CFG_SEND_UPDATE_N', " checked"); - define('_CFG_SEND_UPDATE_Y', ""); - } - else - { - define('_CFG_SEND_UPDATE_N', ""); - define('_CFG_SEND_UPDATE_Y', " checked"); - } - if ($CONFIG['admin_notify'] == "N") - { - define('_CFG_ADMIN_NOTIFY_N', " checked"); - define('_CFG_ADMIN_NOTIFY_Y', ""); - } - else - { - define('_CFG_ADMIN_NOTIFY_N', ""); - define('_CFG_ADMIN_NOTIFY_Y', " checked"); - } - if ($CONFIG['css_php'] == "DIRECT") - { - define('_CFG_CSS_PHP_DIRECT', " checked"); - define('_CFG_CSS_PHP_FILE', ""); - } - else - { - define('_CFG_CSS_PHP_DIRECT', ""); - define('_CFG_CSS_PHP_FILE', " checked"); - } - if ($CONFIG['guest_menu'] == "Y") - { - define('_CFG_GUEST_MENU_ACTIVE', " checked"); - define('_CFG_GUEST_MENU_INACTIVE', ""); - } - else - { - define('_CFG_GUEST_MENU_ACTIVE', ""); - define('_CFG_GUEST_MENU_INACTIVE', " checked"); - } - if ($CONFIG['member_menu'] == "Y") - { - define('_CFG_MEMBER_MENU_ACTIVE', " checked"); - define('_CFG_MEMBER_MENU_INACTIVE', ""); - } - else - { - define('_CFG_MEMBER_MENU_ACTIVE', ""); - define('_CFG_MEMBER_MENU_INACTIVE', " checked"); - } - if ($CONFIG['youre_here'] == "Y") - { - define('_CFG_YOURE_HERE_ACTIVE', " checked"); - define('_CFG_YOURE_HERE_INACTIVE', ""); - } - else - { - define('_CFG_YOURE_HERE_ACTIVE', ""); - define('_CFG_YOURE_HERE_INACTIVE', " checked"); - } + // Set selections + $content = merge_array($content, getCheckedConfig(array('css_php', 'mailid_error_redirect'))); - for ($i = 0; $i <= 5; $i++) - { - $eval = "define('_COMMA_DEF_".$i."', \"\");"; - if ($CONFIG['max_comma'] == $i) $eval = "define('_COMMA_DEF_".$i."', \" selected\");"; - eval($eval); - } + // Set selection + $content = merge_array($content, getSelectedConfig(array('max_comma'))); // Load template - LOAD_TEMPLATE("admin_config_other"); + loadTemplate('admin_config_other', FALSE, $content); } -CLOSE_TABLE(); -// + +// [EOF] ?>