-
Notifications
You must be signed in to change notification settings - Fork 80
/
index.php
145 lines (128 loc) · 4.75 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
<?php
if(isset($_SESSION['test_ongoing']))
header("Location: files/quiz.php");
?>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="iamrohitsuthar,Iamrohitsuthar,i am rohit suthar,Hi i am rohit suthar,Hi iamrohitsuthar,i am Rohit Suthar,I am RohitSuthar,mrrohitsuthar,rohit suthar,RohitSuthar,Rohit Suthar,rohitsuthar website,rohit suthar website,programmer,amravati,rohitsuthar,rohit suthar blog,Rohit Suthar,Rohit,Suthar,Rohit Karma,Suthar Rohit,iamrohitsuthar blog,iamrohitsuthar twitter,iamrohitsuthar instagram,iamrohitsuthar stackoverflow,iamrohitsuthar github,iamrohitsuthar linkedin,iamrohitsuthar website">
<title>Quizller</title>
<link rel="icon" type="image/png" href="admin/assets/img/favicon.png">
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/header.css">
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="vendor/animate/animate.css">
<link rel="stylesheet" type="text/css" href="vendor/css-hamburgers/hamburgers.min.css">
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<script src="vendor/jquery/jquery-3.2.1.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="vendor/tilt/tilt.jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@beta/dist/js.cookie.min.js"></script>
</head>
<body>
<!-- Header -->
<header class="header1">
<!-- Header desktop -->
<div class="container-menu-header">
<div class="wrap_header">
<!-- Logo -->
<a href="index.php" class="logo">
<img src="images/icons/logo.png" alt="IMG-LOGO">
</a>
<!-- Header Icon -->
</div>
</div>
<!-- Header Mobile -->
<div class="wrap_header_mobile">
<!-- Logo moblie -->
<a href="index.php" class="logo-mobile">
<img src="images/icons/logo.png" alt="IMG-LOGO">
</a>
</div>
</div>
</header>
<section>
<div class="limiter">
<div class="container-login100">
<div class="wrap-login100">
<div class="login100-pic js-tilt" data-tilt>
<img src="images/img-01.png" alt="IMG">
</div>
<div class="login100-form validate-form">
<span class="login100-form-title">
Student Login
</span>
<div class="wrap-input100 validate-input">
<input class="input100" id="studentRollNumber" type="text" name="rollNumber"
placeholder="Roll Number" required>
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-user-circle-o" aria-hidden="true"></i>
</span>
<span class="error text-danger" id="empty_roll_number_field"></span>
</div>
<div class="wrap-input100 validate-input">
<input class="input100" id="studentPassword" type="password" name="password"
placeholder="Password" required>
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-lock" aria-hidden="true"></i>
</span>
<span class="error text-danger" id="empty_roll_password_field"></span>
</div>
<div class="container-login100-form-btn">
<button class="login100-form-btn" onclick="login()">
Login
</button>
</div>
<div class="text-center p-t-136">
</div>
</div>
</div>
</div>
</div>
</section>
<script>
$(document).ready(function () {
if (Cookies.get('last_question_was_answered') != undefined) {
Cookies.remove('last_question_was_answered');
Cookies.remove('last_question');
}
if (Cookies.get('test_submitted_status') != undefined)
Cookies.remove('test_submitted_status');
});
$('.js-tilt').tilt({
scale: 1.1
})
function login() {
var someFieldIsEmpty = false;
if (!$('#studentRollNumber').val()) {
someFieldIsEmpty = true;
$('#empty_roll_number_field').val("Please enter your roll number");
}
if (!$('#studentPassword').val()) {
someFieldIsEmpty = true;
$('#empty_roll_passsword_field').val("Please enter your password");
}
if (!someFieldIsEmpty) {
$.ajax({
type: 'POST',
url: 'files/student_login.php',
data: {
'rollNumber': $('#studentRollNumber').val(),
'password': $('#studentPassword').val(),
},
success: function (response) {
if(response == "STUDENT_RECORD_NOT_FOUND")
alert("Wrong Credentails entered");
else
window.location.replace("files/dashboard.php");
}
});
}
}
</script>
</body>
</html>