]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-usr_online.php
More fixes, thanks to Piter01
[mailer.git] / inc / modules / admin / what-usr_online.php
index ef39806ce35ca4e59d452c445157168e0187eac7..063fbb761238fe1771bec44e20253e9d04fa2849 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
 
 // Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
 
 if (EXT_IS_ACTIVE("online", true))
 {
@@ -75,12 +74,12 @@ if (EXT_IS_ACTIVE("online", true))
                        if (empty($act)) $act = "---";
                        if (empty($wht))   $wht = "---";
 
-                       if ($admin == 'Y')
+                       if ($admin == "Y")
                        {
                                // Is an administrator
                                $uid = _IS_ADMIN;
                        }
-                        elseif (($mem == 'N') && ($admin == 'N'))
+                        elseif (($mem == "N") && ($admin == "N"))
                        {
                                // Is a guest
                                $uid = _IS_GUEST;
@@ -115,7 +114,7 @@ if (EXT_IS_ACTIVE("online", true))
                SQL_FREERESULT($result);
 
                // Load footer template
-               define('__FANCY_ONLINE_TIMEOUT', CREATE_FANCY_TIME($CONFIG['online_timeout']));
+               define('__FANCY_ONLINE_TIMEOUT', CREATE_FANCY_TIME($_CONFIG['online_timeout']));
                LOAD_TEMPLATE("admin_online_footer");
        }
 }