* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
require('inc/libs/security_functions.php');
// Init start time
-$GLOBALS['startTime'] = microtime(true);
+$GLOBALS['__start_time'] = microtime(TRUE);
-// Set module
-$GLOBALS['__module'] = 'doubler';
-$GLOBALS['output_mode'] = '0';
+// Set module and output mode
+$GLOBALS['__module'] = 'doubler';
+$GLOBALS['__output_mode'] = '0';
// Load the required file(s)
require('inc/config-global.php');
if (($points - getConfig('doubler_left') - postRequestElement('points') * getConfig('doubler_charge') / 100) >= 0) {
// Enough points are left so let's continue with the doubling process
// Create doubling "account" with *DOUBLED* points
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`,`refid`,`points`,`remote_ip`,`timemark`,`completed`,`is_ref`) VALUES (%s,%s,%s,'%s', UNIX_TIMESTAMP(), 'N','N')",
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES (%s,%s,%s,'%s', UNIX_TIMESTAMP(), 'N','N')",
array(
getUserData('userid'),
convertZeroToNull(determineReferralId()),
// Add second line for the referral but only when userid != refid
if ((isValidUserId(determineReferralId())) && (determineReferralId() != getUserData('userid'))) {
// Okay add a refid line and apply refid percents
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`,`refid`,`points`,`remote_ip`,`timemark`,`completed`,`is_ref`) VALUES (%s,0,%s,'%s',UNIX_TIMESTAMP(),'N','Y')",
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES (%s,0,%s,'%s',UNIX_TIMESTAMP(),'N','Y')",
array(
convertZeroToNull(determineReferralId()),
(postRequestElement('points') * 2 * getConfig('doubler_ref') / 100),
updateConfiguration('doubler_counter', 1, '+');
// Set constant
- $content['message'] = loadTemplate('doubler_reflink', true, postRequestElement('userid'));
+ $content['message'] = loadTemplate('doubler_reflink', TRUE, postRequestElement('userid'));
} else {
// Not enougth points left
$content['message'] = '{--DOUBLER_FORM_NO_POINTS_LEFT--}';
loadIncludeOnce('inc/header.php');
// Banner in text
-$content['banner'] = loadTemplate('doubler_banner', true);
+$content['banner'] = loadTemplate('doubler_banner', TRUE);
// Load header/footer templates
-$content['header'] = loadTemplate('doubler_header', true);
-$content['footer'] = loadTemplate('doubler_footer', true);
+$content['header'] = loadTemplate('doubler_header', TRUE);
+$content['footer'] = loadTemplate('doubler_footer', TRUE);
if (isUserDataValid()) {
// Transfer userid/nickname to constant
$content['payout_history'] = generateDoublerTable(0, 'Y', 'N', 'DESC');
// Output neccessary form for this
-loadTemplate('doubler_index', false, $content);
+loadTemplate('doubler_index', FALSE, $content);
// Output footer
loadIncludeOnce('inc/footer.php');