X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_transfer.php;h=05bb78c3175dc699224fda1f3a647c2eb76009cc;hb=5b794a32b30ec5322765c89a22c4c27aece94a42;hp=d128bbd6caef2895f9b0cb088fa07e8e94295330;hpb=75ad748a68473ace540251427a74fb781b1145e9;p=mailer.git diff --git a/inc/modules/admin/what-config_transfer.php b/inc/modules/admin/what-config_transfer.php index d128bbd6ca..05bb78c317 100644 --- a/inc/modules/admin/what-config_transfer.php +++ b/inc/modules/admin/what-config_transfer.php @@ -10,9 +10,14 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Konfiguration des Punktetransfersystems * * -------------------------------------------------------------------- * - * * + * $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 * + * 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,38 +37,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(); } + // Add description as navigation point -ADD_DESCR("admin", basename(__FILE__)); +addMenuDescription('admin', __FILE__); -if (isset($_POST['ok'])) -{ +if (isFormSent()) { // Save settings... - ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'"); -} + adminSaveSettingsFromPostData(); +} else { + // Init all Y/N elements + foreach (array('ap_transfer') as $entry) { + $content[$entry . '_y'] = ''; + $content[$entry . '_n'] = ''; + $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"'; + } // END - if -// Prepare constants for template -define('__TRANS_MAX_VALUE' , $CONFIG['transfer_max']); -define('__TRANS_BALANCE_VALUE', $CONFIG['transfer_balance']); -define('__TRANS_CODE_VALUE' , $CONFIG['transfer_code']); + // Time selection box + $content['age_selection'] = createTimeSelections(getConfig('transfer_age'), 'transfer_age', 'MWDh'); + $content['timeout_selection'] = createTimeSelections(getConfig('transfer_timeout'), 'transfer_timeout', 'MWDh'); -// Autppurge expired transfer entries? -switch ($CONFIG['ap_inactive']) -{ - case "Y": define('__YES_AP', " selected=\"selected\""); define('__NO_AP', ""); break; - case "N": define('__YES_AP', ""); define('__NO_AP', " selected=\"selected\""); break; + // Load template + loadTemplate('admin_config_transfer', false, $content); } -// Time selection box -define('__TRANS_AGE_SELECTION' , CREATE_TIME_SELECTIONS($CONFIG['transfer_age'], "transfer_age", "MWDh")); -define('__TRANS_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['transfer_timeout'], "transfer_timeout", "MWDh")); - -// Load template -LOAD_TEMPLATE("admin_config_transfer"); - -// +// [EOF] ?>