HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux host 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: w230 (1248)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/w230/html/behavior/index.php
<?php
session_start();
if (isset($_SESSION['user_id'])) {
    header("Location: dashboard.php");
    exit();
}
?>

<!DOCTYPE html>
<html lang="th">
<head>
  <meta charset="UTF-8">
  <title>เข้าสู่ระบบ - ระบบคะแนนพฤติกรรม</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Prompt&display=swap" rel="stylesheet">
  <style>
    body {
      font-family: 'Prompt', sans-serif;
      background: linear-gradient(to right, #f0fff0, #ffffe0);
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }
    .login-box {
      width: 100%;
      max-width: 400px;
      padding: 30px;
      border-radius: 16px;
      background-color: white;
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }
    .profile-icon {
      width: 100px;
      height: 100px;
      background: url('https://cdn-icons-png.flaticon.com/512/4140/4140048.png') no-repeat center center;
      background-size: cover;
      margin: 0 auto 20px;
      border-radius: 50%;
    }
  </style>
</head>
<body>

<div class="container">
  <div class="row justify-content-center">
    <div class="col-12 col-sm-10 col-md-8 col-lg-6 col-xl-4">
      <div class="login-box mx-auto">
        <div class="profile-icon"></div>
        <h4 class="text-center mb-4">ระบบบันทึกคะแนนความประพฤติ</h4>

        <?php if (isset($_GET['error'])): ?>
          <div class="alert alert-danger" role="alert">
            ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง
          </div>
        <?php endif; ?>

        <form action="check_login.php" method="post">
          <div class="mb-3">
            <label for="username" class="form-label">ชื่อผู้ใช้</label>
            <input type="text" class="form-control" id="username" name="username" required autofocus>
          </div>
          <div class="mb-3">
            <label for="password" class="form-label">รหัสผ่าน</label>
            <input type="password" class="form-control" id="password" name="password" required>
          </div>
          <button type="submit" class="btn btn-success w-100">เข้าสู่ระบบ</button>
        </form>

        <div class="text-center mt-3 small text-muted" style="font-family: 'Prompt', sans-serif; font-weight: 300;">
          พัฒนาโดย นายสราวุธ สมพงษ์<br>ครูโรงเรียนบ้านหัววัวหนองนารีตาตวด
        </div>

        <div class="text-center mt-1" style="font-size: 0.75rem; color: #999;">
          BehavioR Version 1.0
        </div>
      </div>
    </div>
  </div>
</div>

</body>
</html>