-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
133 lines (122 loc) · 5.55 KB
/
index.php
File metadata and controls
133 lines (122 loc) · 5.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
session_start();
error_reporting(0);
include('includes/dbconn.php');
if(isset($_POST['signin']))
{
$uname=$_POST['username'];
$password=md5($_POST['password']);
$sql ="SELECT EmailId,Password,Status,id FROM tblemployees WHERE EmailId=:uname and Password=:password";
$query= $dbh -> prepare($sql);
$query-> bindParam(':uname', $uname, PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
foreach ($results as $result) {
$status=$result->Status;
$_SESSION['eid']=$result->id;
}
if($status==0)
{
$msg="Akaun Tidak Aktif. Sila hubungi pentadbir anda!";
} else {
$_SESSION['emplogin']=$_POST['username'];
echo "<script type='text/javascript'> document.location = 'employees/main.php'; </script>";
}
} else {
echo "<script>alert('Maaf, Butiran Tidak Sah.');</script>";
}
}
?>
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Pengurusan Asset ICT</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="assets/images/icon/favicon.ico">
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/themify-icons.css">
<link rel="stylesheet" href="assets/css/metisMenu.css">
<link rel="stylesheet" href="assets/css/owl.carousel.min.css">
<link rel="stylesheet" href="assets/css/slicknav.min.css">
<!-- amchart css -->
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<!-- others css -->
<link rel="stylesheet" href="assets/css/typography.css">
<link rel="stylesheet" href="assets/css/default-css.css">
<link rel="stylesheet" href="assets/css/styles.css">
<link rel="stylesheet" href="assets/css/responsive.css">
<!-- modernizr css -->
<script src="assets/js/vendor/modernizr-2.8.3.min.js"></script>
</head>
<body>
<!-- preloader area start -->
<div id="preloader">
<div class="loader"></div>
</div>
<!-- preloader area end -->
<!-- login area start -->
<div class="login-area login-s2">
<div class="container">
<div class="login-box ptb--100">
<form method="POST" name="signin">
<div class="login-form-head">
<h4>Pejabat Tanah Muar</h4>
<p>Pengguna Login</p>
<?php if($msg){?><div class="errorWrap"><strong>Error</strong> : <?php echo htmlentities($msg); ?> </div><?php }?>
</div>
<div class="login-form-body">
<div class="form-gp">
<label for="exampleInputEmail1">Email </label>
<input type="email" id="username" name="username" autocomplete="off" required style="color: white;">
<i class="ti-email"></i>
<div class="text-danger"></div>
</div>
<div class="form-gp">
<label for="exampleInputPassword1">Kata Laluan</label>
<input type="password" id="password" name="password" autocomplete="off" required>
<i class="ti-lock"></i>
<div class="text-danger"></div>
</div>
<div class="row mb-4 rmber-area">
<div class="col-6">
<div class="custom-control custom-checkbox mr-sm-2">
<input type="checkbox" class="custom-control-input" id="customControlAutosizing">
<label class="custom-control-label" for="customControlAutosizing" style="color: white;">Ingat Saya</label>
</div>
</div>
<div class="col-6 text-right">
<a href="password-recovery.php">Lupa Kata Laluan?</a>
</div>
</div>
<div class="submit-btn-area">
<button id="form_submit" type="submit" name="signin">Login <i class="ti-arrow-right"></i></button>
</div>
<div class="form-footer text-center mt-5">
<p class="text-muted"><a href="admin/index.php">Administrator</a></p>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- login area end -->
<!-- jquery latest version -->
<script src="assets/js/vendor/jquery-2.2.4.min.js"></script>
<!-- bootstrap 4 js -->
<script src="assets/js/popper.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>
<script src="assets/js/metisMenu.min.js"></script>
<script src="assets/js/jquery.slimscroll.min.js"></script>
<script src="assets/js/jquery.slicknav.min.js"></script>
<!-- others plugins -->
<script src="assets/js/plugins.js"></script>
<script src="assets/js/scripts.js"></script>
</body>
</html>