X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_sponsor.php;h=27c8cf75f3c2d274389d7f6b7fb8747f984dec11;hb=f97544ccd404280919e2d08a9e4a19e61167277f;hp=1c006bdaaec882014597d7547da2940eb37a8662;hpb=c4823d28fd0bd22250b16d73f2034f36fc54abda;p=mailer.git diff --git a/inc/modules/admin/what-list_sponsor.php b/inc/modules/admin/what-list_sponsor.php index 1c006bdaae..27c8cf75f3 100644 --- a/inc/modules/admin/what-list_sponsor.php +++ b/inc/modules/admin/what-list_sponsor.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -43,7 +43,7 @@ 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`, @@ -58,7 +58,7 @@ 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,47 +71,54 @@ 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'); - // Timestamps + // Epoche times $content['sponsor_created'] = generateDateTime($content['sponsor_created'], 2); $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); + loadTemplate('admin_list_sponsor_details', FALSE, $content); } else { // Sponsor not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('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 + // Sponsor found so let's list all his referrals $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,11 +126,11 @@ ORDER BY SQL_FREERESULT($result); } else { // No refs made so far - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_REFS_404', '' . bigintval(getRequestParameter('refid')) . '')); + displayMessage(getMaskedMessage('ADMIN_SPONSOR_REFS_404', '' . bigintval(getRequestElement('refid')) . '')); } } else { // Sponsor not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('refid')))); + displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestElement('refid')) . '%}'); } } else { // List all sponsors @@ -149,17 +156,17 @@ ORDER BY $content['last_online'] = generateDateTime($content['last_online'], 2); // Load row template - $OUT .= loadTemplate('admin_list_sponsor_row', true, $content); + $OUT .= loadTemplate('admin_list_sponsor_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result_main); // Load final template - loadTemplate('admin_list_sponsor', false, $OUT); + loadTemplate('admin_list_sponsor', FALSE, $OUT); } else { // No sponsors registered so far - loadTemplate('admin_settings_saved', false, '{--ADMIN_SPONSOR_NONE_REGISTERED--}'); + displayMessage('{--ADMIN_SPONSOR_NONE_REGISTERED--}'); } }