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 - 2009 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')) || (!isAdmin())) {
44 // Add description as navigation point
45 addMenuDescription('admin', __FILE__);
48 // Replace commata with decimal dot
49 setRequestPostElement('doubler_charge', (convertCommaToDot(postRequestElement('doubler_charge')) / 100));
50 setRequestPostElement('doubler_ref' , (convertCommaToDot(postRequestElement('doubler_ref')) / 100));
51 setRequestPostElement('doubler_min' , convertCommaToDot(postRequestElement('doubler_min')));
52 setRequestPostElement('doubler_max' , convertCommaToDot(postRequestElement('doubler_max')));
53 setRequestPostElement('doubler_left' , convertCommaToDot(postRequestElement('doubler_left')));
56 adminSaveSettingsFromPostData();
58 // Prepare data for the template
60 $content['charge'] = translateComma((getConfig('doubler_charge') * 100), false);
62 $content['referal'] = translateComma((getConfig('doubler_ref') * 100), false);
63 // - Minimum points to double
64 $content['minimum'] = translateComma(getConfig('doubler_min'), false);
65 // - Maximum points to double
66 $content['maximum'] = translateComma(getConfig('doubler_max'), false);
67 // - Points left on users account after doubling
68 $content['left'] = translateComma(getConfig('doubler_left'), false);
70 // Init all Y/N selections
71 foreach (array('jackpot','own','sent_all') as $entry) {
72 $content[$entry . '_y'] = '';
73 $content[$entry . '_n'] = '';
74 $content[$entry . '_' . strtolower(getConfig('doubler_' . $entry))] = ' checked="checked"';
77 // Init other selections
78 foreach (array('send_mode_direct','send_mode_reset') as $entry) {
79 $content[$entry] = '';
82 // Set current selections
83 foreach (array('send_mode') as $entry) {
84 $content[$entry . '_' . strtolower(getConfig('doubler_' . $entry))] = ' checked="checked"';
88 $content['member_selection'] = addMemberSelectionBox(getConfig('doubler_userid'), false, true, true, 'doubler_userid');
90 // Number of rows to display (option lines!!!)
91 foreach (array('new','pay','old') as $entry) {
92 $content['display_' . $entry] = generateOptionList('/ARRAY/', array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), getConfig('doubler_display_' . $entry));
95 // Timeout selection box or input box?
96 $content['timeout_selection'] = createTimeSelections(getConfig('doubler_timeout') , 'doubler_timeout' , 'WDh');
99 loadTemplate('admin_config_doubler', false, $content);