File manager - Edit - /home/webapp68.cm.in.th/u68319090017/Project/017/header.php
Back
<?php if (session_status() === PHP_SESSION_NONE) { session_start(); } ?> <!DOCTYPE html> <html lang="th"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>วัดดับภัย เชียงใหม่</title> <link rel="stylesheet" href="style.css"> <style> body { font-family: 'Sarabun', sans-serif; margin: 0; padding: 0; background-color: #f4f4f4; } nav { background: #4a148c; /* สีม่วงเข้ม */ padding: 15px 5%; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.2); } .logo-text { color: #ffd54f; font-size: 1.5rem; font-weight: bold; text-decoration: none; } .menu-links a { color: white; text-decoration: none; margin-left: 20px; font-weight: 500; transition: 0.3s; } .menu-links a:hover { color: #ffd54f; } /* ปุ่มพิเศษสำหรับ Admin */ .btn-admin { border: 1px solid #ffd54f; padding: 5px 10px; border-radius: 5px; color: #ffd54f !important; } .btn-logout { color: #ff5252 !important; } .container { max-width: 1100px; margin: auto; padding: 20px; } </style> </head> <body> <nav> <a href="index.php" class="logo-text">วัดดับภัย</a> <div class="menu-links"> <a href="index.php">หน้าหลัก</a> <a href="content.php">ประวัติวัด</a> <a href="news.php">ข่าวสาร</a> <?php if(isset($_SESSION['user_id'])): ?> <?php if($_SESSION['username'] === 'admin'): ?> <a href="appnews.php" class="btn-admin">+ เพิ่มข่าว</a> <a href="show.php" class="btn-admin">จัดการสมาชิก</a> <?php endif; ?> <a href="logout.php" class="btn-logout">ออกจากระบบ (<?php echo $_SESSION['username']; ?>)</a> <?php else: ?> <a href="login.php">เข้าสู่ระบบ</a> <a href="regis.php">สมัครสมาชิก</a> <?php endif; ?> </div> </nav> <div class="container">
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.51 |
proxy
|
phpinfo
|
Settings