]> git.mxchange.org Git - mailer.git/blobdiff - doubler.php
Fixed... :(
[mailer.git] / doubler.php
index 9b6745a31d70cf50ebfdfa030a2bdb9889e126cf..1f854569042b9ec3dadb39a7ae9e6276cdacbf6c 100644 (file)
@@ -55,14 +55,14 @@ setContentType('text/html');
 // Is the 'doubler' extension active?
 redirectOnUninstalledExtension('doubler');
 
-// Probe for referal ID
+// Probe for referal id
 if (isGetRequestElementSet('refid')) $GLOBALS['refid'] = getRequestElement('refid');
 
 // Only check this if refid is provided!
 if (determineReferalId() > 0) {
        // Do we have nickname or userid set?
        if (isNicknameUsed(determineReferalId())) {
-               // Nickname in URL, so load the ID
+               // Nickname in URL, so load the id
                $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' LIMIT 1",
                        array(determineReferalId()), __FILE__, __LINE__);
        } else {
@@ -84,7 +84,8 @@ $userid = 0;
 
 // If no account was found set default refid and status to CONFIRMED
 if (empty($GLOBALS['refid'])) {
-       $GLOBALS['refid'] = getConfig('def_refid');
+       // Determine referal id again
+       $GLOBALS['refid'] = determineReferalId();
        $status = 'CONFIRMED';
 } // END - if
 
@@ -102,7 +103,7 @@ if (isFormSent()) {
        if ((isPostRequestElementSet('userid')) && (isPostRequestElementSet('pass')) && (isPostRequestElementSet('points'))) {
                // Probe for nickname extension and if a nickname was entered
                if (isNickNameUsed(postRequestElement('userid'))) {
-                       // Nickname in URL, so load the ID
+                       // Nickname in URL, so load the id
                        $result = SQL_QUERY_ESC("SELECT `userid`, `status`, `password` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' LIMIT 1",
                                array(postRequestElement('userid')), __FILE__, __LINE__);
                } else {
@@ -235,7 +236,7 @@ if (isExtensionActive('nickname')) {
        // Choose login/nickname
        $content['enter_login'] = getMessage('GUEST_ENTER_LOGIN_NICKNAME');
 } else {
-       // Simple login ID
+       // Simple login id
        $content['enter_login'] = getMessage('GUEST_ENTER_LOGIN');
 }
 
@@ -243,7 +244,7 @@ if (isExtensionActive('nickname')) {
 $content['payout_time'] = getMessage('DOUBLER_PAYOUT_TIME_' . getConfig('doubler_send_mode'));
 
 // Generate table with already payed out doubles
-$content['payout_history'] = generateDoublerTable('0', 'Y', 'N', 'DESC');
+$content['payout_history'] = generateDoublerTable(0, 'Y', 'N', 'DESC');
 
 // Generate timemark
 $content['timeout_mark'] = createFancyTime(getConfig('doubler_timeout'));