From 1ad132077936aff951bc67cb7bd5f373e209832a Mon Sep 17 00:00:00 2001 From: iBNu Maksum Date: Wed, 12 Feb 2025 11:35:20 +0700 Subject: [PATCH 1/3] Fix setting save --- system/controllers/settings.php | 10 +++++ ui/ui/admin/settings/app.tpl | 73 --------------------------------- version.json | 2 +- 3 files changed, 11 insertions(+), 74 deletions(-) diff --git a/system/controllers/settings.php b/system/controllers/settings.php index b1323afe..c01f1248 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -216,6 +216,16 @@ switch ($action) { $_POST['man_fields_custom'] = isset($_POST['man_fields_custom']) ? 'yes' : 'no'; $enable_session_timeout = isset($_POST['enable_session_timeout']) ? 1 : 0; $_POST['enable_session_timeout'] = $enable_session_timeout; + + // hide dashboard + $_POST['hide_mrc'] = _post('hide_mrc', 'no'); + $_POST['hide_tms'] = _post('hide_tms', 'no'); + $_POST['hide_al'] = _post('hide_al', 'no'); + $_POST['hide_uet'] = _post('hide_uet', 'no'); + $_POST['hide_vs'] = _post('hide_vs', 'no'); + $_POST['hide_pg'] = _post('hide_pg', 'no'); + $_POST['hide_aui'] = _post('hide_aui', 'no'); + foreach ($_POST as $key => $value) { $d = ORM::for_table('tbl_appconfig')->where('setting', $key)->find_one(); if ($d) { diff --git a/ui/ui/admin/settings/app.tpl b/ui/ui/admin/settings/app.tpl index 3747e2c5..03965655 100644 --- a/ui/ui/admin/settings/app.tpl +++ b/ui/ui/admin/settings/app.tpl @@ -137,11 +137,7 @@ - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

{Lang::T('Settings For Mikrotik')}

/ip hotspot walled-garden
diff --git a/version.json b/version.json index f9dfd124..3a9fda8b 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "2025.2.11" + "version": "2025.2.12" } \ No newline at end of file From 304de7a9998d2dbcbad1183d90a0bfb77370ec19 Mon Sep 17 00:00:00 2001 From: iBNu Maksum Date: Wed, 12 Feb 2025 11:50:04 +0700 Subject: [PATCH 2/3] fix 404 --- system/boot.php | 14 +++++++++----- ui/ui/admin/dashboard.tpl | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) 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'])}
From fa5be4c1961e57d5b60114f25a8b324ae2a9d5b9 Mon Sep 17 00:00:00 2001 From: iBNu Maksum Date: Wed, 12 Feb 2025 11:56:18 +0700 Subject: [PATCH 3/3] delete debug --- ui/ui/admin/dashboard.tpl | 1 - version.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/ui/admin/dashboard.tpl b/ui/ui/admin/dashboard.tpl index e6bfcca5..b4b310d6 100644 --- a/ui/ui/admin/dashboard.tpl +++ b/ui/ui/admin/dashboard.tpl @@ -1,6 +1,5 @@ {include file="sections/header.tpl"} -
{if in_array($_admin['user_type'],['SuperAdmin','Admin', 'Report'])}
diff --git a/version.json b/version.json index 3a9fda8b..e3b6b28d 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "2025.2.12" + "version": "2025.2.12.1" } \ No newline at end of file