// Is the data valid?
if (!isUserDataValid()) {
// Output message that the userid is not okay
- loadTemplate('admin_settings_saved', false, getMessage('DOUBLER_USERID_INVALID'));
+ loadTemplate('admin_settings_saved', false, '{--DOUBLER_USERID_INVALID--}');
} // END - if
// Remove any dots and unwanted chars from the points
$points = countSumTotalData(getUserData('userid'), 'user_points', 'points') - countSumTotalData(getUserData('userid'), 'user_data', 'used_points');
// So let's continue with probing his points amount
- if (($points - getConfig('doubler_left') - postRequestParameter('points') * getConfig('doubler_charge')) >= 0) {
+ if (($points - getConfig('doubler_left') - postRequestParameter('points') * getConfig('doubler_charge') / 100) >= 0) {
// Enough points are left so let's continue with the doubling process
// Create doubling "account" width *DOUBLED* points
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES ('%s','%s','%s','".detectRemoteAddr()."', UNIX_TIMESTAMP(), 'N','N')",
subtractPoints('doubler', getUserData('userid'), postRequestParameter('points'));
// Add points to "total payed" including charge
- $points = postRequestParameter('points') - postRequestParameter('points') * getConfig('doubler_charge');
+ $points = postRequestParameter('points') - postRequestParameter('points') * getConfig('doubler_charge') / 100;
updateConfiguration('doubler_points', $points, '+');
incrementConfigEntry('doubler_points', $points);
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES ('%s',0,'%s','".detectRemoteAddr()."',UNIX_TIMESTAMP(),'N','Y')",
array(
determineReferalId(),
- bigintval(postRequestParameter('points') * 2 * getConfig('doubler_ref'))
+ bigintval(postRequestParameter('points') * 2 * getConfig('doubler_ref') / 100)
), __FILE__, __LINE__);
// And that's why we don't want to you more than one referal level of doubler-points. ^^^
$content['refid'] = determineReferalId();
}
-// Percent values etc.
-$content['charge'] = translateComma(getConfig('doubler_charge') * 100);
-$content['ref'] = translateComma(getConfig('doubler_ref') * 100);
-$content['total'] = translateComma(getConfig('doubler_points'));
-$content['min'] = translateComma(getConfig('doubler_min'));
-$content['max'] = translateComma(getConfig('doubler_max'));
-
// Text "Enter login"
if (isExtensionActive('nickname')) {
// Choose login/nickname
// Generate table with already payed out doubles
$content['payout_history'] = generateDoublerTable(0, 'Y', 'N', 'DESC');
-// Generate timemark
-$content['timeout_mark'] = createFancyTime(getConfig('doubler_timeout'));
-
-// Points left to doubler
-$content['left'] = translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT());
-
// Output neccessary form for this
loadTemplate('doubler_index', false, $content);