diff --git a/system/boot.php b/system/boot.php index 2b3a85bb..ad8d454a 100644 --- a/system/boot.php +++ b/system/boot.php @@ -128,11 +128,15 @@ try { unset($menus, $menu_registered); include($sys_render); } else { - // header 404 - header("HTTP/1.0 404 Not Found"); - header("Content-Type: text/html; charset=utf-8"); - echo "404 Not Found"; - die(); + if( empty($_SERVER["HTTP_SEC_FETCH_DEST"]) || $_SERVER["HTTP_SEC_FETCH_DEST"] != 'document' ){ + // header 404 + header("HTTP/1.0 404 Not Found"); + header("Content-Type: text/html; charset=utf-8"); + echo "404 Not Found"; + die(); + }else{ + r2(getUrl('login')); + } } } catch (Throwable $e) { Message::sendTelegram( diff --git a/ui/ui/admin/dashboard.tpl b/ui/ui/admin/dashboard.tpl index b4b310d6..e6bfcca5 100644 --- a/ui/ui/admin/dashboard.tpl +++ b/ui/ui/admin/dashboard.tpl @@ -1,5 +1,6 @@ {include file="sections/header.tpl"} +
{if in_array($_admin['user_type'],['SuperAdmin','Admin', 'Report'])}