TODO updated, my website is now approved
[mailer.git] / show_bonus.php
index e32f4c5..0a633f1 100644 (file)
@@ -58,10 +58,10 @@ redirectOnUninstalledExtension('bonus');
 // Include header
 loadIncludeOnce('inc/header.php');
 
-if ((getRequestElement('userid') > 0) && (getRequestElement('d') > 0) && (isGetRequestElementSet('t'))) {
+if ((getRequestParameter('userid') > 0) && (getRequestParameter('d') > 0) && (isGetRequestParameterSet('t'))) {
        // Set row name
        $t = '';
-       switch (getRequestElement('t')) {
+       switch (getRequestParameter('t')) {
                case 'bonusid': // Bonus mail
                        $t = 'bonus_id';
                        break;
@@ -71,7 +71,7 @@ if ((getRequestElement('userid') > 0) && (getRequestElement('d') > 0) && (isGetR
                        break;
 
                default: // Invalid type
-                       logDebugMessage(__FILE__, __LINE__, sprintf("Invalid type %s detected.", getRequestElement('t')));
+                       logDebugMessage(__FILE__, __LINE__, sprintf("Invalid type %s detected.", getRequestParameter('t')));
                        break;
        } // END - switch
 
@@ -89,9 +89,9 @@ WHERE
        d.`status`='CONFIRMED' AND d.userid=%s AND b.%s=%s
 LIMIT 1",
                        array(
-                               bigintval(getRequestElement('userid')),
+                               bigintval(getRequestParameter('userid')),
                                $t,
-                               bigintval(getRequestElement('d'))
+                               bigintval(getRequestParameter('d'))
                        ), __FILE__, __LINE__);
 
                // Entry found?
@@ -102,8 +102,8 @@ LIMIT 1",
                        // Prepare constants for the pre-template
                        $content['gender'] = translateGender($content['gender']);
                        $content['points'] = translateComma($content['points']);
-                       $content['mailid'] = bigintval(getRequestElement('d'));
-                       $content['rows']   = addBonusRanks(bigintval(getRequestElement('d')), $t, bigintval(getRequestElement('userid')));
+                       $content['mailid'] = bigintval(getRequestParameter('d'));
+                       $content['rows']   = addBonusRanks(bigintval(getRequestParameter('d')), $t, bigintval(getRequestParameter('userid')));
 
                        // Get some prepared content
                        $content = merge_array($content, $GLOBALS['ranking_content']);
@@ -112,18 +112,18 @@ LIMIT 1",
                        $content['message'] = loadTemplate('show_bonus_msg', true, $content);
                } else {
                        // No data found
-                       $content['message'] = "<span class=\"guest_failed\">{--BONUS_SHOW_NO_DATA--}</span>";
+                       $content['message'] = '<span class="guest_failed">{--BONUS_SHOW_NO_DATA--}</span>';
                }
 
                // Free memory
                SQL_FREERESULT($result);
        } else {
                // Wrong type entered
-               $content['message'] = "<span class=\"guest_failed\">{--BONUS_SHOW_WRONG_TYPE--}</span>";
+               $content['message'] = '<span class="guest_failed">{--BONUS_SHOW_WRONG_TYPE--}</span>';
        }
 } else {
        // Wrong call!
-       $content['message'] = "<span class=\"guest_failed\">{--BONUS_SHOW_WRONG_CALL--}</span>";
+       $content['message'] = '<span class="guest_failed">{--BONUS_SHOW_WRONG_CALL--}</span>';
 }
 
 // Load send_bonus header template (for your banners, e.g.?)