X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_transfer.php;h=05bb78c3175dc699224fda1f3a647c2eb76009cc;hb=1c3cf7c8bd60ea09a2b268e37a2cb2d0ee0cdeef;hp=c4d3a673ba2d12e6a0f9a2586fcc2a8cda81c96d;hpb=7f104f6fe558bb56b4205241435a2357c2feece1;p=mailer.git diff --git a/inc/modules/admin/what-config_transfer.php b/inc/modules/admin/what-config_transfer.php index c4d3a673ba..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,43 +37,31 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!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); -} - -// 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']); + 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 -// Autppurge expired transfer entries? -switch ($_CONFIG['autopurge_inactive']) { - case 'Y': - define('__YES_AP', " selected=\"selected\""); - define('__NO_AP', ""); - break; + // Time selection box + $content['age_selection'] = createTimeSelections(getConfig('transfer_age'), 'transfer_age', 'MWDh'); + $content['timeout_selection'] = createTimeSelections(getConfig('transfer_timeout'), 'transfer_timeout', 'MWDh'); - 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] ?>