2 /************************************************************************
3 * MXChange v0.2.1 Start: 01/09/2005 *
4 * ================ Last change: 01/09/2005 *
6 * -------------------------------------------------------------------- *
7 * File : what-config_beg.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Setup beg link *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Bettel-Link einstellen *
12 * -------------------------------------------------------------------- *
14 * -------------------------------------------------------------------- *
15 * Copyright (c) 2003 - 2008 by Roland Haeder *
16 * For more information visit: http://www.mxchange.org *
18 * This program is free software; you can redistribute it and/or modify *
19 * it under the terms of the GNU General Public License as published by *
20 * the Free Software Foundation; either version 2 of the License, or *
21 * (at your option) any later version. *
23 * This program is distributed in the hope that it will be useful, *
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
26 * GNU General Public License for more details. *
28 * You should have received a copy of the GNU General Public License *
29 * along with this program; if not, write to the Free Software *
30 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
32 ************************************************************************/
34 // Some security stuff...
35 if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
36 $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
40 // Add description as navigation point
41 ADD_DESCR("admin", __FILE__);
44 // Translate german decimal commas to computer decimal dots
45 REQUEST_SET_POST('beg_points' , REVERT_COMMA(REQUEST_POST('beg_points') ));
46 REQUEST_SET_POST('beg_points_max' , REVERT_COMMA(REQUEST_POST('beg_points_max') ));
47 REQUEST_SET_POST('beg_notify_bonus', REVERT_COMMA(REQUEST_POST('beg_notify_bonus')));
50 ADMIN_SAVE_SETTINGS_POST();
52 // Remember new settings
53 setConfigEntry('beg_rallye' , REQUEST_POST('beg_rallye'));
54 setConfigEntry('beg_ral_en_notify', REQUEST_POST('beg_ral_en_notify'));
55 setConfigEntry('beg_ral_di_notify', REQUEST_POST('beg_ral_di_notify'));
57 // Prepare constants for the template
58 define('__BEG_POINTS' , TRANSLATE_COMMA(getConfig('beg_points') , false));
59 define('__BEG_POINTS_MAX' , TRANSLATE_COMMA(getConfig('beg_points_max') , false));
60 define('__BEG_NOTIFY_BONUS' , TRANSLATE_COMMA(getConfig('beg_notify_bonus'), false));
61 define('__BEG_TIMEOUT' , CREATE_TIME_SELECTIONS(getConfig('beg_timeout') , "beg_timeout" , "Dhm"));
62 define('__BEG_UID_TIMEOUT' , CREATE_TIME_SELECTIONS(getConfig('beg_uid_timeout'), "beg_uid_timeout", "Dhm"));
63 define('__BEG_REMOTE_IP_TIMEOUT', CREATE_TIME_SELECTIONS(getConfig('beg_ip_timeout') , "beg_ip_timeout" , "Dhm"));
64 define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS(getConfig('beg_notify_wait'), "beg_notify_wait", "ms" ));
65 define('__BEG_RANKS' , getConfig('beg_ranks'));
67 // Activate / Deactivate beg rallye (Y/N)
68 switch (getConfig('beg_rallye'))
71 define('__BEG_RALLYE_Y', " checked=\"checked\"");
72 define('__BEG_RALLYE_N', "");
76 define('__BEG_RALLYE_Y', "");
77 define('__BEG_RALLYE_N', " checked=\"checked\"");
81 switch (getConfig('beg_active'))
84 define('__BEG_ACTIVE_Y', " checked=\"checked\"");
85 define('__BEG_ACTIVE_N', "");
89 define('__BEG_ACTIVE_Y', "");
90 define('__BEG_ACTIVE_N', " checked=\"checked\"");
94 switch (getConfig('beg_mode'))
97 define('__BEG_MODE_DIRECT', " checked=\"checked\"");
98 define('__BEG_MODE_REF' , "");
102 define('__BEG_MODE_DIRECT', "");
103 define('__BEG_MODE_REF' , " checked=\"checked\"");
107 switch (getConfig('beg_ral_en_notify'))
110 define('__BEG_RAL_EN_NOTIFY_Y', " checked=\"checked\"");
111 define('__BEG_RAL_EN_NOTIFY_N', "");
115 define('__BEG_RAL_EN_NOTIFY_Y', "");
116 define('__BEG_RAL_EN_NOTIFY_N', " checked=\"checked\"");
120 switch (getConfig('beg_ral_di_notify'))
123 define('__BEG_RAL_DI_NOTIFY_Y', " checked=\"checked\"");
124 define('__BEG_RAL_DI_NOTIFY_N', "");
128 define('__BEG_RAL_DI_NOTIFY_Y', "");
129 define('__BEG_RAL_DI_NOTIFY_N', " checked=\"checked\"");
133 switch (getConfig('beg_new_mem_notify'))
136 define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked=\"checked\"");
137 define('__BEG_NEW_MEMBER_NOTIFY_N', "");
141 define('__BEG_NEW_MEMBER_NOTIFY_Y', "");
142 define('__BEG_NEW_MEMBER_NOTIFY_N', " checked=\"checked\"");
146 switch (getConfig('beg_include_own'))
149 define('__BEG_INCLUDE_OWN_Y', " checked=\"checked\"");
150 define('__BEG_INCLUDE_OWN_N', "");
154 define('__BEG_INCLUDE_OWN_Y', "");
155 define('__BEG_INCLUDE_OWN_N', " checked=\"checked\"");
159 switch (getConfig('beg_pay_mode')) {
161 define('__BEG_PAY_MODE_IMG' , " selected=\"selected\"");
162 define('__BEG_PAY_MODE_JS' , "");
163 define('__BEG_PAY_MODE_BOTH', "");
164 define('__BEG_PAY_MODE_NONE', "");
168 define('__BEG_PAY_MODE_IMG' , "");
169 define('__BEG_PAY_MODE_JS' , " selected=\"selected\"");
170 define('__BEG_PAY_MODE_BOTH', "");
171 define('__BEG_PAY_MODE_NONE', "");
175 define('__BEG_PAY_MODE_IMG' , "");
176 define('__BEG_PAY_MODE_JS' , "");
177 define('__BEG_PAY_MODE_BOTH', " selected=\"selected\"");
178 define('__BEG_PAY_MODE_NONE', "");
182 define('__BEG_PAY_MODE_IMG' , "");
183 define('__BEG_PAY_MODE_JS' , "");
184 define('__BEG_PAY_MODE_BOTH', "");
185 define('__BEG_PAY_MODE_NONE', " selected=\"selected\"");
189 // Add data to constant __MEMBER_SELECTION
190 define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('beg_uid'), false, true, true, "beg_uid"));
192 // Load form template
193 LOAD_TEMPLATE("admin_config_beg");