X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=doubler.php;h=f53908359aed0d12042f3c2785818fd2c7d0e691;hp=7e3f9a27e7bf235f2e41ab97aee50c530cf2731a;hb=04b69ac9f33369cbf654396c4a42cb1fff710ff4;hpb=09f5758c42a33a56bdd461c946ffe759a59c54aa diff --git a/doubler.php b/doubler.php index 7e3f9a27e7..f53908359a 100644 --- a/doubler.php +++ b/doubler.php @@ -80,7 +80,7 @@ if (isFormSent()) { // 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 @@ -98,7 +98,7 @@ if (isFormSent()) { $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')", @@ -108,7 +108,7 @@ if (isFormSent()) { 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); @@ -118,7 +118,7 @@ if (isFormSent()) { 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. ^^^ @@ -188,13 +188,6 @@ if (isUserDataValid()) { $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 @@ -210,12 +203,6 @@ $content['payout_time'] = getMessage('DOUBLER_PAYOUT_TIME_' . getConfig('doubler // 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);