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\"");
80 switch ($_CONFIG['beg_active'])
83 define('__BEG_ACTIVE_Y', " checked=\"checked\"");
84 define('__BEG_ACTIVE_N', "");
88 define('__BEG_ACTIVE_Y', "");
89 define('__BEG_ACTIVE_N', " checked=\"checked\"");
92 switch ($_CONFIG['beg_mode'])
95 define('__BEG_MODE_DIRECT', " checked=\"checked\"");
96 define('__BEG_MODE_REF' , "");
100 define('__BEG_MODE_DIRECT', "");
101 define('__BEG_MODE_REF' , " checked=\"checked\"");
104 switch ($_CONFIG['beg_ral_en_notify'])
107 define('__BEG_RAL_EN_NOTIFY_Y', " checked=\"checked\"");
108 define('__BEG_RAL_EN_NOTIFY_N', "");
112 define('__BEG_RAL_EN_NOTIFY_Y', "");
113 define('__BEG_RAL_EN_NOTIFY_N', " checked=\"checked\"");
116 switch ($_CONFIG['beg_ral_di_notify'])
119 define('__BEG_RAL_DI_NOTIFY_Y', " checked=\"checked\"");
120 define('__BEG_RAL_DI_NOTIFY_N', "");
124 define('__BEG_RAL_DI_NOTIFY_Y', "");
125 define('__BEG_RAL_DI_NOTIFY_N', " checked=\"checked\"");
128 switch ($_CONFIG['beg_new_mem_notify'])
131 define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked=\"checked\"");
132 define('__BEG_NEW_MEMBER_NOTIFY_N', "");
136 define('__BEG_NEW_MEMBER_NOTIFY_Y', "");
137 define('__BEG_NEW_MEMBER_NOTIFY_N', " checked=\"checked\"");
140 switch ($_CONFIG['beg_include_own'])
143 define('__BEG_INCLUDE_OWN_Y', " checked=\"checked\"");
144 define('__BEG_INCLUDE_OWN_N', "");
148 define('__BEG_INCLUDE_OWN_Y', "");
149 define('__BEG_INCLUDE_OWN_N', " checked=\"checked\"");
153 // Add data to constant __MEMBER_SELECTION
154 define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX($_CONFIG['beg_uid'], false, true, true, "beg_uid"));
156 // Load form template
157 LOAD_TEMPLATE("admin_config_beg");