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 * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. March 2009) $ *
15 * $Tag:: 0.2.1-FINAL $ *
16 * $Author:: stelzi $ *
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__);
49 // Translate german decimal commas to computer decimal dots
50 REQUEST_SET_POST('beg_points' , REVERT_COMMA(REQUEST_POST('beg_points') ));
51 REQUEST_SET_POST('beg_points_max' , REVERT_COMMA(REQUEST_POST('beg_points_max') ));
52 REQUEST_SET_POST('beg_notify_bonus', REVERT_COMMA(REQUEST_POST('beg_notify_bonus')));
55 ADMIN_SAVE_SETTINGS_POST();
57 // Remember new settings
58 setConfigEntry('beg_rallye' , REQUEST_POST('beg_rallye'));
59 setConfigEntry('beg_ral_en_notify', REQUEST_POST('beg_ral_en_notify'));
60 setConfigEntry('beg_ral_di_notify', REQUEST_POST('beg_ral_di_notify'));
62 // Prepare constants for the template
63 define('__BEG_POINTS' , TRANSLATE_COMMA(getConfig('beg_points') , false));
64 define('__BEG_POINTS_MAX' , TRANSLATE_COMMA(getConfig('beg_points_max') , false));
65 define('__BEG_NOTIFY_BONUS' , TRANSLATE_COMMA(getConfig('beg_notify_bonus'), false));
66 define('__BEG_TIMEOUT' , CREATE_TIME_SELECTIONS(getConfig('beg_timeout') , "beg_timeout" , "Dhm"));
67 define('__BEG_UID_TIMEOUT' , CREATE_TIME_SELECTIONS(getConfig('beg_uid_timeout'), "beg_uid_timeout", "Dhm"));
68 define('__BEG_REMOTE_IP_TIMEOUT', CREATE_TIME_SELECTIONS(getConfig('beg_ip_timeout') , "beg_ip_timeout" , "Dhm"));
69 define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS(getConfig('beg_notify_wait'), "beg_notify_wait", "ms" ));
70 define('__BEG_RANKS' , getConfig('beg_ranks'));
72 // Activate / Deactivate beg rallye (Y/N)
73 switch (getConfig('beg_rallye'))
76 define('__BEG_RALLYE_Y', " checked=\"checked\"");
77 define('__BEG_RALLYE_N', "");
81 define('__BEG_RALLYE_Y', "");
82 define('__BEG_RALLYE_N', " checked=\"checked\"");
86 switch (getConfig('beg_active'))
89 define('__BEG_ACTIVE_Y', " checked=\"checked\"");
90 define('__BEG_ACTIVE_N', "");
94 define('__BEG_ACTIVE_Y', "");
95 define('__BEG_ACTIVE_N', " checked=\"checked\"");
99 switch (getConfig('beg_mode'))
102 define('__BEG_MODE_DIRECT', " checked=\"checked\"");
103 define('__BEG_MODE_REF' , "");
107 define('__BEG_MODE_DIRECT', "");
108 define('__BEG_MODE_REF' , " checked=\"checked\"");
112 switch (getConfig('beg_ral_en_notify'))
115 define('__BEG_RAL_EN_NOTIFY_Y', " checked=\"checked\"");
116 define('__BEG_RAL_EN_NOTIFY_N', "");
120 define('__BEG_RAL_EN_NOTIFY_Y', "");
121 define('__BEG_RAL_EN_NOTIFY_N', " checked=\"checked\"");
125 switch (getConfig('beg_ral_di_notify'))
128 define('__BEG_RAL_DI_NOTIFY_Y', " checked=\"checked\"");
129 define('__BEG_RAL_DI_NOTIFY_N', "");
133 define('__BEG_RAL_DI_NOTIFY_Y', "");
134 define('__BEG_RAL_DI_NOTIFY_N', " checked=\"checked\"");
138 switch (getConfig('beg_new_mem_notify'))
141 define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked=\"checked\"");
142 define('__BEG_NEW_MEMBER_NOTIFY_N', "");
146 define('__BEG_NEW_MEMBER_NOTIFY_Y', "");
147 define('__BEG_NEW_MEMBER_NOTIFY_N', " checked=\"checked\"");
151 switch (getConfig('beg_include_own'))
154 define('__BEG_INCLUDE_OWN_Y', " checked=\"checked\"");
155 define('__BEG_INCLUDE_OWN_N', "");
159 define('__BEG_INCLUDE_OWN_Y', "");
160 define('__BEG_INCLUDE_OWN_N', " checked=\"checked\"");
164 switch (getConfig('beg_pay_mode')) {
166 define('__BEG_PAY_MODE_IMG' , " selected=\"selected\"");
167 define('__BEG_PAY_MODE_JS' , "");
168 define('__BEG_PAY_MODE_BOTH', "");
169 define('__BEG_PAY_MODE_NONE', "");
173 define('__BEG_PAY_MODE_IMG' , "");
174 define('__BEG_PAY_MODE_JS' , " selected=\"selected\"");
175 define('__BEG_PAY_MODE_BOTH', "");
176 define('__BEG_PAY_MODE_NONE', "");
180 define('__BEG_PAY_MODE_IMG' , "");
181 define('__BEG_PAY_MODE_JS' , "");
182 define('__BEG_PAY_MODE_BOTH', " selected=\"selected\"");
183 define('__BEG_PAY_MODE_NONE', "");
187 define('__BEG_PAY_MODE_IMG' , "");
188 define('__BEG_PAY_MODE_JS' , "");
189 define('__BEG_PAY_MODE_BOTH', "");
190 define('__BEG_PAY_MODE_NONE', " selected=\"selected\"");
194 // Add data to constant __MEMBER_SELECTION
195 define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('beg_uid'), false, true, true, "beg_uid"));
197 // Load form template
198 LOAD_TEMPLATE("admin_config_beg");