-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp_index.php
executable file
·422 lines (346 loc) · 15.1 KB
/
app_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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
<?php require_once("includes/session.php");?>
<?php require_once("includes/db_connection.php");?>
<?php require_once("includes/functions.php");?>
<?php require_once("includes/validation_functions.php"); ?>
<?php
if (logged_in()) {
redirect_to ("public/Inside/buzz.php");
}
?>
<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<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">
<meta name="description" content="Login or Signup on Cambuzz. Buzz new events, Track your teacher or ask a question.">
<meta name="keywords" content="Buzz, Events, Cambuzz, Track, Teacher, Question, Campus, Centralized information system">
<meta name="author" content="Team Cambuzz">
<title>Cambuzz</title>
<!-- Favicon -->
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- Custom Fonts -->
<link href='http://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<!-- Animate CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.4.0/animate.min.css" type="text/css">
<!-- Custom CSS -->
<link rel="stylesheet" href="css/creative.css" type="text/css">
<link rel="stylesheet" src="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css" />
<link rel="stylesheet" type="text/css" href="css/backgroundmun.css" />
<link rel="stylesheet" type="text/css" href="css/buttoncreatebuzz.css">
</head>
<body id="page-top">
<?php include_once("public/Inside/analyticstracking.php") ?>
<ul class="cb-slideshow">
<li><span>Image 01</span>
</li>
</ul>
<nav id="mainNav" class="navbar navbar-default navbar-fixed-top navbar-inverse" style="background-color: rgba(0,0,0,0.6); border-color: rgba(0,0,0,0) !important; ">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand page-scroll" href="#page-top"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right" style="font-family: 'Montserrat', sans-serif;">
<li>
<a class="page-scroll" href="aboutus/index.php">About</a>
</li>
<li>
<a href="aboutus/index.php#contact">Contact Us</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<header>
<div class="header-content">
<div class="header-content-inner">
<div class="heading-text animated fadeInUp">cambu<span class="animated tada">zz</span></div>
</div>
</div>
<div class="mockup-content">
<div class="morph-button morph-button-modal morph-button-modal-2 morph-button-fixed login">
<button type="button" style="background-color: white;">Login</button>
<div class="morph-content" style="background-color: white;">
<div>
<div class="content-style-form content-style-form-1" id="logindiv1">
<span id="closelogin" class="icon icon-close">Close the dialog</span>
<h2>Login</h2>
<form class="loginform">
<p>
<label>Registration Number</label>
<input type="text" class="regno" required name="username" value="" />
</p>
<p>
<label>Password</label>
<input type="password" class="passwor" required name="password" value="" />
</p>
<div id="tempdiv"><p><a href="#" id="loginatag">Forgot Password</a></p></div>
<p>
<input type="submit" class="btn btn-danger" name="submit" value="Login" style="text-align: center;">
</p>
</form>
</div>
<div class="content-style-form content-style-form-1" id="logindiv2" style="display:none;">
<span id="closeforgot" class="icon icon-close">Close the dialog</span>
<h2 style="font-size:25px;">Forgot Password?</h2>
<form id="loginform1">
<p>
<label>Registration Number</label>
<input type="text" id="regno1" required name="username" value="" />
</p>
<!-- <p>
<label>Password</label>
<input type="password" class="passwor" required name="password" value="" />
</p>
<div id="tempdiv"></div>-->
<p>
<div id="tempdiv1"><p><a href="#" id="loginatag1">Go Back</a></p></div>
<div id="tempdiv2"></div>
</p>
<p>
<input type="submit" class="btn btn-danger" name="submit" value="Change Password" style="text-align: center;">
</p>
</form>
</div>
</div>
</div>
</div>
<!-- Sign Up Button -->
<!-- morph-button -->
</div>
</header>
<script src="js/modernizr.custom.js"></script>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/classie/1.0.1/classie.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="js/uiMorphingButton_fixed.js"></script>
<script>
(function() {
var docElem = window.document.documentElement,
didScroll, scrollPosition;
// trick to prevent scrolling when opening/closing button
function noScrollFn() {
window.scrollTo(scrollPosition ? scrollPosition.x : 0, scrollPosition ? scrollPosition.y : 0);
}
function noScroll() {
window.removeEventListener('scroll', scrollHandler);
window.addEventListener('scroll', noScrollFn);
}
function scrollFn() {
window.addEventListener('scroll', scrollHandler);
}
function canScroll() {
window.removeEventListener('scroll', noScrollFn);
scrollFn();
}
function scrollHandler()
{
if (!didScroll) {
didScroll = true;
setTimeout(function() {
scrollPage();
}, 60);
}
};
function scrollPage()
{
scrollPosition = {
x: window.pageXOffset || docElem.scrollLeft,
y: window.pageYOffset || docElem.scrollTop
};
didScroll = false;
};
scrollFn();
[].slice.call(document.querySelectorAll('.login')).forEach(function(bttn) {
new UIMorphingButton(bttn, {
closeEl: '.icon-close',
onBeforeOpen: function() {
// don't allow to scroll
noScroll();
},
onAfterOpen: function() {
// can scroll again
canScroll();
},
onBeforeClose: function() {
// don't allow to scroll
noScroll();
},
onAfterClose: function() {
// can scroll again
canScroll();
}
});
});
// for demo purposes only
[].slice.call(document.querySelectorAll('form button')).forEach(function(bttn) {
bttn.addEventListener('click', function(ev) {
ev.preventDefault();
});
});
})();
</script>
<script>
(function() {
var docElem = window.document.documentElement,
didScroll, scrollPosition;
// trick to prevent scrolling when opening/closing button
function noScrollFn() {
window.scrollTo(scrollPosition ? scrollPosition.x : 0, scrollPosition ? scrollPosition.y : 0);
}
function noScroll() {
window.removeEventListener('scroll', scrollHandler);
window.addEventListener('scroll', noScrollFn);
}
function scrollFn() {
window.addEventListener('scroll', scrollHandler);
}
function canScroll() {
window.removeEventListener('scroll', noScrollFn);
scrollFn();
}
function scrollHandler() {
if (!didScroll) {
didScroll = true;
setTimeout(function() {
scrollPage();
}, 60);
}
};
function scrollPage() {
scrollPosition = {
x: window.pageXOffset || docElem.scrollLeft,
y: window.pageYOffset || docElem.scrollTop
};
didScroll = false;
};
scrollFn();
var el = document.querySelector('.signup');
new UIMorphingButton(el, {
closeEl: '.icon-close',
onBeforeOpen: function() {
// don't allow to scroll
noScroll();
},
onAfterOpen: function() {
// can scroll again
canScroll();
// add class "noscroll" to body
classie.addClass(document.body, 'noscroll');
// add scroll class to main el
classie.addClass(el, 'scroll');
},
onBeforeClose: function() {
// remove class "noscroll" to body
classie.removeClass(document.body, 'noscroll');
// remove scroll class from main el
classie.removeClass(el, 'scroll');
// don't allow to scroll
noScroll();
},
onAfterClose: function() {
// can scroll again
canScroll();
}
});
})();
</script>
<script type="text/javascript">
$(function() {
$("#txtConfirmPassword").keyup(function() {
var password = $("#txtNewPassword").val();
$("#divCheckPasswordMatch").html(password == $(this).val() ? "Passwords match." : "Passwords do not match!");
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$('.loginform').on('submit',function()
{
var registration_no_login=$(".regno").val();
var password_login=$(".passwor").val();
var msg;
$.ajax({
method: "POST",
url: "login_verify_app.php",
data: { username:registration_no_login,password:password_login }
})
.done(function( msg ) {
if(msg!="loggedin")
{
$('#tempdiv').html(msg);
}
hello(msg);
});
return false;
});
$('#loginform1').on('submit',function()
{
var registration_no_login=$("#regno1").val();
var msg;
$.ajax({
method: "POST",
url: "forgotpassword.php",
data: {username:registration_no_login}
})
.done(function( msg ) {
if(msg=="Registration Number Not Found")
{
$('#tempdiv2').html(msg);
}
else if(msg=="Account is not confirmed")
{
$('#tempdiv2').html(msg);
}
else
{
$('#tempdiv2').html(msg);
}
});
return false;
});
$('#loginatag').click(function()
{
$("#logindiv1").hide();
$("#logindiv2").show();
});
$('#loginatag1').click(function()
{
$("#logindiv2").hide();
$("#logindiv1").show();
});
$('#closeforgot').click(function()
{
$("#closelogin").click();
});
function hello(msg)
{
if(msg=="loggedin")
{
window.location.href="json_app.php";
}
}
});
</script>
</body>
</html>
<?php
if (isset ($conn)){
mysqli_close($conn);
}
?>