Gestionnaire de fichiers - Editer - /home/kridsana/webapp.cm.in.th/663012801/u66301280015/Final/Admin_Page.php
Arrière
<?php session_start(); // ตรวจสอบการล็อกอินและสิทธิ์ admin if (!isset($_SESSION['user_id']) || $_SESSION['role'] !== 'admin') { header('Location: Login'); exit(); } // ดึง URL ปัจจุบันเพื่อใช้ในการ highlight menu ที่กำลังเลือก $current_page = basename($_SERVER['PHP_SELF']); ?> <!DOCTYPE html> <html lang="th"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>หน้าควบคุมสำหรับผู้ดูแลระบบ</title> <link href="https://fonts.googleapis.com/css2?family=K2D:wght@300;400;500;600&display=swap" rel="stylesheet"> <link rel="stylesheet" href="./Css/style.css"> </head> <body style="height: auto; display: block;"> <!-- Navbar --> <nav class="navbar"> <div class="nav-container"> <a href="Admin_Page.php" class="nav-brand"> ระบบจัดการ </a> <div class="nav-menu"> <a href="student_attendance.php" class="nav-link <?php echo $current_page == 'student_attendance.php' ? 'active' : ''; ?>"> ระบบเช็คชื่อนักเรียน </a> <a href="student_attendance_report.php" class="nav-link <?php echo $current_page == 'student_attendance_report.php' ? 'active' : ''; ?>"> รายงานผลการเช็คชื่อ </a> <a href="activity_attendance.php" class="nav-link <?php echo $current_page == 'activity_attendance.php' ? 'active' : ''; ?>"> ระบบเช็คชื่อเข้ากิจกรรม </a> <a href="Logout.php" class="nav-link" style="background-color: #e74c3c;"> ออกจากระบบ </a> </div> </div> </nav> <!-- Dashboard Content --> <div class="dashboard"> <div class="header"> <h1>ยินดีต้อนรับ, <?php echo htmlspecialchars($_SESSION['username']); ?>!</h1> </div> <div style="margin-top: 2rem;"> <!-- เพิ่มเนื้อหาส่วนควบคุมระบบตามต้องการ --> </div> </div> <script> // เพิ่ม active class เมื่อคลิกที่เมนู document.querySelectorAll('.nav-link').forEach(link => { link.addEventListener('click', function() { document.querySelectorAll('.nav-link').forEach(l => l.classList.remove('active')); if (!this.getAttribute('href').includes('Logout.php')) { this.classList.add('active'); } }); }); </script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Génération de la page: 0.59 |
proxy
|
phpinfo
|
Réglages