-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
197 lines (138 loc) · 4.16 KB
/
index.html
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
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>My Login Page — Car Parking System</title>
<link rel="stylesheet" type="text/css" href="b.css">
<link rel="stylesheet" type="text/css" href="my-login.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" >
<style type="text/css">
.logo{
padding: 0.01em 14px;
font-family: fontawesome;
text-decoration: none;
line-height: 1;
font-size: 36px;
letter-spacing: 3px;
color: #555555;
display: block;
top: 14px;
}
.logo .green{
color: #4CAF50;
}
.sub-logo{
width: 100%;
font-size: 10px;
text-align: center;
float: right!important;
letter-spacing: 4px;
display: block;
}
</style>
</head>
<body class="my-login-page">
<section class="h-100 " >
<div class="container" style="display: flex;justify-content: space-around; ">
<div class="row justify-content-md-center h-100">
<div class="card-wrapper">
<a class="logo mt-4 text-center">Online <span class="green">Parking Reservation </span>System</a>
<div class="sub-logo mb-4" style="font-family:'Segoe UI',Arial,sans-serif">Super Market</div>
<div class="card fat">
<div class="card-body">
<h4 class="card-title">Login</h4>
<form >
<div class="form-group">
<label for="NIC">NIC Number</label>
<input id="NIC" type="text" class="form-control" name="NIC" value="" required autofocus>
</div>
<div class="form-group">
<label for="password">Password
<a href="forgot.html" class="float-right">
Forgot Password?
</a>
</label>
<input id="password" type="password" class="form-control" name="password" required data-eye>
</div>
<div class="form-group">
<label>
<input type="checkbox" name="remember"> Remember Me
</label>
</div>
<div class="form-group no-margin">
<button id="reg" type="submit" class="btn btn-primary btn-block">
Login
</button>
</div>
<div class="margin-top20 text-center">
Don't have an account? <a href="register.html">Register Now</a>
</div>
</form>
</div>
</div>
<div class="footer">
Parking Reservation System
</div>
</div>
</div>
</div>
</section>
<script src="jq.js"></script>
<script src="b.js"></script>
<script src="my-login.js"></script>
<script>
$(function() {
/* "return validation()" */
$('form').on('submit', function (e) {
e.preventDefault();
$.ajax({
dataType: 'json',
cache: false,
type:'POST',
beforeSend: function(){
loading(true);
},
url:'Verify_Login.php',
data: $('form').serialize(),
success:function(data){
/*alert(data);*/
console.log(data);
if(data.errno){
alert("Sorry ! Database Connection Error ! .");
}else if(data.isvalid=="valid"){
console.log(data.url);
window.location.href = data.url;
/* window.location.href = "Manage Slot.php";*/
}else{
alert("Your Login NIC or Password is invalid");
}
} , error: function(xhr,stat , error){
alert("An error occured: " + xhr.status + " " + error);
}
,
complete: function(){
loading(false);
}
});
});
});
function loading(b){
if (b==true){
$("#reg").prop('disabled', true);
$('.form-control').prop('disabled', true);
$("#reg").html("<i class='fa fa-circle-o-notch fa-spin'></i>Checking Data..");
/* setTimeout(function() {
$("#reg").prop('disabled', false);
$('.form-control').prop('disabled', false);
$("#reg").html("Register");
}, 15000);*/
}else{
$("#reg").prop('disabled', false);
$('.form-control').prop('disabled', false);
$("#reg").html("Login");
}
}
</script>
</body>
</html>