2 /************************************************************************
3 * MXChange v0.2.1 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 - 2008 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')) || (!IS_ADMIN())) {
41 $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
45 // Add description as navigation point
46 ADD_DESCR('admin', __FILE__);
48 // Was the form submitted?
50 // Replace german decimal comma with computer decimal dot
51 if (REQUEST_ISSET_POST(('surfbar_static_reward'))) REQUEST_SET_POST('surfbar_static_reward' , convertCommaToDot(REQUEST_POST('surfbar_static_reward')));
52 if (REQUEST_ISSET_POST(('surfbar_static_costs'))) REQUEST_SET_POST('surfbar_static_costs' , convertCommaToDot(REQUEST_POST('surfbar_static_costs')));
53 if (REQUEST_ISSET_POST(('surfbar_dynamic_percent'))) REQUEST_SET_POST('surfbar_dynamic_percent', convertCommaToDot(REQUEST_POST('surfbar_dynamic_percent')));
56 ADMIN_SAVE_SETTINGS_POST();
60 'surfbar_static_reward' => translateComma(getConfig('surfbar_static_reward')),
61 'surfbar_static_costs' => translateComma(getConfig('surfbar_static_costs')),
62 'surfbar_static_time' => createTimeSelections(getConfig('surfbar_static_time') , 'surfbar_static_time' , 'ms' , 'left'),
63 'surfbar_static_lock' => createTimeSelections(getConfig('surfbar_static_lock') , 'surfbar_static_lock' , 'hm' , 'left'),
64 'surfbar_restart_time' => createTimeSelections(getConfig('surfbar_restart_time') , 'surfbar_restart_time' , 'ms' , 'left'),
65 'surfbar_dynamic_percent' => translateComma(getConfig('surfbar_dynamic_percent')),
66 'surfbar_max_order' => getConfig('surfbar_max_order'),
67 'surfbar_stats_reload' => createTimeSelections(getConfig('surfbar_stats_reload') , 'surfbar_stats_reload' , 'ms' , 'left'),
68 'surfbar_purge_deleted' => createTimeSelections(getConfig('surfbar_purge_deleted') , 'surfbar_purge_deleted' , 'WDh', 'left'),
69 'surfbar_purge_migrated' => createTimeSelections(getConfig('surfbar_purge_migrated'), 'surfbar_purge_migrated', 'WDh', 'left'),
70 'surfbar_pause_url' => getConfig('surfbar_pause_url'),
71 'surfbar_warn_low_points' => getConfig('surfbar_warn_low_points'),
72 'surfbar_low_interval' => createTimeSelections(getConfig('surfbar_low_interval') , 'surfbar_low_interval' , 'WDh', 'left'),
75 // Prepare payment model for template
76 if (getConfig('surfbar_pay_model') == 'STATIC') {
78 define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , ' checked="checked"');
79 define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', '');
82 define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , '');
83 define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', ' checked="checked"');
87 if (getConfig('surfbar_autostart') == 'Y') {
89 define('__CONFIG_SURFBAR_AUTOSTART_Y', ' checked="checked"');
90 define('__CONFIG_SURFBAR_AUTOSTART_N', '');
93 define('__CONFIG_SURFBAR_AUTOSTART_Y', '');
94 define('__CONFIG_SURFBAR_AUTOSTART_N', ' checked="checked"');
97 // Prepare notify limits
98 if (getConfig('surfbar_notify_limits') == 'Y') {
100 define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y', ' checked="checked"');
101 define('__CONFIG_SURFBAR_NOTIFY_LIMITS_N', '');
104 define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y', '');
105 define('__CONFIG_SURFBAR_NOTIFY_LIMITS_N', ' checked="checked"');
108 // Prepare notify admin about unlocked emails
109 if (getConfig('surfbar_notify_admin_unlock') == 'Y') {
111 define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y', ' checked="checked"');
112 define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', '');
115 define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y', '');
116 define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', ' checked="checked"');
119 // Prepare order migration
120 if (getConfig('surfbar_migrate_order') == 'Y') {
122 define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y', ' checked="checked"');
123 define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', '');
126 define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y', '');
127 define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', ' checked="checked"');
130 // Prepare order migration
131 if (getConfig('surfbar_guest_login_form') == 'Y') {
133 define('__CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y', ' checked="checked"');
134 define('__CONFIG_SURFBAR_GUEST_LOGIN_FORM_N', '');
137 define('__CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y', '');
138 define('__CONFIG_SURFBAR_GUEST_LOGIN_FORM_N', ' checked="checked"');
142 if (getConfig('surfbar_pause_mode') == 'INTERNAL') {
143 // Internal pause page
144 define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', ' checked="checked"');
145 define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', '');
147 // External pause page (if not empty)
148 define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', '');
149 define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', ' checked="checked"');
153 if (getConfig('surfbar_notification_mode') == 'INSTANT') {
154 // Instant notification
155 define('__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', ' selected="selected"');
156 define('__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET' , '');
159 define('__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', '');
160 define('__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET' , ' selected="selected"');
164 LOAD_TEMPLATE('admin_config_surfbar', false, $content);