Mailer project continued:
[mailer.git] / doubler.php
index d8a7f4be5643c34eb776dd564a69c00bcd952b91..fae376478ff05213eb2850e3b9059e66bdadc537 100644 (file)
@@ -99,7 +99,7 @@ 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'),
                                                convertZeroToNull(determineReferralId()),
@@ -118,7 +118,7 @@ if (isFormSent()) {
                                // 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(
                                                        convertZeroToNull(determineReferralId()),
                                                        (postRequestElement('points') * 2 * getConfig('doubler_ref') / 100),