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' , REVERT_COMMA(REQUEST_POST('surfbar_static_reward')));
52 if (REQUEST_ISSET_POST(('surfbar_static_costs'))) REQUEST_SET_POST('surfbar_static_costs' , REVERT_COMMA(REQUEST_POST('surfbar_static_costs')));
53 if (REQUEST_ISSET_POST(('surfbar_dynamic_percent'))) REQUEST_SET_POST('surfbar_dynamic_percent', REVERT_COMMA(REQUEST_POST('surfbar_dynamic_percent')));
56 ADMIN_SAVE_SETTINGS_POST();
60 'surfbar_static_reward' => TRANSLATE_COMMA(getConfig('surfbar_static_reward')),
61 'surfbar_static_costs' => TRANSLATE_COMMA(getConfig('surfbar_static_costs')),
62 'surfbar_static_time' => CREATE_TIME_SELECTIONS(getConfig('surfbar_static_time') , "surfbar_static_time" , "ms" , "left"),
63 'surfbar_static_lock' => CREATE_TIME_SELECTIONS(getConfig('surfbar_static_lock') , "surfbar_static_lock" , "hm" , "left"),
64 'surfbar_restart_time' => CREATE_TIME_SELECTIONS(getConfig('surfbar_restart_time') , "surfbar_restart_time" , "ms" , "left"),
65 'surfbar_dynamic_percent' => TRANSLATE_COMMA(getConfig('surfbar_dynamic_percent')),
66 'surfbar_max_order' => getConfig('surfbar_max_order'),
67 'surfbar_stats_reload' => CREATE_TIME_SELECTIONS(getConfig('surfbar_stats_reload') , "surfbar_stats_reload" , "ms" , "left"),
68 'surfbar_purge_deleted' => CREATE_TIME_SELECTIONS(getConfig('surfbar_purge_deleted') , "surfbar_purge_deleted" , "WDh", "left"),
69 'surfbar_purge_migrated' => CREATE_TIME_SELECTIONS(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' => CREATE_TIME_SELECTIONS(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\"");
131 if (getConfig('surfbar_pause_mode') == "INTERNAL") {
132 // Internal pause page
133 define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', " checked=\"checked\"");
134 define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', "");
136 // External pause page (if not empty)
137 define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', "");
138 define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', " checked=\"checked\"");
142 if (getConfig('surfbar_notification_mode') == "INSTANT") {
143 // Instant notification
144 define('__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', " selected=\"selected\"");
145 define('__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET' , "");
148 define('__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', "");
149 define('__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET' , " selected=\"selected\"");
153 LOAD_TEMPLATE("admin_config_surfbar", false, $content);