X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=doubler.php;h=fae376478ff05213eb2850e3b9059e66bdadc537;hb=c15eee48f9da1469cf3cdca3a48ba2d3c382a7c9;hp=e46983e03ca45a8ca3b5fec43c41377aeea3ea40;hpb=2379934be6a196a54f4155bb8e24c49b20736969;p=mailer.git diff --git a/doubler.php b/doubler.php index e46983e03c..fae376478f 100644 --- a/doubler.php +++ b/doubler.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * 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 * * it under the terms of the GNU General Public License as published by * @@ -39,11 +39,11 @@ 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'); @@ -99,10 +99,10 @@ if (isFormSent()) { 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'), - makeZeroToNull(determineReferalId()), + convertZeroToNull(determineReferralId()), bigintval(postRequestElement('points') * 2), detectRemoteAddr() ), __FILE__, __LINE__); @@ -115,17 +115,17 @@ if (isFormSent()) { updateConfiguration('doubler_points', $points, '+'); incrementConfigEntry('doubler_points', $points); - // Add second line for the referal but only when userid != refid - if ((isValidUserId(determineReferalId())) && (determineReferalId() != getUserData('userid'))) { + // 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( - makeZeroToNull(determineReferalId()), + convertZeroToNull(determineReferralId()), (postRequestElement('points') * 2 * getConfig('doubler_ref') / 100), detectRemoteAddr() ), __FILE__, __LINE__); - // And that's why we don't want to you more than one referal level of doubler-points. ^^^ + // And that's why we don't want to you more than one referral level of doubler-points. ^^^ } // END - if // Update usage counter @@ -191,7 +191,7 @@ if (isUserDataValid()) { $content['refid'] = getUserData('userid'); } else { // Transfer userid/nickname to constant - $content['refid'] = determineReferalId(); + $content['refid'] = determineReferralId(); } // Text "Enter login"