2 /************************************************************************
3 * MXChange v0.2.1 Start: 02/12/2005 *
4 * ================ Last change: 02/12/2005 *
6 * -------------------------------------------------------------------- *
7 * File : what-config_doubler.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Points doubler *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Punkte verdoppeln *
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", basename(__FILE__));
43 if (isset($_POST['ok'])) {
44 // Replace commata with decimal dot
45 $_POST['doubler_charge'] = str_replace(",", ".", ($_POST['doubler_charge'] / 100));
46 $_POST['doubler_ref'] = str_replace(",", ".", ($_POST['doubler_ref'] / 100));
47 $_POST['doubler_min'] = str_replace(",", ".", $_POST['doubler_min']);
48 $_POST['doubler_max'] = str_replace(",", ".", $_POST['doubler_max']);
49 $_POST['doubler_left'] = str_replace(",", ".", $_POST['doubler_left']);
52 ADMIN_SAVE_SETTINGS($_POST);
54 // Prepare data for the template
56 define('__DOUBLER_CHARGE', TRANSLATE_COMMA(($_CONFIG['doubler_charge'] * 100), false));
58 define('__DOUBLER_REFERRAL', TRANSLATE_COMMA(($_CONFIG['doubler_ref'] * 100), false));
59 // - Minimum points to double
60 define('__DOUBLER_MINIMUM', TRANSLATE_COMMA($_CONFIG['doubler_min'], false));
61 // - Maximum points to double
62 define('__DOUBLER_MAXIMUM', TRANSLATE_COMMA($_CONFIG['doubler_max'], false));
63 // - Points left on users account after doubling
64 define('__DOUBLER_LEFT', TRANSLATE_COMMA($_CONFIG['doubler_left'], false));
65 // - Max payouts to check per click/reset
66 define('__DOUBLER_MAX_SENT', $_CONFIG['doubler_max_sent']);
68 define('__DOUBLER_GROUP_SENT', $_CONFIG['doubler_group_sent']);
70 // Take points from jackpot (Y/N)
71 switch ($_CONFIG['doubler_jackpot'])
74 define('__DOUBLER_JACKPOT_Y', " checked");
75 define('__DOUBLER_JACKPOT_N', "");
79 define('__DOUBLER_JACKPOT_Y', "");
80 define('__DOUBLER_JACKPOT_N', " checked");
84 // Take points from own account (Y/N)
85 switch ($_CONFIG['doubler_own'])
88 define('__DOUBLER_OWN_Y', " checked");
89 define('__DOUBLER_OWN_N', "");
93 define('__DOUBLER_OWN_Y', "");
94 define('__DOUBLER_OWN_N', " checked");
99 switch ($_CONFIG['doubler_send_mode'])
102 define('__DOUBLER_SEND_DIRECT', " checked");
103 define('__DOUBLER_SEND_RESET' , "");
107 define('__DOUBLER_SEND_DIRECT', "");
108 define('__DOUBLER_SEND_RESET' , " checked");
112 // Take points from own account (Y/N)
113 switch ($_CONFIG['doubler_sent_all'])
116 define('__DOUBLER_SENT_ALL_Y', " checked");
117 define('__DOUBLER_SENT_ALL_N', "");
121 define('__DOUBLER_SENT_ALL_Y', "");
122 define('__DOUBLER_SENT_ALL_N', " checked");
126 // Transfer options (!!!) to __MEMBER_SELECTION
127 ADD_MEMBER_SELECTION_BOX($_CONFIG['doubler_uid'], false, true, true);
129 // Number of rows to display (option lines!!!)
130 define('__DOUBLER_DISPLAY_NEW', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $_CONFIG['doubler_display_new']));
131 define('__DOUBLER_DISPLAY_PAY', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $_CONFIG['doubler_display_pay']));
132 define('__DOUBLER_DISPLAY_OLD', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $_CONFIG['doubler_display_old']));
134 // Timeout selection box or input box?
135 define('__DOUBLER_TIMEOUT', CREATE_TIME_SELECTIONS($_CONFIG['doubler_timeout'] , "doubler_timeout" , "WDh"));
138 LOAD_TEMPLATE("admin_config_doubler");