]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-top10.php
More rewrites to use EL code
[mailer.git] / inc / modules / guest / what-top10.php
index 97505560e284de32a228503dd0d673c4f7761620..ebde2cb86c4fa8e1d14923d6e983502d9c3424c5 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -44,14 +44,14 @@ if (!defined('__SECURITY')) {
 addYouAreHereLink('guest', __FILE__);
 
 if ((!isExtensionActive('top10')) && (!isAdmin())) {
-       loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('top10'));
+       displayMessage(generateExtensionInactiveNotInstalledMessage('top10'));
        return;
 } // END - if
 
 // Init array
 $rows = array();
 
-//// TOP logins
+// TOP logins
 $result = SQL_QUERY("SELECT
        `userid`, `total_logins`, `last_online`
 FROM
@@ -107,10 +107,10 @@ $rows['logins_out'] = $OUT;
 // Free result
 SQL_FREERESULT($result);
 
-//// TOP earners
+// TOP earners
 $result = SQL_QUERY("SELECT
        d.userid,
-       (SUM(p.points) - d.used_points) AS points,
+       (SUM(p.points) - d.used_points) AS `points`,
        d.last_online
 FROM
        `{?_MYSQL_PREFIX?}_user_data` AS d
@@ -171,7 +171,7 @@ $rows['points_out'] = $OUT;
 // Free result
 SQL_FREERESULT($result);
 
-//// TOP referal "hunter"
+// TOP referal "hunter"
 $result = SQL_QUERY("SELECT
        d.userid,
        SUM(r.counter) AS refs,
@@ -198,7 +198,9 @@ while ($content = SQL_FETCHARRAY($result)) {
        $content['nickname'] = '';
 
        // Get nickname
-       if (isExtensionActive('nickname')) $content['nickname'] = getNickname($content['userid']);
+       if (isExtensionActive('nickname')) {
+               $content['nickname'] = getNickname($content['userid']);
+       } // END - if
 
        // Prepare data for template
        $content = array(
@@ -206,7 +208,6 @@ while ($content = SQL_FETCHARRAY($result)) {
                'userid'      => $content['userid'],
                'refs'        => $content['refs'],
                'nickname'    => $content['nickname'],
-               'points'      => getTotalPoints($content['userid']),
                'last_online' => generateDateTime($content['last_online'], 3)
        );