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 ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin()))
37 $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']))
45 // Replace commata with decimal dot
46 $_POST['doubler_charge'] = str_replace(",", ".", ($_POST['doubler_charge'] / 100));
47 $_POST['doubler_ref'] = str_replace(",", ".", ($_POST['doubler_ref'] / 100));
48 $_POST['doubler_min'] = str_replace(",", ".", $_POST['doubler_min']);
49 $_POST['doubler_max'] = str_replace(",", ".", $_POST['doubler_max']);
50 $_POST['doubler_left'] = str_replace(",", ".", $_POST['doubler_left']);
53 ADMIN_SAVE_SETTINGS($_POST);
57 // Prepare data for the template
59 define('__DOUBLER_CHARGE', TRANSLATE_COMMA(($_CONFIG['doubler_charge'] * 100), false));
61 define('__DOUBLER_REFERRAL', TRANSLATE_COMMA(($_CONFIG['doubler_ref'] * 100), false));
62 // - Minimum points to double
63 define('__DOUBLER_MINIMUM', TRANSLATE_COMMA($_CONFIG['doubler_min'], false));
64 // - Maximum points to double
65 define('__DOUBLER_MAXIMUM', TRANSLATE_COMMA($_CONFIG['doubler_max'], false));
66 // - Points left on users account after doubling
67 define('__DOUBLER_LEFT', TRANSLATE_COMMA($_CONFIG['doubler_left'], false));
68 // - Max payouts to check per click/reset
69 define('__DOUBLER_MAX_SENT', $_CONFIG['doubler_max_sent']);
71 define('__DOUBLER_GROUP_SENT', $_CONFIG['doubler_group_sent']);
73 // Take points from jackpot (Y/N)
74 switch ($_CONFIG['doubler_jackpot'])
77 define('__DOUBLER_JACKPOT_Y', ' checked');
78 define('__DOUBLER_JACKPOT_N', "");
82 define('__DOUBLER_JACKPOT_Y', "");
83 define('__DOUBLER_JACKPOT_N', ' checked');
87 // Take points from own account (Y/N)
88 switch ($_CONFIG['doubler_own'])
91 define('__DOUBLER_OWN_Y', ' checked');
92 define('__DOUBLER_OWN_N', "");
96 define('__DOUBLER_OWN_Y', "");
97 define('__DOUBLER_OWN_N', ' checked');
102 switch ($_CONFIG['doubler_send_mode'])
105 define('__DOUBLER_SEND_DIRECT', ' checked');
106 define('__DOUBLER_SEND_RESET' , "");
110 define('__DOUBLER_SEND_DIRECT', "");
111 define('__DOUBLER_SEND_RESET' , ' checked');
115 // Take points from own account (Y/N)
116 switch ($_CONFIG['doubler_sent_all'])
119 define('__DOUBLER_SENT_ALL_Y', ' checked');
120 define('__DOUBLER_SENT_ALL_N', "");
124 define('__DOUBLER_SENT_ALL_Y', "");
125 define('__DOUBLER_SENT_ALL_N', ' checked');
129 // Transfer options (!!!) to __MEMBER_SELECTION
130 ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['doubler_uid']);
132 // Number of rows to display (option lines!!!)
133 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']));
134 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']));
135 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']));
137 // Timeout selection box or input box?
138 define('__DOUBLER_TIMEOUT', CREATE_TIME_SELECTIONS($_CONFIG['doubler_timeout'] , "doubler_timeout" , "WDh"));
141 LOAD_TEMPLATE("admin_config_doubler");