Initial commit

This commit is contained in:
Porawit Dongwang
2026-09-16 23:20:08 +07:00
commit 0041668dbb
32577 changed files with 3687927 additions and 0 deletions
@@ -0,0 +1,109 @@
<?php
session_start();
if (isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true) {
header("location: form.php");
exit;
}
?>
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>เข้าสู่ระบบ - แบบประเมินประจำปี หน่วยงานสุขภาพดิจิทัล</title>
<!-- Favicon -->
<link rel="icon" type="image/png" href="assets/images/logo.png">
<!-- Bootstrap 5 -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Google Fonts: Sarabun -->
<link href="https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<!-- SweetAlert2 -->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<style>
body {
font-family: 'Sarabun', sans-serif;
background: linear-gradient(135deg, #e9f4f5 0%, #f5f8fb 48%, #e7edf5 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.login-card {
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(10px);
border-radius: 20px;
border: 1px solid rgba(255,255,255,0.5);
box-shadow: 0 18px 55px rgba(22, 52, 77, 0.13);
padding: 2.5rem;
width: 100%;
max-width: 400px;
}
.login-card h2 {
font-weight: 700;
color: #12344d;
margin-bottom: 1.5rem;
text-align: center;
}
.form-control {
border-radius: 10px;
padding: 0.75rem 1rem;
border: 1px solid #dce5ec;
}
.form-control:focus {
box-shadow: 0 0 0 3px rgba(0, 127, 139, 0.13);
border-color: #007f8b;
}
.btn-primary {
background: linear-gradient(135deg, #008f91, #005d68);
border: none;
border-radius: 10px;
padding: 0.75rem;
font-weight: 600;
width: 100%;
transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 9px 18px rgba(0, 93, 104, 0.27);
}
</style>
</head>
<body>
<div class="login-card">
<div class="text-center mb-3">
<img src="assets/images/logo.png" alt="Logo" width="80" class="img-fluid">
</div>
<h2>เข้าสู่ระบบ</h2>
<p class="text-center text-muted mb-4">ระบบแบบประเมินสุขภาพดิจิทัล ประจำปี</p>
<form action="actions/process_login.php" method="POST">
<div class="mb-3">
<label for="username" class="form-label text-muted fw-bold">ชื่อผู้ใช้งาน (Username)</label>
<input type="text" class="form-control" id="username" name="username" required>
</div>
<div class="mb-4">
<label for="password" class="form-label text-muted fw-bold">รหัสผ่าน (Password)</label>
<input type="password" class="form-control" id="password" name="password" required>
</div>
<button type="submit" class="btn btn-primary">เข้าสู่ระบบ</button>
</form>
</div>
<?php
if (isset($_SESSION['login_error'])) {
$error = $_SESSION['login_error'];
echo "<script>
Swal.fire({
icon: 'error',
title: 'เข้าสู่ระบบล้มเหลว',
text: '$error',
confirmButtonColor: '#007f8b'
});
</script>";
unset($_SESSION['login_error']);
}
?>
</body>
</html>