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 * -------------------------------------------------------------------- *
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 // Replace commata with decimal dot
50 REQUEST_SET_POST('doubler_charge', convertCommaToDot((REQUEST_POST('doubler_charge') / 100)));
51 REQUEST_SET_POST('doubler_ref' , convertCommaToDot((REQUEST_POST('doubler_ref') / 100)));
52 REQUEST_SET_POST('doubler_min' , convertCommaToDot(REQUEST_POST('doubler_min')));
53 REQUEST_SET_POST('doubler_max' , convertCommaToDot(REQUEST_POST('doubler_max')));
54 REQUEST_SET_POST('doubler_left' , convertCommaToDot(REQUEST_POST('doubler_left')));
57 ADMIN_SAVE_SETTINGS_POST();
59 // Prepare data for the template
61 define('__DOUBLER_CHARGE', translateComma((getConfig('doubler_charge') * 100), false));
63 define('__DOUBLER_REFERRAL', translateComma((getConfig('doubler_ref') * 100), false));
64 // - Minimum points to double
65 define('__DOUBLER_MINIMUM', translateComma(getConfig('doubler_min'), false));
66 // - Maximum points to double
67 define('__DOUBLER_MAXIMUM', translateComma(getConfig('doubler_max'), false));
68 // - Points left on users account after doubling
69 define('__DOUBLER_LEFT', translateComma(getConfig('doubler_left'), false));
70 // - Max payouts to check per click/reset
71 define('__DOUBLER_MAX_SENT', getConfig('doubler_max_sent'));
73 define('__DOUBLER_GROUP_SENT', getConfig('doubler_group_sent'));
75 // Take points from jackpot (Y/N)
76 switch (getConfig('doubler_jackpot'))
79 define('__DOUBLER_JACKPOT_Y', ' checked="checked"');
80 define('__DOUBLER_JACKPOT_N', '');
84 define('__DOUBLER_JACKPOT_Y', '');
85 define('__DOUBLER_JACKPOT_N', ' checked="checked"');
89 // Take points from own account (Y/N)
90 switch (getConfig('doubler_own'))
93 define('__DOUBLER_OWN_Y', ' checked="checked"');
94 define('__DOUBLER_OWN_N', '');
98 define('__DOUBLER_OWN_Y', '');
99 define('__DOUBLER_OWN_N', ' checked="checked"');
104 switch (getConfig('doubler_send_mode'))
107 define('__DOUBLER_SEND_DIRECT', ' checked="checked"');
108 define('__DOUBLER_SEND_RESET' , '');
112 define('__DOUBLER_SEND_DIRECT', '');
113 define('__DOUBLER_SEND_RESET' , ' checked="checked"');
117 // Take points from own account (Y/N)
118 switch (getConfig('doubler_sent_all'))
121 define('__DOUBLER_SENT_ALL_Y', ' checked="checked"');
122 define('__DOUBLER_SENT_ALL_N', '');
126 define('__DOUBLER_SENT_ALL_Y', '');
127 define('__DOUBLER_SENT_ALL_N', ' checked="checked"');
131 // Transfer options (!!!) to __MEMBER_SELECTION
132 define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('doubler_uid'), false, true, true, 'doubler_uid'));
134 // Number of rows to display (option lines!!!)
135 define('__DOUBLER_DISPLAY_NEW', generateOptionList('/ARRAY/', array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), getConfig('doubler_display_new')));
136 define('__DOUBLER_DISPLAY_PAY', generateOptionList('/ARRAY/', array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), getConfig('doubler_display_pay')));
137 define('__DOUBLER_DISPLAY_OLD', generateOptionList('/ARRAY/', array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), getConfig('doubler_display_old')));
139 // Timeout selection box or input box?
140 define('__DOUBLER_TIMEOUT', createTimeSelections(getConfig('doubler_timeout') , 'doubler_timeout' , 'WDh'));
143 LOAD_TEMPLATE('admin_config_doubler');