%PDF-1.5 % ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY
| Server IP : 122.155.177.87 / Your IP : 122.155.177.87 Web Server : Apache/2 System : Linux cat177-87.static.lnwhostname.com 3.10.0-1160.62.1.el7.x86_64 #1 SMP Tue Apr 5 16:57:59 UTC 2022 x86_64 User : apache ( 994) PHP Version : 5.3.29 Disable Function : dl,eval,exec,mail,passthru,popen,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_open,putenv,shell_exec,show_source,system MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/moungngam/domains/moungngam.go.th/public_html/request-system/admin/ |
Upload File : |
<?php
session_start();
require '../config/db.php';
if(isset($_POST['login'])){
$username = $_POST['username'];
$password = $_POST['password'];
$stmt = $conn->prepare("
SELECT * FROM admin_users
WHERE username = ?
");
$admin = $stmt->fetch(PDO::FETCH_ASSOC);
if($admin && password_verify($password,$admin['password'])){
$_SESSION['admin'] = true;
header("location:dashboard.php");
exit();
}else{
echo "<script>alert('Login ไม่ถูกต้อง');</script>";
}
}
?>
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8">
<title>Admin Login</title>
<link rel="stylesheet" href="../assets/style.css">
</head>
<body>
<div class="container">
<h1>Admin Login</h1>
<form method="post">
<input type="text"
name="username"
placeholder="Username"
required>
<input type="password"
name="password"
placeholder="Password"
required>
<button type="submit" name="login">
เข้าสู่ระบบ
</button>
</form>
</div>
</body>
</html>