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__);
43 if (isset($_POST['ok'])) {
44 // Translate german decimal commas to computer decimal dots
45 $_POST['beg_points'] = REVERT_COMMA($_POST['beg_points'] );
46 $_POST['beg_points_max'] = REVERT_COMMA($_POST['beg_points_max'] );
47 $_POST['beg_notify_bonus'] = REVERT_COMMA($_POST['beg_notify_bonus']);
50 ADMIN_SAVE_SETTINGS($_POST);
52 // Remember new settings
53 $_CONFIG['beg_rallye'] = $_POST['beg_rallye'];
54 $_CONFIG['beg_ral_en_notify'] = $_POST['beg_ral_en_notify'];
55 $_CONFIG['beg_ral_di_notify'] = $_POST['beg_ral_di_notify'];
57 // Prepare constants for the template
58 define('__BEG_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points'] , false));
59 define('__BEG_POINTS_MAX' , TRANSLATE_COMMA($_CONFIG['beg_points_max'] , false));
60 define('__BEG_NOTIFY_BONUS' , TRANSLATE_COMMA($_CONFIG['beg_notify_bonus'], false));
61 define('__BEG_TIMEOUT' , CREATE_TIME_SELECTIONS($_CONFIG['beg_timeout'] , "beg_timeout" , "Dhm"));
62 define('__BEG_UID_TIMEOUT' , CREATE_TIME_SELECTIONS($_CONFIG['beg_uid_timeout'], "beg_uid_timeout", "Dhm"));
63 define('__BEG_REMOTE_IP_TIMEOUT', CREATE_TIME_SELECTIONS($_CONFIG['beg_ip_timeout'] , "beg_ip_timeout" , "Dhm"));
64 define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS($_CONFIG['beg_notify_wait'], "beg_notify_wait", "ms" ));
65 define('__BEG_RANKS', $_CONFIG['beg_ranks']);
67 // Activate / Deactivate beg rallye (Y/N)
68 switch ($_CONFIG['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 ($_CONFIG['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 ($_CONFIG['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 ($_CONFIG['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 ($_CONFIG['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 ($_CONFIG['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 ($_CONFIG['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 ($_CONFIG['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($_CONFIG['beg_uid'], false, true, true, "beg_uid"));
192 // Load form template
193 LOAD_TEMPLATE("admin_config_beg");