76 lines
3.1 KiB
PHP
76 lines
3.1 KiB
PHP
<?php
|
|
$error_message = $_GET['message'] ?? 'ข้อผิดพลาดที่ไม่ทราบสาเหตุ';
|
|
$error_message = htmlspecialchars($error_message);
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="th">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>HOSxP Web Service | ERROR</title>
|
|
<link rel="icon" type="image/png" sizes="16x16" href="favicon1.ico">
|
|
<link rel="stylesheet" href="css/styles.css" type="text/css" />
|
|
<style>
|
|
body.error-page {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 100vh;
|
|
}
|
|
.error-card {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
padding: 40px;
|
|
text-align: center;
|
|
border-top: 4px solid var(--danger);
|
|
}
|
|
.error-logo {
|
|
margin-bottom: 24px;
|
|
color: var(--danger);
|
|
animation: shake 0.5s;
|
|
}
|
|
@keyframes shake {
|
|
0%, 100% { transform: translateX(0); }
|
|
25% { transform: translateX(-10px); }
|
|
75% { transform: translateX(10px); }
|
|
}
|
|
</style>
|
|
<script>
|
|
function coolRedirect(url) {
|
|
let timerEl = document.getElementById("COOL_REDIRECT");
|
|
let cTicks = 5;
|
|
let timer = setInterval(function() {
|
|
cTicks--;
|
|
if (cTicks > 0) {
|
|
timerEl.innerHTML = cTicks;
|
|
} else {
|
|
clearInterval(timer);
|
|
timerEl.innerHTML = "กำลังกลับไปที่หน้าล็อกอิน...";
|
|
location.href = url;
|
|
}
|
|
}, 1000);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body class="error-page" onload="coolRedirect('index.php')">
|
|
<div class="glass-panel error-card">
|
|
<div class="error-logo">
|
|
<svg style="width:64px;height:64px; margin:auto;" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>
|
|
</svg>
|
|
</div>
|
|
<h2 style="color:var(--danger); margin-bottom: 16px;">เข้าสู่ระบบไม่สำเร็จ</h2>
|
|
<p style="font-size:1.1rem; color:var(--text-dark); margin-bottom: 8px;">
|
|
<strong><?php echo $error_message; ?></strong> ไม่ถูกต้อง
|
|
</p>
|
|
<p class="text-muted">กรุณาตรวจสอบอีกครั้ง</p>
|
|
|
|
<div style="margin-top: 30px; font-size: 0.95rem; color: var(--text-light);">
|
|
กลับไปหน้าแรกใน <span id="COOL_REDIRECT" style="font-weight:bold; color:var(--primary);">5</span> วินาที
|
|
</div>
|
|
|
|
<a href="index.php" class="btn btn-primary" style="margin-top: 20px; width:100%;">กลับไปหน้าแรกลิงก์นี้</a>
|
|
</div>
|
|
</body>
|
|
</html>
|