2 /************************************************************************
\r
3 * MXChange v0.2.1 Start: 01/09/2005 *
\r
4 * ================ Last change: 01/09/2005 *
\r
6 * -------------------------------------------------------------------- *
\r
7 * File : what-config_beg.php *
\r
8 * -------------------------------------------------------------------- *
\r
9 * Short description : Setup beg link *
\r
10 * -------------------------------------------------------------------- *
\r
11 * Kurzbeschreibung : Bettel-Link einstellen *
\r
12 * -------------------------------------------------------------------- *
\r
14 * -------------------------------------------------------------------- *
\r
15 * Copyright (c) 2003 - 2008 by Roland Haeder *
\r
16 * For more information visit: http://www.mxchange.org *
\r
18 * This program is free software; you can redistribute it and/or modify *
\r
19 * it under the terms of the GNU General Public License as published by *
\r
20 * the Free Software Foundation; either version 2 of the License, or *
\r
21 * (at your option) any later version. *
\r
23 * This program is distributed in the hope that it will be useful, *
\r
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
\r
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
\r
26 * GNU General Public License for more details. *
\r
28 * You should have received a copy of the GNU General Public License *
\r
29 * along with this program; if not, write to the Free Software *
\r
30 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
\r
31 * MA 02110-1301 USA *
\r
32 ************************************************************************/
\r
34 // Some security stuff...
\r
35 if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin()))
\r
37 $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
\r
41 // Add description as navigation point
\r
42 ADD_DESCR("admin", basename(__FILE__));
\r
44 if (isset($_POST['ok']))
\r
46 // Translate german decimal commas to computer decimal dots
\r
47 $_POST['beg_points'] = str_replace(",", ".", $_POST['beg_points'] );
\r
48 $_POST['beg_points_max'] = str_replace(",", ".", $_POST['beg_points_max'] );
\r
49 $_POST['beg_notify_bonus'] = str_replace(",", ".", $_POST['beg_notify_bonus']);
\r
52 ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'");
\r
54 // Remember new settings
\r
55 $CONFIG['beg_rallye'] = $_POST['beg_rallye'];
\r
56 $CONFIG['beg_ral_en_notify'] = $_POST['beg_ral_en_notify'];
\r
57 $CONFIG['beg_ral_di_notify'] = $_POST['beg_ral_di_notify'];
\r
59 // Include sending out mails
\r
60 if ((($CONFIG['beg_rallye'] == "Y") && ($CONFIG['beg_ral_en_notify'] == "Y")) || (($CONFIG['beg_rallye'] == "N") && ($CONFIG['beg_ral_di_notify'] == "Y")))
\r
62 include(PATH."inc/mails/beg_mails.php");
\r
67 // Prepare constants for the template
\r
68 define('__BEG_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points'] , false));
\r
69 define('__BEG_POINTS_MAX' , TRANSLATE_COMMA($CONFIG['beg_points_max'] , false));
\r
70 define('__BEG_NOTIFY_BONUS' , TRANSLATE_COMMA($CONFIG['beg_notify_bonus'], false));
\r
71 define('__BEG_TIMEOUT' , CREATE_TIME_SELECTIONS($CONFIG['beg_timeout'] , "beg_timeout" , "Dhm"));
\r
72 define('__BEG_UID_TIMEOUT' , CREATE_TIME_SELECTIONS($CONFIG['beg_uid_timeout'], "beg_uid_timeout", "Dhm"));
\r
73 define('__BEG_REMOTE_IP_TIMEOUT', CREATE_TIME_SELECTIONS($CONFIG['beg_ip_timeout'] , "beg_ip_timeout" , "Dhm"));
\r
74 define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS($CONFIG['beg_notify_wait'], "beg_notify_wait", "ms" ));
\r
75 define('__BEG_RANKS', $CONFIG['beg_ranks']);
\r
77 // Activate / Deactivate beg rallye (Y/N)
\r
78 switch ($CONFIG['beg_rallye'])
\r
81 define('__BEG_RALLYE_Y', " checked");
\r
82 define('__BEG_RALLYE_N', "");
\r
86 define('__BEG_RALLYE_Y', "");
\r
87 define('__BEG_RALLYE_N', " checked");
\r
90 switch ($CONFIG['beg_active'])
\r
93 define('__BEG_ACTIVE_Y', " checked");
\r
94 define('__BEG_ACTIVE_N', "");
\r
98 define('__BEG_ACTIVE_Y', "");
\r
99 define('__BEG_ACTIVE_N', " checked");
\r
102 switch ($CONFIG['beg_mode'])
\r
105 define('__BEG_MODE_DIRECT', " checked");
\r
106 define('__BEG_MODE_REF' , "");
\r
110 define('__BEG_MODE_DIRECT', "");
\r
111 define('__BEG_MODE_REF' , " checked");
\r
114 switch ($CONFIG['beg_ral_en_notify'])
\r
117 define('__BEG_RAL_EN_NOTIFY_Y', " checked");
\r
118 define('__BEG_RAL_EN_NOTIFY_N', "");
\r
122 define('__BEG_RAL_EN_NOTIFY_Y', "");
\r
123 define('__BEG_RAL_EN_NOTIFY_N', " checked");
\r
126 switch ($CONFIG['beg_ral_di_notify'])
\r
129 define('__BEG_RAL_DI_NOTIFY_Y', " checked");
\r
130 define('__BEG_RAL_DI_NOTIFY_N', "");
\r
134 define('__BEG_RAL_DI_NOTIFY_Y', "");
\r
135 define('__BEG_RAL_DI_NOTIFY_N', " checked");
\r
138 switch ($CONFIG['beg_new_mem_notify'])
\r
141 define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked");
\r
142 define('__BEG_NEW_MEMBER_NOTIFY_N', "");
\r
146 define('__BEG_NEW_MEMBER_NOTIFY_Y', "");
\r
147 define('__BEG_NEW_MEMBER_NOTIFY_N', " checked");
\r
150 switch ($CONFIG['beg_include_own'])
\r
153 define('__BEG_INCLUDE_OWN_Y', " checked");
\r
154 define('__BEG_INCLUDE_OWN_N', "");
\r
158 define('__BEG_INCLUDE_OWN_Y', "");
\r
159 define('__BEG_INCLUDE_OWN_N', " checked");
\r
163 // Add data to constant __MEMBER_SELECTION
\r
164 ADD_MEMBER_SELECTION_BOX(false, true, true, $CONFIG['beg_uid']);
\r
166 // Load form template
\r
167 LOAD_TEMPLATE("admin_config_beg");
\r