请查看CHANGELOG.md获取更新信息

This commit is contained in:
MasonLiu committed 2026-09-13 00:54:16 +08:00
1 parent bf772046cc
commit 9bb6e6a41e
18 files changed
+879 -105

No files matched your search

+11 -1
View File
@@ -7,11 +7,20 @@ require_once dirname(__DIR__) . '/includes/auth.php';
require_once dirname(__DIR__) . '/includes/layout.php';
require_login('login.php');
// 未修改初始/重置密码前,禁止进入其它后台页面(避免绕过强制改密)
if (hp_password_needs_change()) {
$self = basename((string) ($_SERVER['SCRIPT_NAME'] ?? ''));
if ($self !== 'force_password.php') {
header('Location: force_password.php');
exit;
}
}
/** 后台侧边栏(原顶部分区栏改为可收缩侧栏;含“本页功能”锚点容器) */
function admin_topbar(string $active = ''): void
{
global $P;
$site = setting_get('site_name', '知识导航站');
$site = setting_get('site_name', 'SecHome');
$admin = (string) ($_SESSION['admin'] ?? '');
// 立即执行:标记 body 供侧栏布局使用,并恢复折叠状态(避免首帧闪动)
echo '<script>(function(){var b=document.body;if(!b)return;b.classList.add("hp-admin-side");try{if(localStorage.getItem("hp-admin-side-collapsed")==="1")b.classList.add("hp-side-collapsed");}catch(e){}})();</script>' . "\n";
@@ -40,6 +49,7 @@ function admin_topbar(string $active = ''): void
'articles' => ['articles.php', '文章管理', '📄'],
'exttools' => ['exttools.php', '外部工具', '🔗'],
'content' => ['content.php', '网站管理', '⚙'],
'notice' => ['notice.php', '更新公告', '📢'],
'visits' => ['visits.php', '风控管理', '🛡'],
];
echo '<nav class="as-nav">';