]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_sponsor.php
The usual changes: forms fixed
[mailer.git] / inc / modules / admin / what-list_sponsor.php
index 8b8e451bf9e1518448b9546bf2131aa63e2db93e..27c8cf75f3c2d274389d7f6b7fb8747f984dec11 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * 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 *
@@ -46,14 +46,14 @@ addYouAreHereLink('admin', __FILE__);
 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
@@ -79,10 +79,10 @@ WHERE
                $content['last_online']     = generateDateTime($content['last_online'], 2);
                $content['last_change']     = generateDateTime($content['last_change'], 2);
                //  Orders total
-               $content['orders']          = countSumTotalData(bigintval(getRequestElement('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
                displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestElement('id')) . '%}');
@@ -98,13 +98,20 @@ WHERE
                // 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
@@ -128,10 +135,10 @@ ORDER BY
 } 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
@@ -149,14 +156,14 @@ 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
                displayMessage('{--ADMIN_SPONSOR_NONE_REGISTERED--}');