$GLOBALS['startTime'] = microtime(true);
// Set module
-$GLOBALS['module'] = 'doubler';
+$GLOBALS['__module'] = 'doubler';
$GLOBALS['output_mode'] = '0';
// Load the required file(s)
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__);
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')",
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
$content['refid'] = getUserData('userid');
} else {
// Transfer userid/nickname to constant
- $content['refid'] = determineReferalId();
+ $content['refid'] = determineReferralId();
}
// Text "Enter login"