2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 08/31/2008 *
4 * =================== Last change: 08/31/2008 *
6 * -------------------------------------------------------------------- *
7 * File : what-config_surfbar.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Configuration for surfbar *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Konfiguration fuer Surfbar *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * Needs to be in all Files and every File needs "svn propset *
18 * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
19 * -------------------------------------------------------------------- *
20 * Copyright (c) 2003 - 2009 by Roland Haeder *
21 * For more information visit: http://www.mxchange.org *
23 * This program is free software; you can redistribute it and/or modify *
24 * it under the terms of the GNU General Public License as published by *
25 * the Free Software Foundation; either version 2 of the License, or *
26 * (at your option) any later version. *
28 * This program is distributed in the hope that it will be useful, *
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
31 * GNU General Public License for more details. *
33 * You should have received a copy of the GNU General Public License *
34 * along with this program; if not, write to the Free Software *
35 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
37 ************************************************************************/
39 // Some security stuff...
40 if ((!defined('__SECURITY')) || (!isAdmin())) {
44 // Add description as navigation point
45 addMenuDescription('admin', __FILE__);
47 // Was the form submitted?
49 // Replace german decimal comma with computer decimal dot
50 if (isPostRequestElementSet(('surfbar_static_reward'))) setRequestPostElement('surfbar_static_reward' , convertCommaToDot(postRequestElement('surfbar_static_reward')));
51 if (isPostRequestElementSet(('surfbar_static_costs'))) setRequestPostElement('surfbar_static_costs' , convertCommaToDot(postRequestElement('surfbar_static_costs')));
52 if (isPostRequestElementSet(('surfbar_dynamic_percent'))) setRequestPostElement('surfbar_dynamic_percent', convertCommaToDot(postRequestElement('surfbar_dynamic_percent')));
55 adminSaveSettingsFromPostData();
59 'surfbar_static_reward' => translateComma(getConfig('surfbar_static_reward')),
60 'surfbar_static_costs' => translateComma(getConfig('surfbar_static_costs')),
61 'surfbar_static_time' => createTimeSelections(getConfig('surfbar_static_time') , 'surfbar_static_time' , 'ms' , 'left'),
62 'surfbar_static_lock' => createTimeSelections(getConfig('surfbar_static_lock') , 'surfbar_static_lock' , 'hm' , 'left'),
63 'surfbar_restart_time' => createTimeSelections(getConfig('surfbar_restart_time') , 'surfbar_restart_time' , 'ms' , 'left'),
64 'surfbar_dynamic_percent' => translateComma(getConfig('surfbar_dynamic_percent')),
65 'surfbar_max_order' => getConfig('surfbar_max_order'),
66 'surfbar_stats_reload' => createTimeSelections(getConfig('surfbar_stats_reload') , 'surfbar_stats_reload' , 'ms' , 'left'),
67 'surfbar_purge_deleted' => createTimeSelections(getConfig('surfbar_purge_deleted') , 'surfbar_purge_deleted' , 'WDh', 'left'),
68 'surfbar_purge_migrated' => createTimeSelections(getConfig('surfbar_purge_migrated'), 'surfbar_purge_migrated', 'WDh', 'left'),
69 'surfbar_pause_url' => getConfig('surfbar_pause_url'),
70 'surfbar_warn_low_points' => getConfig('surfbar_warn_low_points'),
71 'surfbar_low_interval' => createTimeSelections(getConfig('surfbar_low_interval') , 'surfbar_low_interval' , 'WDh', 'left'),
74 // Prepare further Y/N config entries
75 foreach (array('surfbar_autostart','surfbar_notify_limits','surfbar_notify_admin_unlock','surfbar_migrate_order','surfbar_guest_login_form') as $entry) {
76 $content[$entry . '_y'] = '';
77 $content[$entry . '_n'] = '';
78 $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
82 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) {
83 $content[$entry] = '';
87 foreach (array('surfbar_pay_model','surfbar_pause_mode','surfbar_notification_mode') as $entry) {
88 $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
92 loadTemplate('admin_config_surfbar', false, $content);