File manager - Edit - /home/webapp68.cm.in.th/u68319090024/final/news/login.html
Back
<!DOCTYPE html> <html lang="th"> <head> <meta charset="UTF-8"> <title>เข้าสู่ระบบ</title> <style> body { font-family: Arial, sans-serif; background-color: #f4f4f4; display: flex; justify-content: center; align-items: center; height: 100vh; } .login-box { background-color: #fff; padding: 30px; border-radius: 8px; box-shadow: 1px 1px 10px rgba(0,0,0,0.1); width: 300px; text-align: center; } h2 { margin-bottom: 20px; color: #333; } input { width: 90%; padding: 10px; margin: 10px 0; border-radius: 5px; border: 1px solid #ccc; } button { padding: 10px 20px; border: none; border-radius: 5px; background-color: #007BFF; color: #fff; cursor: pointer; margin-top: 10px; } button:hover { background-color: #0056b3; } .error { color: red; font-size: 0.9em; margin-bottom: 10px; } </style> <script> function loginCheck(event) { event.preventDefault(); var username = document.getElementById('username').value; var password = document.getElementById('password').value; // ตรวจสอบแบบง่าย (username: admin, password: 1234) if(username === "admin" && password === "1234"){ localStorage.setItem("loggedIn", "true"); // บันทึกสถานะการ login window.location.href = "index.html"; // ไปหน้า Dashboard } else { document.getElementById('error').textContent = "ชื่อผู้ใช้งานหรือรหัสผ่านไม่ถูกต้อง"; } } </script> </head> <body> <div class="login-box"> <h2>เข้าสู่ระบบ</h2> <div id="error" class="error"></div> <form onsubmit="loginCheck(event)"> <input type="text" id="username" placeholder="ชื่อผู้ใช้งาน" required><br> <input type="password" id="password" placeholder="รหัสผ่าน" required><br> <button type="submit">เข้าสู่ระบบ</button> </form> </div> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.51 |
proxy
|
phpinfo
|
Settings