Files
2026-09-16 23:20:08 +07:00

78 lines
4.4 KiB
PHP

<!-- Theme & Language Controls -->
<div class="auth-controls">
<button class="control-btn" id="langToggleBtn" title="เปลี่ยนภาษา (Change Language)">
<i class="fa-solid fa-language"></i>
</button>
<button class="control-btn" id="themeToggleBtn" title="สลับโหมดสี (Toggle Theme)">
<i id="themeIcon" class="fa-regular fa-moon"></i>
</button>
</div>
<div class="glass-card">
<!-- Left Column: Premium Illustration -->
<div class="auth-illustration">
<!-- Logo Illustration -->
<img src="<?= BASE_URL ?>/assets/img/logo.png" alt="โลโก้กระทรวงสาธารณสุข" width="160" height="160" style="filter: drop-shadow(0 0 20px rgba(0, 102, 204, 0.2)); margin-bottom: 2rem; animation: float 10s infinite alternate ease-in-out;">
<h2 class="auth-title" style="font-size: 1.5rem;">ระบบขออนุมัติเดินทาง</h2>
<p class="auth-subtitle" style="margin-bottom: 0;">จัดการเอกสารและการอนุมัติอย่างเป็นระบบเพื่อองค์กรยุคใหม่</p>
</div>
<!-- Right Column: Login Form -->
<div class="auth-form-container">
<!-- Loading Overlay -->
<div class="auth-loading-overlay" id="loadingOverlay">
<div class="spinner"></div>
<div class="fw-semibold" style="color: var(--auth-text-main);">กำลังเข้าสู่ระบบ...</div>
</div>
<div class="text-center mb-4">
<h1 class="auth-title">ยินดีต้อนรับเข้าสู่ระบบ</h1>
<p class="auth-subtitle">ระบบขออนุมัติเดินทางประชุม-อบรม</p>
</div>
<?php if(isset($_SESSION['flash_error'])): ?>
<div class="alert alert-danger py-2 small rounded-3 border-0 shadow-sm" style="background-color: rgba(220, 53, 69, 0.1); color: #dc3545;">
<i class="fa-solid fa-circle-exclamation me-1"></i>
<?= \App\Core\Security::escape($_SESSION['flash_error']); unset($_SESSION['flash_error']); ?>
</div>
<?php endif; ?>
<form action="<?= BASE_URL ?>/login" method="POST" id="loginForm">
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>">
<div class="form-floating mb-3">
<input type="text" class="form-control" id="floatingInput" name="username" placeholder="ชื่อผู้ใช้งาน (HR)" required autofocus autocomplete="username">
<label for="floatingInput"><i class="fa-regular fa-user me-2"></i>ชื่อผู้ใช้งาน</label>
</div>
<div class="form-floating mb-4">
<input type="password" class="form-control" id="floatingPassword" name="password" placeholder="รหัสผ่าน" required autocomplete="current-password">
<label for="floatingPassword"><i class="fa-solid fa-lock me-2"></i>รหัสผ่าน</label>
</div>
<div class="d-flex justify-content-between align-items-center mb-4">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="rememberMe" style="border-color: var(--auth-input-border);">
<label class="form-check-label small" for="rememberMe" style="color: var(--auth-text-muted);">
จดจำฉันไว้ในระบบ
</label>
</div>
<a href="#" class="text-decoration-none small" style="color: var(--auth-btn-bg); font-weight: 500;">ลืมรหัสผ่าน?</a>
</div>
<button class="btn-auth w-100 d-flex justify-content-center align-items-center" type="submit" id="submitBtn">
<span>เข้าสู่ระบบ</span>
<i class="fa-solid fa-arrow-right ms-2 opacity-75"></i>
</button>
</form>
<div class="text-center mt-5">
<p class="small mb-0" style="color: var(--auth-text-muted);">
© <?= date('Y') ?> ระบบจัดการภายในองค์กร สงวนลิขสิทธิ์
</p>
</div>
</div>
</div>