Extension ext-earning introduced (unfinished), renamings:
[mailer.git] / inc / modules / admin / what-list_sponsor.php
index 47afe0509efc3a03274fc024db745ccce848db00..cbcae48e4ac438ee592d8f71bb7ea6f5be3d1154 100644 (file)
@@ -43,22 +43,22 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addYouAreHereLink('admin', __FILE__);
 
-if (isGetRequestParameterSet('id')) {
+if (isGetRequestElementSet('id')) {
        // Show detailed informations to a sponsor
        $result = SQL_QUERY_ESC("SELECT
-       `company`, `position`, `gender`, `surname`, `family`, `street_nr1`, `street_nr2`, `zip`, `city`, `country`,
-       `phone`, `fax`, `cell`, `email`, `url`, `tax_ident`,
+       `company`,`position`,`gender`,`surname`,`family`,`street_nr1`,`street_nr2`,`zip`,`city`,`country`,
+       `phone`,`fax`,`cell`,`email`,`url`,`tax_ident`,
        `status`,
        UNIX_TIMESTAMP(`sponsor_created`) AS `sponsor_created`,
        UNIX_TIMESTAMP(`last_online`) AS `last_online`,
        UNIX_TIMESTAMP(`last_change`) AS `last_change`,
        `receive_warnings`,
-       `points_amount`, `points_used`, `remote_addr`, `warning_interval`, `refid`, `ref_count`
+       `points_amount`,`points_used`,`remote_addr`,`warning_interval`,`refid`,`ref_count`
 FROM
        `{?_MYSQL_PREFIX?}_sponsor_data`
 WHERE
        `id`=%s LIMIT 1",
-       array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__);
+       array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
 
        if (SQL_NUMROWS($result) == 1) {
                // Load sponsor details
@@ -71,7 +71,7 @@ WHERE
 
                // Prepare all data for the template
                //  Sponsor's id
-               $content['id']              = getRequestParameter('id');
+               $content['id']              = getRequestElement('id');
                //  Contact data
                $content['email_link']      = generateEmailLink($content['email'], 'sponsor_data');
                //  Epoche times
@@ -79,39 +79,39 @@ WHERE
                $content['last_online']     = generateDateTime($content['last_online'], 2);
                $content['last_change']     = generateDateTime($content['last_change'], 2);
                //  Orders total
-               $content['orders']          = countSumTotalData(bigintval(getRequestParameter('id')), 'sponsor_orders', 'id', 'sponsor_id', true);
+               $content['orders']          = countSumTotalData(bigintval(getRequestElement('id')), 'sponsor_orders', 'id', 'sponsor_id', true);
 
                // Load template
                loadTemplate('admin_list_sponsor_details', false, $content);
        } else {
                // Sponsor not found
-               displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestParameter('id')) . '%}');
+               displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestElement('id')) . '%}');
        }
 
        // Free result
        SQL_FREERESULT($result);
-} elseif (isGetRequestParameterSet('refid')) {
+} elseif (isGetRequestElementSet('refid')) {
        // Search for sponsor
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`=%s LIMIT 1",
-               array(bigintval(getRequestParameter('refid'))), __FILE__, __LINE__);
+               array(bigintval(getRequestElement('refid'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Free memory
                SQL_FREERESULT($result);
 
                // Sponsor found so let's list all his referals
                $result = SQL_QUERY_ESC("SELECT
-       `id`, `gender`, `surname`, `family`, `email`, `status`,
+       `id`,`gender`,`surname`,`family`,`email`,`status`,
        UNIX_TIMESTAMP(`sponsor_created`) AS `sponsor_created`,
        UNIX_TIMESTAMP(`last_online`) AS `last_online`,
-       `points_amount`, `points_used`,
-       `remote_addr`, `ref_count`
+       `points_amount`,`points_used`,
+       `remote_addr`,`ref_count`
 FROM
        `{?_MYSQL_PREFIX?}_sponsor_data`
 WHERE
        `refid`='%s'
 ORDER BY
        `id` ASC",
-               array(bigintval(getRequestParameter('refid'))), __FILE__, __LINE__);
+               array(bigintval(getRequestElement('refid'))), __FILE__, __LINE__);
 
                if (!SQL_HASZERONUMS($result)) {
                        // List refs now
@@ -119,19 +119,19 @@ ORDER BY
                        SQL_FREERESULT($result);
                } else {
                        // No refs made so far
-                       displayMessage(getMaskedMessage('ADMIN_SPONSOR_REFS_404', '<a href="{%url=modules.php?module=admin&amp;what=list_sponsor&amp;id=' . bigintval(getRequestParameter('refid')) . '%}">' . bigintval(getRequestParameter('refid')) . '</a>'));
+                       displayMessage(getMaskedMessage('ADMIN_SPONSOR_REFS_404', '<a href="{%url=modules.php?module=admin&amp;what=list_sponsor&amp;id=' . bigintval(getRequestElement('refid')) . '%}">' . bigintval(getRequestElement('refid')) . '</a>'));
                }
        } else {
                // Sponsor not found
-               displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestParameter('refid')) . '%}');
+               displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestElement('refid')) . '%}');
        }
 } else {
        // List all sponsors
        $result_main = SQL_QUERY("SELECT
-       `id`, `gender`, `surname`, `family`, `email`, `status`,
+       `id`,`gender`,`surname`,`family`,`email`,`status`,
        UNIX_TIMESTAMP(`sponsor_created`) AS `sponsor_created`,
        UNIX_TIMESTAMP(`last_online`) AS `last_online`,
-       `points_amount`, `points_used`,
+       `points_amount`,`points_used`,
        (`points_amount` + `points_used`) AS `points`,
        `remote_addr`
 FROM