X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_register2.php;h=2fe8f5bc132fe76839209650cacc0e377167be9b;hp=915b5c86945fee0e2adfce66a0ca353cc14dda47;hb=9afd6ec5878544a7982c50ed9c0dd7de37606d5b;hpb=75ad748a68473ace540251427a74fb781b1145e9 diff --git a/inc/modules/admin/what-config_register2.php b/inc/modules/admin/what-config_register2.php index 915b5c8694..2fe8f5bc13 100644 --- a/inc/modules/admin/what-config_register2.php +++ b/inc/modules/admin/what-config_register2.php @@ -12,7 +12,7 @@ * -------------------------------------------------------------------- * * Adapted from what-config_reg.php * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -32,40 +32,31 @@ ************************************************************************/ // Some security stuff... -if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) -{ - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } -global $link; - // Add description as navigation point -ADD_DESCR("admin", basename(__FILE__)); +addMenuDescription('admin', __FILE__); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); -if (isset($_POST['ok'])) -{ +if (isFormSent()) { // Calculate timestamp from selections... - $_POST['ip_timeout'] = CREATE_TIMESTAMP_FROM_SELECTIONS("ip_timeout", $_POST); - $_POST['least_cats'] = round($_POST['least_cats']); + setRequestPostElement('ip_timeout', createTimestampFromSelections('ip_timeout', postRequestArray())); + setRequestPostElement('least_cats', round(postRequestElement('least_cats'))); // Save settings - ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'"); -} - else -{ + adminSaveSettingsFromPostData(); +} else { // Remember stuff in constants - define('LEAST_CATS_VALUE' , round($CONFIG['least_cats'])); - define('__CFG_SHOW_REFID' , ADD_SELECTION("yn", $CONFIG['display_refid'] , "display_refid")); - define('__TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['ip_timeout'] , "ip_timeout", "Dhm")); - define('__CFG_DBL_EMAIL' , ADD_SELECTION("yn", $CONFIG['check_double_email'] , "check_double_email")); - define('__CFG_DBL_PASS' , ADD_SELECTION("yn", $CONFIG['check_double_pass'] , "check_double_pass")); - define('__CFG_CAT_DEFAULT' , ADD_SELECTION("yn", $CONFIG['register_default'], "register_default")); + $content['display_refid'] = addSelectionBox('yn', getConfig('display_refid') , 'display_refid'); + $content['ip_timeout'] = createTimeSelections(getConfig('ip_timeout') , 'ip_timeout', 'Dhm'); + $content['check_double_email'] = addSelectionBox('yn', getConfig('check_double_email'), 'check_double_email'); + $content['check_double_pass'] = addSelectionBox('yn', getConfig('check_double_pass') , 'check_double_pass'); + $content['register_default'] = addSelectionBox('yn', getConfig('register_default') , 'register_default'); // Load normal template - LOAD_TEMPLATE("admin_config_register2"); + loadTemplate('admin_config_register2', false, $content); } -CLOSE_TABLE(); -// + +// [EOF] ?>