Files
gravity/hosxp-webservice/_OLD/error.php
T
2026-09-16 23:20:08 +07:00

50 lines
2.4 KiB
PHP

<?php
$error_message = $_GET['message'] ?? 'ข้อผิดพลาดที่ไม่ทราบสาเหตุ';
// Prevent XSS
$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 href="https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/style.css" type="text/css" />
<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="login-body" onload="coolRedirect('index.php')">
<div class="login-wrapper glass animate-slide-down">
<div class="login-logo" style="color:var(--danger);">
<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>
<h1 style="color:var(--danger); font-size:1.5rem; margin-bottom:1rem;">เข้าสู่ระบบไม่สำเร็จ</h1>
<p style="font-size:1.1rem; color:var(--text-main); margin-bottom:0.5rem;">
<strong><?php echo $error_message; ?></strong> ไม่ถูกต้อง
</p>
<p class="login-subtitle">กรุณาตรวจสอบอีกครั้ง</p>
<div style="margin-top:2rem; font-size:0.9rem; color:var(--text-muted);">
กลับไปหน้าแรกใน <span id="COOL_REDIRECT" style="font-weight:bold; color:var(--primary);">5</span> วินาที
</div>
</div>
</body>
</html>