-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
144 lines (111 loc) · 5.58 KB
/
index.php
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
134
135
136
137
138
139
140
141
142
143
144
<?php
error_reporting(0);
session_start();
require_once('config.php');
extract($_POST);
$emp_hr='H.R.';
date_default_timezone_set('Asia/Kolkata');
if(isset($sign_in))
{
$que=mysqli_query($con,"select * from admin where user_name='$username' and password='$password'");
//$row=mysqli_num_rows($que);
$rw=mysqli_fetch_array($que);
$adminlog = $rw['user_name'];
$adminpass = $rw['password'];
$empque=mysqli_query($con,"select * from add_employee where employee_code='$username' and emp_password='$password'");
$emprw=mysqli_fetch_array($empque);
$employeelog = $emprw['employee_code'];
$employeepass = $emprw['emp_password'];
$emphr=mysqli_query($con,"select * from add_employee where employee_code='$username' and emp_password='$password' and employee_department='$emp_hr'");
$emprws=mysqli_fetch_array($emphr);
$emphrloyeelog = $emprws['employee_code'];
$emphrloyeepass = $emprws['emp_password'];
if($username=="" || $password=="")
{
$err="<div class='alert alert-danger'>Please Fill Username And Password</div>";
}
elseif($username==$adminlog || $password==$adminpass)
{
$_SESSION['username']=true;
header('location:index1');
//admindashboard.php
}
elseif($username==$emphrloyeelog || $password==$emphrloyeepass)
{
$_SESSION['username']=$employeelog;
header('location:employeehr');
//admindashboard.php
}
elseif($username==$employeelog || $password==$employeepass)
{
$_SESSION['username']=$employeelog;
header('location:employee');
//admindashboard.php
}
else
{
$err="<div class='alert alert-danger'>Wrong Login Details</div>";
}
}
include('loader.html');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>LMS HRMS Admin Panel</title>
<link href="http://themepixels.com/demo/webpage/chain/css/style.default.css" rel="stylesheet">
<link href="http://themepixels.com/demo/webpage/chain/css/morris.css" rel="stylesheet">
<link href="http://themepixels.com/demo/webpage/chain/css/select2.css" rel="stylesheet" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href="css/style.default.css" rel="stylesheet">
<link href="css/stylemanual.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body class="signin" background="img/index_back.jpg" onload="myFunction()" >
<div id="loader"></div>
<section style="display:none;" id="myDiv" class="animate-bottom">
<div class="panel panel-signin login-panel-box" >
<div class="panel-body">
<div class="logo text-center">
<img src="img/lead-logo.png" alt="LMS Logo" >
</div>
<br />
<h4 class="text-center mb5" style="color:rgba(9, 35, 68, 0.95);">Welcome To LMS-HRMS</h4>
<p class="text-center" style="color:rgba(9, 35, 68, 0.95);">Sign in to your account</p>
<div class="mb30"><?php echo @$err;?></div>
<form method="post">
<div class="input-group mb15">
<span class="input-group-addon" style="background-color: rgba(247, 247, 247, 0.11);"><i class="fa fa-user" aria-hidden="true" style="color: rgba(9, 35, 68, 0.95);"></i></span>
<input type="text" name="username" style="background-color: rgba(255, 255, 255, 0.68);" class="form-control" placeholder="Username">
</div><!-- input-group -->
<div class="input-group mb15">
<span class="input-group-addon" style="background-color: rgba(247, 247, 247, 0.11);"><i class="fa fa-key" aria-hidden="true" style="color: rgba(9, 35, 68, 0.95);"></i></span>
<input type="password" name="password" style="background-color: rgba(255, 255, 255, 0.68);" class="form-control" placeholder="Password">
</div><!-- input-group -->
<div class="clearfix">
<div class="pull-right">
<button type="submit" name="sign_in" class="btn btn-success" style="background-color:rgba(9, 35, 68, 0.95);">Sign In <i class="fa fa-angle-right ml5"></i></button>
</div>
</div>
</form>
</div><!-- panel-body -->
</div><!-- panel -->
</section>
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/jquery-migrate-1.2.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/modernizr.min.js"></script>
<script src="js/pace.min.js"></script>
<script src="js/retina.min.js"></script>
<script src="js/jquery.cookies.js"></script>
<script src="js/custom.js"></script>
</body>
</html>