File manager - Edit - /home/webapp68.cm.in.th/u68319090024/final/news/index.html
Back
<!DOCTYPE html> <html lang="th"> <head> <meta charset="UTF-8"> <title>Dashboard ข่าวสาร</title> <style> body { font-family: Arial, sans-serif; background: #f4f4f4; margin: 20px; } h1 { text-align: center; color: #333; } .logout-btn { position: absolute; top: 20px; right: 20px; padding: 8px 15px; background: #dc3545; color: #fff; border: none; border-radius: 5px; cursor: pointer; } .logout-btn:hover { background: #a71d2a; } .dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 60px; } .card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 1px 1px 8px rgba(0,0,0,0.1); text-align: center; transition: transform 0.2s; } .card:hover { transform: scale(1.05); } .card h2 { color: #007BFF; } .card p { font-size: 1.2em; color: #555; } .card a { display: inline-block; margin-top: 10px; padding: 8px 15px; background: #007BFF; color: #fff; text-decoration: none; border-radius: 5px; } .card a:hover { background: #0056b3; } </style> </head> <body> <button class="logout-btn" onclick="logout()">ออกจากระบบ</button> <h1>Dashboard ข่าวสาร</h1> <div class="dashboard"> <div class="card"> <h2>สรุปจำนวนบทความ</h2> <p id="totalArticles">จำนวนบทความทั้งหมด: 0</p> <a href="summary.html">ดูรายละเอียด</a> </div> <div class="card"> <h2>จัดการผู้ใช้งาน</h2> <a href="users.html">ไปจัดการผู้ใช้งาน</a> </div> <div class="card"> <h2>จัดการหมวดหมู่</h2> <a href="categories.html">ไปจัดการหมวดหมู่</a> </div> <div class="card"> <h2>จัดการบทความ</h2> <a href="articles.html">ไปจัดการบทความ</a> </div> </div> <script> // ตรวจสอบสถานะการ login if(localStorage.getItem("loggedIn") !== "true"){ window.location.href = "login.html"; } // ปุ่มออกจากระบบ function logout(){ localStorage.removeItem("loggedIn"); window.location.href = "login.html"; } // ข้อมูลบทความจำลอง let articles = [ {title:"ข่าวสารประชาสัมพันธ์ทั่วไป", category:"ทั่วไป"}, {title:"โควตาเรียนดี สำหรับสถานศึกษา", category:"การศึกษา"} ]; // แสดงจำนวนบทความ document.getElementById('totalArticles').innerText = "จำนวนบทความทั้งหมด: " + articles.length; </script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 1.38 |
proxy
|
phpinfo
|
Settings