]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/action-online.php
Huge script change, see http://forum.mxchange.org/topic-458.html for details:
[mailer.git] / inc / modules / guest / action-online.php
index d3844e778e2ec00d2180b8843e6af81534db0984..f2f36dec20bd850634926896b5df92b16c71fc28 100644 (file)
@@ -17,7 +17,7 @@
  * Needs to be in all Files and every File needs "svn propset           *
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
-       require($INC);
-} elseif ((!EXT_IS_ACTIVE('online')) && (!IS_ADMIN())) {
+       die();
+} elseif ((!isExtensionActive('online')) && (!isAdmin())) {
        // Just skip this extension
        return;
 }
 
 // Total visitors online
-$total = GET_TOTAL_DATA('', 'online', 'id', 'userid', true);
+$total = countSumTotalData('', 'online', 'id', 'userid', true);
 
 if (getConfig('mad_count') < $total) {
        // Update counter
@@ -55,17 +54,17 @@ if (getConfig('mad_count') < $total) {
 
 // Prepare content
 $content = array(
-       'guests'  => translateComma(GET_TOTAL_DATA('N', 'online', 'id', 'is_admin', true, " AND `is_member`='N'")),
-       'members' => translateComma(GET_TOTAL_DATA('N', 'online', 'id', 'is_admin', true, " AND `is_member`='Y'")),
-       'admins'  => translateComma(GET_TOTAL_DATA('Y', 'online', 'id', 'is_admin', true)),
+       'guests'  => translateComma(countSumTotalData('N', 'online', 'id', 'is_admin', true, " AND `is_member`='N'")),
+       'members' => translateComma(countSumTotalData('N', 'online', 'id', 'is_admin', true, " AND `is_member`='Y'")),
+       'admins'  => translateComma(countSumTotalData('Y', 'online', 'id', 'is_admin', true)),
        'total'   => translateComma($total)
 );
 
 // Output table
-LOAD_TEMPLATE('online_now', false, $content);
+$GLOBALS['rows'] .= loadTemplate('online_now', true, $content);
 
 // Add more links in this block
 runFilterChain('online_extra_links');
 
-//
+// [EOF]
 ?>