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 * -------------------------------------------------------------------- *
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__);
49 // Translate german decimal commas to computer decimal dots
50 REQUEST_SET_POST('beg_points' , convertCommaToDot(REQUEST_POST('beg_points') ));
51 REQUEST_SET_POST('beg_points_max' , convertCommaToDot(REQUEST_POST('beg_points_max') ));
52 REQUEST_SET_POST('beg_notify_bonus', convertCommaToDot(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 $content['points'] = translateComma(getConfig('beg_points') , false);
64 $content['points_max'] = translateComma(getConfig('beg_points_max') , false);
65 $content['notify_bonus'] = translateComma(getConfig('beg_notify_bonus'), false);
66 $content['timeout'] = createTimeSelections(getConfig('beg_timeout') , 'beg_timeout' , 'Dhm');
67 $content['uid_timeout'] = createTimeSelections(getConfig('beg_uid_timeout'), 'beg_uid_timeout', 'Dhm');
68 $content['ip_timeout'] = createTimeSelections(getConfig('beg_ip_timeout') , 'beg_ip_timeout' , 'Dhm');
69 $content['wait_selection'] = createTimeSelections(getConfig('beg_notify_wait'), 'beg_notify_wait', 'ms' );
70 $content['ranks'] = getConfig('beg_ranks');
72 // Activate / Deactivate beg rallye (Y/N)
73 switch (getConfig('beg_rallye'))
76 $content['rallye_yes'] = ' checked="checked"';
77 $content['rallye_no'] = '';
81 $content['rallye_yes'] = '';
82 $content['rallye_no'] = ' checked="checked"';
86 switch (getConfig('beg_active'))
89 $content['active_yes'] = ' checked="checked"';
90 $content['active_no'] = '';
94 $content['active_yes'] = '';
95 $content['active_no'] = ' checked="checked"';
99 switch (getConfig('beg_mode'))
102 $content['mode_direct'] = ' checked="checked"';
103 $content['mode_ref'] = '';
107 $content['mode_direct'] = '';
108 $content['mode_ref'] = ' checked="checked"';
112 switch (getConfig('beg_ral_en_notify'))
115 $content['ral_enable_notify_yes'] = ' checked="checked"';
116 $content['ral_enable_notify_no'] = '';
120 $content['ral_enable_notify_yes'] = '';
121 $content['ral_enable_notify_no'] = ' checked="checked"';
125 switch (getConfig('beg_ral_di_notify'))
128 $content['ral_disable_notify_yes'] = ' checked="checked"';
129 $content['ral_disable_notify_no'] = '';
133 $content['ral_disable_notify_yes'] = '';
134 $content['ral_disable_notify_no'] = ' checked="checked"';
138 switch (getConfig('beg_new_mem_notify'))
141 $content['new_member_notify_yes'] = ' checked="checked"';
142 $content['new_member_notify_no'] = '';
146 $content['new_member_notify_yes'] = '';
147 $content['new_member_notify_no'] = ' checked="checked"';
151 switch (getConfig('beg_include_own'))
154 $content['include_own_yes'] = ' checked="checked"';
155 $content['include_own_no'] = '';
159 $content['include_own_yes'] = '';
160 $content['include_own_no'] = ' checked="checked"';
165 $content['pay_mode_img'] = '';
166 $content['pay_mode_js'] = '';
167 $content['pay_mode_both'] = '';
168 $content['pay_mode_none'] = '';
171 $content['pay_mode_'.strtolower(getConfig('beg_pay_mode'))] = ' selected="selected"';
173 // Member selection box
174 $content['member_selection'] = ADD_MEMBER_SELECTION_BOX(getConfig('beg_uid'), false, true, true, 'beg_uid');
176 // Load form template
177 LOAD_TEMPLATE('admin_config_beg', false, $content);