X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_other.php;h=a9a82960839e98a9715bb0e6aefa0835e258b39d;hp=15427baa3b2382ecf99c4ab295aee602fa8fa4a4;hb=f97a999e0737c0007ae9c3c26dfef49f75a175ac;hpb=8383fc52cd2340ea1756f9e1808fa3589e27c341 diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index 15427baa3b..a9a8296083 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Grund Einstellungen * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -32,212 +37,157 @@ ************************************************************************/ // Some security stuff... -if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) -{ - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; +if ((!defined('__SECURITY')) || (!IS_ADMIN())) { + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); -} elseif ((!EXT_IS_ACTIVE("other")) || (GET_EXT_VERSION("other") == "")) { +} elseif (!EXT_IS_ACTIVE('other')) { // Missing extension! - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "other")); + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'other'); return; } -global $link; // Add description as navigation point -ADD_DESCR("admin", basename(__FILE__)); +ADD_DESCR('admin', __FILE__); // Stop saving data if one input field is !isset -if (isset($_POST['ok'])) -{ - if (function_exists('CREATE_TIME_SELECTIONS')) - { - // Calculate stamps and set calculated stamps - $_POST['online_timeout'] = CREATE_TIMESTAMP_FROM_SELECTIONS("ip_timeout" , $_POST); - $_POST['url_tlock'] = CREATE_TIMESTAMP_FROM_SELECTIONS("url_tlock" , $_POST); - $_POST['profile_lock'] = CREATE_TIMESTAMP_FROM_SELECTIONS("profile_lock" , $_POST); - $_POST['profile_update'] = CREATE_TIMESTAMP_FROM_SELECTIONS("profile_update" , $_POST); - $_POST['resend_profile_update'] = CREATE_TIMESTAMP_FROM_SELECTIONS("resend_profile_update", $_POST); - } +if (IS_FORM_SENT()) { + // Calculate stamps and set calculated stamps + REQUEST_POST('online_timeout') = CREATE_TIMESTAMP_FROM_SELECTIONS('ip_timeout' , REQUEST_POST_ARRAY()); + REQUEST_POST('url_tlock') = CREATE_TIMESTAMP_FROM_SELECTIONS('url_tlock' , REQUEST_POST_ARRAY()); + REQUEST_POST('profile_lock') = CREATE_TIMESTAMP_FROM_SELECTIONS('profile_lock' , REQUEST_POST_ARRAY()); + REQUEST_POST('profile_update') = CREATE_TIMESTAMP_FROM_SELECTIONS('profile_update' , REQUEST_POST_ARRAY()); + REQUEST_SET_POST('resend_profile_update', CREATE_TIMESTAMP_FROM_SELECTIONS('resend_profile_update', REQUEST_POST_ARRAY())); // Online-Timeout shall be > 0 or your database will crow and crow and crow... - if (!isset($_POST['online_timeout'])) { unset($_POST['ok']); } + if (!REQUEST_ISSET_POST(('online_timeout'))) { REQUEST_UNSET_POST('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 (!REQUEST_ISSET_POST(('profile_lock'))) { REQUEST_UNSET_POST('ok'); } + if (!REQUEST_ISSET_POST(('url_tlock'))) { REQUEST_UNSET_POST('ok'); } + if (!REQUEST_ISSET_POST(('profile_update'))) { REQUEST_UNSET_POST('ok'); } + if (!REQUEST_ISSET_POST(('resend_profile_update'))) { REQUEST_UNSET_POST('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 (!REQUEST_ISSET_POST(('max_send'))) { REQUEST_UNSET_POST('ok'); } + if (!REQUEST_ISSET_POST(('code_length'))) { REQUEST_UNSET_POST('ok'); } + if (!REQUEST_ISSET_POST(('reject_url'))) { REQUEST_UNSET_POST('ok'); } } -OPEN_TABLE("100%", "admin_content admin_content_align", ""); -if (isset($_POST['ok'])) -{ +if (IS_FORM_SENT()) { // Update stamps directly - ADMIN_SAVE_SETTINGS($_POST); -} - 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']); - - // 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.")"); - } + ADMIN_SAVE_SETTINGS_POST(); +} else { + // Transfer config data into constants for the template + define('_CFG_CODE_LENGTH', getConfig('code_length')); + define('_CFG_ACT_SYSTEM' , getConfig('activate_xchange')); + define('_CFG_MAX_SEND' , getConfig('max_send')); + define('_CFG_REJECT_URL' , getConfig('reject_url')); + define('_CFG_MIN_AGE' , getConfig('min_age')); - 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', ""); + // Time selection boxes + define('_CFG_ONLINE_TIMEOUT', CREATE_TIME_SELECTIONS(getConfig('online_timeout'), 'ip_timeout' , 'ms')); + define('_CFG_URL_TLOCK' , CREATE_TIME_SELECTIONS(getConfig('url_tlock') , 'url_tlock' , 'WDh')); + define('_CFG_PROFILE_LOCK' , CREATE_TIME_SELECTIONS(getConfig('profile_lock') , 'profile_lock' , 'WDh')); + define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS(getConfig('profile_update'), 'profile_update' , 'YM')); + define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS(getConfig('resend_profile_update') , 'resend_profile_update', 'MWD')); + + if (getConfig('order_multi_page') != 'Y') { + define('_CFG_ORDER_MULTI_N', ' chkecked="checked"'); + define('_CFG_ORDER_MULTI_Y', ''); + } else { + define('_CFG_ORDER_MULTI_N', ''); + define('_CFG_ORDER_MULTI_Y', ' chkecked="checked"'); } - else - { - define('_CFG_SEND_UPDATE_N', ""); - define('_CFG_SEND_UPDATE_Y', ' checked'); + + if (getConfig('autosend_active') != "Y") { + define('_CFG_AUTOSEND_ACTIVE_N', ' chkecked="checked"'); + define('_CFG_AUTOSEND_ACTIVE_Y', ''); + } else { + define('_CFG_AUTOSEND_ACTIVE_N', ''); + define('_CFG_AUTOSEND_ACTIVE_Y', ' chkecked="checked"'); } - if ($_CONFIG['admin_notify'] == 'N') - { - define('_CFG_ADMIN_NOTIFY_N', ' checked'); - define('_CFG_ADMIN_NOTIFY_Y', ""); + + if (getConfig('send_prof_update') != "Y") { + define('_CFG_SEND_UPDATE_N', ' chkecked="checked"'); + define('_CFG_SEND_UPDATE_Y', ''); + } else { + define('_CFG_SEND_UPDATE_N', ''); + define('_CFG_SEND_UPDATE_Y', ' chkecked="checked"'); } - else - { - define('_CFG_ADMIN_NOTIFY_N', ""); - define('_CFG_ADMIN_NOTIFY_Y', ' checked'); + + if (getConfig('admin_notify') != "Y") { + define('_CFG_ADMIN_NOTIFY_N', ' chkecked="checked"'); + define('_CFG_ADMIN_NOTIFY_Y', ''); + } else { + define('_CFG_ADMIN_NOTIFY_N', ''); + define('_CFG_ADMIN_NOTIFY_Y', ' chkecked="checked"'); } - if ($_CONFIG['css_php'] == "DIRECT") - { - define('_CFG_CSS_PHP_DIRECT', ' checked'); - define('_CFG_CSS_PHP_FILE', ""); + + if (getConfig('css_php') == "DIRECT") { + define('_CFG_CSS_PHP_DIRECT', ' chkecked="checked"'); + define('_CFG_CSS_PHP_FILE', ''); + } else { + define('_CFG_CSS_PHP_DIRECT', ''); + define('_CFG_CSS_PHP_FILE', ' chkecked="checked"'); } - else - { - define('_CFG_CSS_PHP_DIRECT', ""); - define('_CFG_CSS_PHP_FILE', ' checked'); + + if (getConfig('guest_menu') == 'Y') { + define('_CFG_GUEST_MENU_ACTIVE', ' chkecked="checked"'); + define('_CFG_GUEST_MENU_INACTIVE', ''); + } else { + define('_CFG_GUEST_MENU_ACTIVE', ''); + define('_CFG_GUEST_MENU_INACTIVE', ' chkecked="checked"'); } - if ($_CONFIG['guest_menu'] == 'Y') { - define('_CFG_GUEST_MENU_ACTIVE', ' checked'); - define('_CFG_GUEST_MENU_INACTIVE', ""); + + if (getConfig('member_menu') == 'Y') { + define('_CFG_MEMBER_MENU_ACTIVE', ' chkecked="checked"'); + define('_CFG_MEMBER_MENU_INACTIVE', ''); } else { - define('_CFG_GUEST_MENU_ACTIVE', ""); - define('_CFG_GUEST_MENU_INACTIVE', ' checked'); + define('_CFG_MEMBER_MENU_ACTIVE', ''); + define('_CFG_MEMBER_MENU_INACTIVE', ' chkecked="checked"'); } - if ($_CONFIG['member_menu'] == 'Y') { - define('_CFG_MEMBER_MENU_ACTIVE', ' checked'); - define('_CFG_MEMBER_MENU_INACTIVE', ""); + + if (getConfig('youre_here') == 'Y') { + define('_CFG_YOURE_HERE_ACTIVE', ' chkecked="checked"'); + define('_CFG_YOURE_HERE_INACTIVE', ''); } else { - define('_CFG_MEMBER_MENU_ACTIVE', ""); - define('_CFG_MEMBER_MENU_INACTIVE', ' checked'); + define('_CFG_YOURE_HERE_ACTIVE', ''); + define('_CFG_YOURE_HERE_INACTIVE', ' chkecked="checked"'); } - if ($_CONFIG['youre_here'] == 'Y') { - define('_CFG_YOURE_HERE_ACTIVE', ' checked'); - define('_CFG_YOURE_HERE_INACTIVE', ""); + + if (getConfig('show_timings') == 'Y') { + define('_CFG_SHOW_TIMINGS_Y', ' chkecked="checked"'); + define('_CFG_SHOW_TIMINGS_N', ''); } else { - define('_CFG_YOURE_HERE_ACTIVE', ""); - define('_CFG_YOURE_HERE_INACTIVE', ' checked'); + define('_CFG_SHOW_TIMINGS_Y', ''); + define('_CFG_SHOW_TIMINGS_N', ' chkecked="checked"'); } - if ($_CONFIG['show_timings'] == 'Y') { - define('_CFG_SHOW_TIMINGS_Y', ' checked'); - define('_CFG_SHOW_TIMINGS_N', ""); + + if (getConfig('show_points_unconfirmed') == 'Y') { + define('_CFG_SHOW_POINTS_UNCONFIRMED_Y', ' chkecked="checked"'); + define('_CFG_SHOW_POINTS_UNCONFIRMED_N', ''); } else { - define('_CFG_SHOW_TIMINGS_Y', ""); - define('_CFG_SHOW_TIMINGS_N', ' checked'); + define('_CFG_SHOW_POINTS_UNCONFIRMED_Y', ''); + define('_CFG_SHOW_POINTS_UNCONFIRMED_N', ' chkecked="checked"'); } - if ($_CONFIG['mailid_error_redirect'] == 'index') { - define('_CFG_MAILID_REDIRECT_INDEX', ' checked'); - define('_CFG_MAILID_REDIRECT_REJECT', ""); + + if (getConfig('mailid_error_redirect') == 'INDEX') { + define('_CFG_MAILID_REDIRECT_INDEX', ' chkecked="checked"'); + define('_CFG_MAILID_REDIRECT_REJECT', ''); } else { - define('_CFG_MAILID_REDIRECT_INDEX', ""); - define('_CFG_MAILID_REDIRECT_REJECT', ' checked'); + define('_CFG_MAILID_REDIRECT_INDEX', ''); + define('_CFG_MAILID_REDIRECT_REJECT', ' chkecked="checked"'); } - for ($i = 0; $i <= 5; $i++) - { + for ($i = 0; $i <= 5; $i++) { $eval = "define('_COMMA_DEF_".$i."', \"\");"; - if ($_CONFIG['max_comma'] == $i) $eval = "define('_COMMA_DEF_".$i."', \" selected\");"; + if (getConfig('max_comma') == $i) $eval = "define('_COMMA_DEF_".$i."', ' selected=\"selected\"');"; eval($eval); } // Load template LOAD_TEMPLATE("admin_config_other"); } -CLOSE_TABLE(); + // ?>