D7net Mini Sh3LL v1
Current File : C:/Domains/maymaytinson.com/httpdocs/lib/images/13/../10/../7/../16/../activity/../JUKI/../15/../zip_food/../18/../17/../2/../21/../20/../22/../5/../11/../7/../5/../22/../22/../20/../19/../10/../../../include/login.php |
<div id="direct"><a href="index.php">Trang chủ</a> <span>></span> Đăng nhập</div>
<div id="register">
<h1 align="center">Đăng nhập</h1>
<form method="POST">
<table>
<tr>
<td><input type="text" name="mail" placeholder="E-mail"></td>
</tr>
<tr>
<td><input type="password" name="pass" placeholder="Mật khẩu"></td>
</tr>
<tr>
<td><button type="submit" name="login">ĐĂNG NHẬP</button></td>
</tr>
</table>
</form>
<?php
if(isset($_POST['login'])){
if(empty($_POST['mail'])){
$errors[]="Vui lòng nhập email";
}
if(empty($_POST['pass'])){
$errors[]="Vui lòng nhập mật khẩu";
}
if(empty($errors)){
$stmt=$conn->prepare("SELECT * FROM member WHERE user='".$_POST['mail']."'");
$stmt->execute();
$user=$stmt->fetch(PDO::FETCH_ASSOC);
if($user['pass']==$_POST['pass']){
if($user['del']==0){
$_SESSION['id']=$user['id'];
$_SESSION['mail']=$_POST['mail'];
$_SESSION['user']=$_POST['mail'];
$_SESSION['level']=$user['type'];
$_SESSION['name']=$user['name'];
$_SESSION['phone']=$user['phone'];
success("Đăng nhập");
}else{
$errors[]="Tài khoản đang bị khóa";notice($errors);
}
}else{
$errors[]="Sai tên tài khoản hoặc mật khẩu";
notice($errors);
}
}else{
notice($errors);
}
}
?>
</div>
AnonSec - 2021 | Recode By D7net