65 lines
3.9 KiB
PHP
65 lines
3.9 KiB
PHP
<?php
|
|
// includes/sidebar.php
|
|
$chk_itcenter = preg_match('/itcenter/', $account ?? '');
|
|
?>
|
|
<aside class="glass-panel sidebar" style="width: 280px; min-height: 100vh; margin-bottom: 0; border-radius: 0; display: flex; flex-direction: column;">
|
|
<div style="padding-bottom: 20px; border-bottom: 1px solid var(--glass-border); margin-bottom: 20px; text-align: center;">
|
|
<svg style="width:48px;height:48px;color:var(--primary);margin-bottom:10px;" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path>
|
|
</svg>
|
|
<h2 style="font-size: 1.25rem;">HOSxP Web</h2>
|
|
</div>
|
|
|
|
<div style="flex: 1;">
|
|
<div style="font-size: 0.8rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; margin-bottom: 10px; letter-spacing: 1px;">เมนูหลัก</div>
|
|
<a href="main.php" class="sidebar-link <?php echo ($page_link == 'main.php') ? 'active' : ''; ?>">
|
|
<svg style="width:20px;height:20px;" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path></svg>
|
|
หน้าหลัก
|
|
</a>
|
|
|
|
<div style="font-size: 0.8rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; margin-top: 30px; margin-bottom: 10px; letter-spacing: 1px;">ค้นหาข้อมูลผู้รับบริการ</div>
|
|
<a href="search_hn.php" class="sidebar-link <?php echo ($page_link == 'search_hn.php') ? 'active' : ''; ?>">ค้นจาก HN</a>
|
|
<a href="search_cid.php" class="sidebar-link <?php echo ($page_link == 'search_cid.php') ? 'active' : ''; ?>">ค้นจากเลขบัตรประชาชน</a>
|
|
<a href="search_passport.php" class="sidebar-link <?php echo ($page_link == 'search_passport.php') ? 'active' : ''; ?>">ค้นจาก Passport</a>
|
|
|
|
<?php if ($chk_itcenter) { ?>
|
|
<a href="search_name.php" class="sidebar-link <?php echo ($page_link == 'search_name.php') ? 'active' : ''; ?>">ค้นจากชื่อ - สกุล</a>
|
|
|
|
<div style="font-size: 0.8rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; margin-top: 30px; margin-bottom: 10px; letter-spacing: 1px;">ผู้ดูแลระบบ</div>
|
|
<a href="2fa_authen.php" class="sidebar-link <?php echo ($page_link == '2fa_authen.php') ? 'active' : ''; ?>">ทำ 2FA Authentication</a>
|
|
<a href="hosxp_cost.php" class="sidebar-link <?php echo ($page_link == 'hosxp_cost.php') ? 'active' : ''; ?>">แก้ไขข้อมูลค่าใช้จ่าย HOSxP</a>
|
|
<?php } ?>
|
|
</div>
|
|
|
|
<div style="margin-top: auto; padding-top: 20px; border-top: 1px solid var(--glass-border); font-size: 0.85rem; color: var(--text-light);">
|
|
<div>OS: <span style="color:var(--primary); font-weight:600;"><?php echo htmlspecialchars($user_os ?? ''); ?></span></div>
|
|
<div>IP: <span style="color:var(--primary); font-weight:600;"><?php echo htmlspecialchars($ip ?? ''); ?></span></div>
|
|
</div>
|
|
</aside>
|
|
|
|
<style>
|
|
.sidebar-link {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px 16px;
|
|
color: var(--text-dark);
|
|
border-radius: 8px;
|
|
margin-bottom: 4px;
|
|
font-weight: 500;
|
|
transition: all 0.2s;
|
|
}
|
|
.sidebar-link:hover {
|
|
background: rgba(2, 132, 199, 0.1);
|
|
color: var(--primary);
|
|
}
|
|
.sidebar-link.active {
|
|
background: var(--primary);
|
|
color: white;
|
|
box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
|
|
}
|
|
.sidebar-link.active svg {
|
|
color: white;
|
|
}
|
|
</style>
|