2 /************************************************************************
3 * MXChange v0.2.1 Start: 02/17/2005 *
4 * ================ Last change: 02/18/2005 *
6 * -------------------------------------------------------------------- *
7 * File : what-doubler.php *
8 * -------------------------------------------------------------------- *
9 * Short description : General doubling informations *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Allgemeine Informationen zum Verdoppen *
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']))
37 $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
40 elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN()))
42 ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "doubler");
46 // Add description as navigation point
47 ADD_DESCR("guest", basename(__FILE__));
49 // Percent values etc.
50 define('__CHARGE_VALUE', TRANSLATE_COMMA($_CONFIG['doubler_charge'] * 100));
51 define('__REF_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_ref'] * 100));
52 define('__TOTAL_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_points']));
53 define('__MIN_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_min']));
54 define('__MAX_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_max']));
56 // Transfer referral ID
57 define('__REFID', $GLOBALS['refid']);
60 define('__DOUBLER_COUNTER', $_CONFIG['doubler_counter']);
62 // Which mail-send-mode did the admin setup?
63 switch ($_CONFIG['doubler_send_mode'])
66 define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT);
70 define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_RESET);
74 // Generate table with already payed out doubles
75 define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE("0", 'Y', 'N', "DESC"));
77 // Generate table with next-to-run payouts
78 define('__DOUBLER_PAYOUT_NEXT', DOUBLER_GENERATE_TABLE());
81 define('__TIMEOUT_MARK', CREATE_FANCY_TIME($_CONFIG['doubler_timeout']));
83 // Points left to double
84 define('__LEFT_VALUE', DOUBLER_GET_TOTAL_POINTS_LEFT());
87 LOAD_TEMPLATE("guest_doubler");