fooRequestElementBar() functions renamed, adding of request parameters added:
[mailer.git] / inc / modules / admin / what-list_sponsor.php
index 726a7f9c6d0f75e2d27162e0d661bafe254796f5..b6369c6b44d475855796756dad1337679375e3e7 100644 (file)
@@ -44,12 +44,12 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
-if (isGetRequestElementSet('id')) {
+if (isGetRequestParameterSet('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, status, sponsor_created, last_online, last_change, receive_warnings, points_amount, points_used, remote_addr, warning_interval, refid, ref_count
 FROM `{?_MYSQL_PREFIX?}_sponsor_data`
 WHERE `id`='%s' LIMIT 1",
-       array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
+       array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__);
 
        if (SQL_NUMROWS($result) == 1) {
                // Load sponsor details
@@ -63,14 +63,14 @@ WHERE `id`='%s' LIMIT 1",
 
                // Check for sponsor's orders (only count)
                $result_orders = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{?_MYSQL_PREFIX?}_sponsor_orders` WHERE sponsorid='%s'",
-               array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
+               array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__);
                list($orders) = SQL_FETCHROW($result_orders);
                SQL_FREERESULT($result_orders);
                if (empty($orders)) $orders = '0';
 
                // Prepare all data for the template
                //  Sponsor's id
-               $content['id']                = getRequestElement('id');
+               $content['id']                = getRequestParameter('id');
                //  Personal data
                $content['gender']      = translateGender($content['gender']);
                //  Contact data
@@ -95,12 +95,12 @@ WHERE `id`='%s' LIMIT 1",
                loadTemplate('admin_list_sponsor_details', false, $content);
        } else {
                // Sponsor not found
-               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', getRequestElement('id')));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', getRequestParameter('id')));
        }
-} elseif (isGetRequestElementSet('rid')) {
+} elseif (isGetRequestParameterSet('rid')) {
        // Search for sponsor
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1",
-               array(bigintval(getRequestElement('rid'))), __FILE__, __LINE__);
+               array(bigintval(getRequestParameter('rid'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Free memory
                SQL_FREERESULT($result);
@@ -116,7 +116,7 @@ WHERE
        `refid`='%s'
 ORDER BY
        `id` ASC",
-               array(bigintval(getRequestElement('rid'))), __FILE__, __LINE__);
+               array(bigintval(getRequestParameter('rid'))), __FILE__, __LINE__);
 
                if (SQL_NUMROWS($result) > 0) {
                        // List refs now
@@ -124,11 +124,11 @@ ORDER BY
                        SQL_FREERESULT($result);
                } else {
                        // No refs made so far
-                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_REFS_404', '<a href="{%url=modules.php?module=admin&amp;what=list_sponsor&amp;id=' . bigintval(getRequestElement('rid')) . '%}">' . bigintval(getRequestElement('rid')) . '</a>'));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_REFS_404', '<a href="{%url=modules.php?module=admin&amp;what=list_sponsor&amp;id=' . bigintval(getRequestParameter('rid')) . '%}">' . bigintval(getRequestParameter('rid')) . '</a>'));
                }
        } else {
                // Sponsor not found
-               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestElement('rid'))));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('rid'))));
        }
 } else {
        // List all sponsors