X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_surfbar.php;h=33b20d32f5eac699edbea0eb585d4e514aa6fcb1;hb=4f7df133f736da124e6f7bd02008b9093f736451;hp=3b34e9b6563623c5aed410c4f6056d7cbae8f4e9;hpb=bc72f913ef9ef26f4103d3deddb4d8be5337a1e5;p=mailer.git diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index 3b34e9b656..33b20d32f5 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -14,11 +14,10 @@ * $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 - 2009 by Roland Haeder * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -39,57 +38,40 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!isAdmin())) { die(); -} +} // END - if // Add description as navigation point -addMenuDescription('admin', __FILE__); +addYouAreHereLink('admin', __FILE__); // Was the form submitted? -if (isFormSent()) { +if (isFormSent('save_config')) { // Replace german decimal comma with computer decimal dot - if (isPostRequestElementSet(('surfbar_static_reward'))) setPostRequestElement('surfbar_static_reward' , convertCommaToDot(postRequestElement('surfbar_static_reward'))); - if (isPostRequestElementSet(('surfbar_static_costs'))) setPostRequestElement('surfbar_static_costs' , convertCommaToDot(postRequestElement('surfbar_static_costs'))); - if (isPostRequestElementSet(('surfbar_dynamic_percent'))) setPostRequestElement('surfbar_dynamic_percent', convertCommaToDot(postRequestElement('surfbar_dynamic_percent'))); + convertCommaToDotInPostDataArray(array('surfbar_static_reward', 'surfbar_static_costs', 'surfbar_dynamic_percent')); // Save settings adminSaveSettingsFromPostData(); } else { // Prepare content $content = array( - 'surfbar_static_reward' => translateComma(getConfig('surfbar_static_reward')), - 'surfbar_static_costs' => translateComma(getConfig('surfbar_static_costs')), - 'surfbar_static_time' => createTimeSelections(getConfig('surfbar_static_time') , 'surfbar_static_time' , 'ms' , 'left'), - 'surfbar_static_lock' => createTimeSelections(getConfig('surfbar_static_lock') , 'surfbar_static_lock' , 'hm' , 'left'), - 'surfbar_restart_time' => createTimeSelections(getConfig('surfbar_restart_time') , 'surfbar_restart_time' , 'ms' , 'left'), - 'surfbar_dynamic_percent' => translateComma(getConfig('surfbar_dynamic_percent')), - 'surfbar_max_order' => getConfig('surfbar_max_order'), - 'surfbar_stats_reload' => createTimeSelections(getConfig('surfbar_stats_reload') , 'surfbar_stats_reload' , 'ms' , 'left'), - 'surfbar_purge_deleted' => createTimeSelections(getConfig('surfbar_purge_deleted') , 'surfbar_purge_deleted' , 'WDh', 'left'), - 'surfbar_purge_migrated' => createTimeSelections(getConfig('surfbar_purge_migrated'), 'surfbar_purge_migrated', 'WDh', 'left'), - 'surfbar_pause_url' => getConfig('surfbar_pause_url'), - 'surfbar_warn_low_points' => getConfig('surfbar_warn_low_points'), - 'surfbar_low_interval' => createTimeSelections(getConfig('surfbar_low_interval') , 'surfbar_low_interval' , 'WDh', 'left'), + 'surfbar_static_time' => createConfigurationTimeSelections('surfbar_static_time' , 'ms' , 'left'), + 'surfbar_static_lock' => createConfigurationTimeSelections('surfbar_static_lock' , 'hm' , 'left'), + 'surfbar_restart_time' => createConfigurationTimeSelections('surfbar_restart_time' , 'ms' , 'left'), + 'surfbar_stats_reload' => createConfigurationTimeSelections('surfbar_stats_reload' , 'ms' , 'left'), + 'surfbar_purge_deleted' => createConfigurationTimeSelections('surfbar_purge_deleted' , 'WDh', 'left'), + 'surfbar_purge_migrated' => createConfigurationTimeSelections('surfbar_purge_migrated', 'WDh', 'left'), + 'surfbar_low_interval' => createConfigurationTimeSelections('surfbar_low_interval' , 'WDh', 'left'), ); - // Prepare further Y/N config entries - foreach (array('surfbar_autostart','surfbar_notify_limits','surfbar_notify_admin_unlock','surfbar_migrate_order','surfbar_guest_login_form') as $entry) { - $content[$entry . '_y'] = ''; - $content[$entry . '_n'] = ''; - $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; - } // END - foreach - // Even some more... - foreach (array('surfbar_pay_model_static','surfbar_pay_model_dynamic','surfbar_pause_mode_internal','surfbar_pause_mode_external','surfbar_notification_mode_instant','surfbar_notification_mode_reset') as $entry) { + foreach (array('surfbar_payment_model_static','surfbar_payment_model_dynamic','surfbar_pause_mode_internal','surfbar_pause_mode_external','surfbar_notification_mode_instant','surfbar_notification_mode_reset') as $entry) { $content[$entry] = ''; - } // END - if + } // END - foreach // Prepare selections - foreach (array('surfbar_pay_model','surfbar_pause_mode','surfbar_notification_mode') as $entry) { - $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; - } // END - foreach + $content = merge_array($content, getCheckedConfig(array('surfbar_payment_model','surfbar_pause_mode','surfbar_notification_mode'))); // Load template - loadTemplate('admin_config_surfbar', false, $content); + loadTemplate('admin_config_surfbar', FALSE, $content); } // [EOF]