]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-active.php
Generalized more 'builder' functions, added XML template for editing user sub ids
[mailer.git] / inc / modules / guest / what-active.php
index 36dd9e4443c3749550b1238d785853462363b0e7..76dc94f8ef28236cf11c2c8ee34050cfcc7d74ba 100644 (file)
@@ -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 *
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       die();
+       exit();
 } // END - if
 
 // Add description as navigation point
 addYouAreHereLink('guest', __FILE__);
 
 if ((!isExtensionActive('active')) && (!isAdmin())) {
-       displayMessage(generateExtensionInactiveNotInstalledMessage('active'));
+       displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=active%}');
        return;
 } // END - if
 
-// Extra field to include is by default userid
-$add = '';
-
-// If nickname is installed the extra field is the nickname of the user
-if (isExtensionActive('nickname')) {
-       $add = ', `nickname`';
-} // END - if
-
 // Check for members who were active only this day
 $result = SQL_QUERY("SELECT
-       `userid``, `last_online`".$add."
+       `userid`,`last_online`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
        `last_online` >= {?START_TDAY?} AND
        `status`='CONFIRMED'
+       " . runFilterChain('user_exclusion_sql', ' ') . "
 ORDER BY
        `last_online` DESC
 LIMIT {?active_limit?}", __FILE__, __LINE__);
@@ -79,18 +72,18 @@ if (!SQL_HASZERONUMS($result)) {
                } // END - if
 
                // Translate comma
-               $content['last_online'] = generateDateTime($last, 2);
+               $content['last_online'] = generateDateTime($content['last_online'], '2');
 
                // Load template
-               $OUT .= loadTemplate('guest_active_row', true, $content);
+               $OUT .= loadTemplate('guest_list_active_row', true, $content);
        } // END - while
 } else {
        // No member was online today! :-(
-       $OUT = loadTemplate('guest_active_none_row', true);
+       $OUT = loadTemplate('guest_list_active_row_none', true);
 }
 
 // Load template
-loadTemplate('guest_active_table', false, $OUT);
+loadTemplate('guest_list_active', false, $OUT);
 
 // [EOF]
 ?>