-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
187 lines (155 loc) · 8.65 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if($_SESSION['alogin']!=''){
$_SESSION['alogin']='';
}
if(isset($_POST['login']))
{
$uname=$_POST['username'];
$password=md5($_POST['password']);
$sql ="SELECT UserName,Password FROM admin WHERE UserName=: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)
{
$_SESSION['alogin']=$_POST['username'];
echo "<script type='text/javascript'> document.location = 'dashboard.php'; </script>";
} else{
echo "<script>alert('Invalid Details');</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Student Result Management System</title>
<link rel="stylesheet" href="css/bootstrap.min.css" media="screen" >
<link rel="stylesheet" href="css/font-awesome.min.css" media="screen" >
<link rel="stylesheet" href="css/animate-css/animate.min.css" media="screen" >
<link rel="stylesheet" href="css/prism/prism.css" media="screen" > <!-- USED FOR DEMO HELP - YOU CAN REMOVE IT -->
<link rel="stylesheet" href="css/main.css" media="screen" >
<script src="js/modernizr/modernizr.min.js"></script>
</head>
<body class="">
<div class="main-wrapper">
<div class="">
<div class="row">
<h1 align="center">Student Result Management System</h1>
<div class="col-lg-6 visible-lg-block">
<section class="section">
<div class="row mt-40">
<div class="col-md-10 col-md-offset-1 pt-50">
<div class="row mt-30 ">
<div class="col-md-11">
<div class="panel">
<div class="panel-heading">
<div class="panel-title text-center">
<h4>For Students</h4>
</div>
</div>
<div class="panel-body p-20">
<div class="section-title">
<p class="sub-title">Student Result Management System</p>
</div>
<form class="form-horizontal" method="post">
<div class="form-group">
<label for="inputEmail3" class="col-sm-6 control-label">Search your result</label>
<div class="col-sm-6">
<a href="find-result.php">click here</a>
</div>
</div>
</form>
</div>
</div>
<!-- /.panel -->
</div>
<!-- /.col-md-11 -->
</div>
<!-- /.row -->
</div>
<!-- /.col-md-12 -->
</div>
<!-- /.row -->
</section>
</div>
<div class="col-lg-6">
<section class="section">
<div class="row mt-40">
<div class="col-md-10 col-md-offset-1 pt-50">
<div class="row mt-30 ">
<div class="col-md-11">
<div class="panel">
<div class="panel-heading">
<div class="panel-title text-center">
<h4>Admin Login</h4>
</div>
</div>
<div class="panel-body p-20">
<div class="section-title">
<p class="sub-title">Student Result Management System</p>
</div>
<form class="form-horizontal" method="post">
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">Username</label>
<div class="col-sm-10">
<input type="text" name="username" class="form-control" id="inputEmail3" placeholder="UserName">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">Password</label>
<div class="col-sm-10">
<input type="password" name="password" class="form-control" id="inputPassword3" placeholder="Password">
</div>
</div>
<div class="form-group mt-20">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" name="login" class="btn btn-success btn-labeled pull-right">Sign in<span class="btn-label btn-label-right"><i class="fa fa-check"></i></span></button>
</div>
</div>
</form>
</div>
</div>
<!-- /.panel -->
<p class="text-muted text-center"><small>Copyright © 2020 SRMS </a></small> </p>
</div>
<!-- /.col-md-11 -->
</div>
<!-- /.row -->
</div>
<!-- /.col-md-12 -->
</div>
<!-- /.row -->
</section>
</div>
<!-- /.col-md-6 -->
</div>
<!-- /.row -->
</div>
<!-- /. -->
</div>
<!-- /.main-wrapper -->
<!-- ========== COMMON JS FILES ========== -->
<script src="js/jquery/jquery-2.2.4.min.js"></script>
<script src="js/jquery-ui/jquery-ui.min.js"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<script src="js/pace/pace.min.js"></script>
<script src="js/lobipanel/lobipanel.min.js"></script>
<script src="js/iscroll/iscroll.js"></script>
<!-- ========== PAGE JS FILES ========== -->
<!-- ========== THEME JS ========== -->
<script src="js/main.js"></script>
<script>
$(function(){
});
</script>
<!-- ========== ADD custom.js FILE BELOW WITH YOUR CHANGES ========== -->
</body>
</html>