]> git.mxchange.org Git - mailer.git/blobdiff - doubler.php
More use of REVERT_COMMA() fixes problems
[mailer.git] / doubler.php
index 6470aae80dff7e92c48a0171fe44861bfbf590fe..8c56144ccf589fb3c87e1e410d36067905e706f7 100644 (file)
@@ -106,7 +106,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                        SQL_FREERESULT($result);
 
                        // Remove any dots and unwanted chars from the points
-                       $_POST['points'] = bigintval(round(str_replace(",", ".", $_POST['points'])));
+                       $_POST['points'] = bigintval(round(REVERT_COMMA($_POST['points'])));
 
                        // Probe for enough points
                        $probe_points = (($_POST['points'] >= $_CONFIG['doubler_min']) && ($_POST['points'] <= $_CONFIG['doubler_max']));
@@ -124,7 +124,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                {
                                        // Enough points are left so let's continue with the doubling process
                                        // Create doubling "account" width *DOUBLED* points
-                                       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".$_SERVER['REMOTE_ADDR']."', UNIX_TIMESTAMP(), 'N','N')",
+                                       $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".GET_REMOTE_ADDR()."', UNIX_TIMESTAMP(), 'N','N')",
                                         array($uid, bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2)), __FILE__, __LINE__);
 
                                        // Subtract entered points
@@ -138,7 +138,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                        // Add second line for the referral but only when uid != refid
                                        if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) {
                                                // Okay add a refid line and apply refid percents
-                                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid,refid,points,remote_ip,timemark,completed,is_ref) VALUES ('%s',0,'%s','".$_SERVER['REMOTE_ADDR']."',UNIX_TIMESTAMP(),'N','Y')",
+                                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid,refid,points,remote_ip,timemark,completed,is_ref) VALUES ('%s',0,'%s','".GET_REMOTE_ADDR()."',UNIX_TIMESTAMP(),'N','Y')",
                                                        array(bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2 * $_CONFIG['doubler_ref'])), __FILE__, __LINE__);
 
                                                // And that's why we dont't want to you more than one referral level of doubler-points. ^^^