]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/action-online.php
Display error fixed when active and online extensions are installed
[mailer.git] / inc / modules / guest / action-online.php
index 5d7ba831d4d0a65166fca0047852496a5002955a..07fbcec63bad705e2be00944b7b8359f4ed0ae81 100644 (file)
@@ -32,7 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("online")) {
@@ -46,11 +46,11 @@ $result_admins  = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_ad
 
 // Total visitors online
 $total      = SQL_NUMROWS($result_guests) + SQL_NUMROWS($result_members) + SQL_NUMROWS($result_admins);
-if ($_CONFIG['mad_counter'] < $total) {
+if ($_CONFIG['mad_count'] < $total) {
        // Update counter
        UPDATE_CONFIG(array("mad_timestamp", "mad_count"), array(time(), $total));
-       $_CONFIG['mad_counter'] = $total;
-       $_CONFIG['last_mad']    = time();
+       $_CONFIG['mad_count'] = $total;
+       $_CONFIG['last_mad']  = time();
 }
 
 // Put all values in constants for the template
@@ -62,9 +62,15 @@ define('ADMINS_ONLINE_CNT' , SQL_NUMROWS($result_admins));
 LOAD_TEMPLATE("online_now");
 
 if (EXT_IS_ACTIVE("active")) {
+       // Init content
+       $content = array(
+               'menu' => "<A class=\"menu_blur\" href=\"".URL."/modules.php?module=index&amp;what=active\">".$_CONFIG['menu_blur_spacer'].GUEST_ACTIVE_LINK."</A>",
+               'what' => "active"
+       );
+
        // Add link to "we were active today" page
-       LOAD_TEMPLATE("guest_menu_bottom", false, "<A class=\"menu_blur\" href=\"".URL."/modules.php?module=index&amp;what=active\">".$_CONFIG['menu_blur_spacer'].GUEST_ACTIVE_LINK."</A>");
-}
+       LOAD_TEMPLATE("guest_menu_bottom", false, $content);
+} // END - if
 
 //
 ?>