-
Notifications
You must be signed in to change notification settings - Fork 0
/
student_recover_password_step2.php
292 lines (224 loc) · 9.71 KB
/
student_recover_password_step2.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
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8"/>
<title>ResearchIntern - Enabling Research Collaborations</title>
<!--[if lt IE 9]>
<script src="js/css3-mediaqueries.js"></script>
<![endif]-->
<link rel="stylesheet" media="all" href="css/style.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!-- Adding "maximum-scale=1" fixes the Mobile Safari auto-zoom bug: http://filamentgroup.com/examples/iosScaleBug/ -->
<!-- JS -->
<script src="js/jquery-1.6.4.min.js"></script>
<!-- <script src="js/less-grid-4.js"></script> -->
<script src="js/custom.js"></script>
<script src="js/tabs.js"></script>
<script src="js/moveform.js"></script>
<!-- Masonry -->
<script src="js/masonry.min.js" ></script>
<script src="js/imagesloaded.js" ></script>
<!-- ENDS Masonry -->
<!-- Tweet -->
<link rel="stylesheet" href="css/jquery.tweet.css" media="all" />
<script src="js/tweet/jquery.tweet.js" ></script>
<!-- ENDS Tweet -->
<!-- superfish -->
<link rel="stylesheet" media="screen" href="css/superfish.css" />
<script src="js/superfish-1.4.8/js/hoverIntent.js"></script>
<script src="js/superfish-1.4.8/js/superfish.js"></script>
<script src="js/superfish-1.4.8/js/supersubs.js"></script>
<!-- ENDS superfish -->
<!-- prettyPhoto -->
<script src="js/prettyPhoto/js/jquery.prettyPhoto.js"></script>
<link rel="stylesheet" href="js/prettyPhoto/css/prettyPhoto.css" media="screen" />
<!-- ENDS prettyPhoto -->
<!-- poshytip -->
<link rel="stylesheet" href="js/poshytip-1.1/src/tip-twitter/tip-twitter.css" />
<link rel="stylesheet" href="js/poshytip-1.1/src/tip-yellowsimple/tip-yellowsimple.css" />
<script src="js/poshytip-1.1/src/jquery.poshytip.min.js"></script>
<!-- ENDS poshytip -->
<!-- GOOGLE FONTS -->
<link href='http://fonts.googleapis.com/css?family=Allan:700' rel='stylesheet' type='text/css'>
<!-- Flex Slider -->
<link rel="stylesheet" href="css/flexslider.css" >
<script src="js/jquery.flexslider-min.js"></script>
<!-- ENDS Flex Slider -->
<!-- login -->
<link rel="stylesheet" type="text/css" href="css/login-style.css" />
<link rel="stylesheet" type="text/css" href="css/login-animate-custom.css" />
<!--[if IE 6]>
<link rel="stylesheet" href="css/ie6-hacks.css" media="screen" />
<script type="text/javascript" src="js/DD_belatedPNG.js"></script>
<script>
/* EXAMPLE */
DD_belatedPNG.fix('*');
</script>
<![endif]-->
<!-- Lessgrid -->
<link rel="stylesheet" media="all" href="css/lessgrid.css"/>
<!-- modernizr -->
<script src="js/modernizr.js"></script>
<script type="text/javascript">
function validateform(){
var username = document.firstform.username.value;
var pass = document.firstform.password.value;
//alert(username);
var UsernameRegex = /^[a-zA-Z\-.0-9]+$/;
var minNumberofChars = 6;
var maxNumberofChars = 16;
var passreqex = /^(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{6,16}$/;
var checkbox = document.getElementById("loginkeeping");
var msg = "";
if(username.match(UsernameRegex)){
//alert("correct");
if(pass.length < minNumberofChars || pass.length > maxNumberofChars){
alert("Password should be of min. 6 character and maximum of 16");
return false;
}
if(!passreqex.test(pass)) {
alert("password should contain atleast one special character");
return false;
}
return true;
else{
alert("Password do not match");
return false;
}
}
else{
msg="Username should only contain alphabets, number, . , -"
alert(msg);
}
return false;
}
</script>
</head>
<body lang="en">
<!-- mobile-nav -->
<div id="mobile-nav-holder">
<div class="wrapper">
<ul id="mobile-nav">
<li class="current-menu-item"><a href="index.php">HOME</a></li>
<li><a href="internships.php">INTERNSHIPS</a></li>
<li><a href="http://researchintern.net/blog/">BLOG</a></li>
<li><a href="how_it_works.php">HOW IT WORKS</a></li>
<li><a href="contact.php">CONTACT US</a></li>
<li><a href="researcher.php">RESEARCHER</a></li>
</ul>
<div id="nav-open"><a href="#">Menu</a></div>
</div>
</div>
<!-- ENDS mobile-nav -->
<header>
<div class="wrapper">
<a href="index.php" id="logo"><img src="img/logo.png" alt="Tandem"></a>
<nav>
<ul id="nav" class="sf-menu">
<li class="current-menu-item"><a href="index.php"><b>Home</b><span class="subheader">welcome</span></a></li>
<li><a href="internships.php"><b>Internships</b><span class="subheader">oppurtunities</span></a></li>
<li><a href="http://researchintern.net/blog/"><b>Blog</b><span class="subheader">read me</span></a></li>
<li><a href="how_it_works.php"><b>How it works</b><span class="subheader">know us better</span></a></li>
<li><a href="researcher.php"><b>Researcher »»</b><span class="subheader">the mentors</span></a></li>
</ul>
</nav>
<div class="clearfix"></div>
</div>
</header>
<!-- MAIN -->
<div id="main">
<!-- social -->
<div id="social-bar">
<ul>
<li><a href="http://www.facebook.com" title="Become a fan"><img src="img/social/facebook_32.png" alt="Facebook" /></a></li>
<li><a href="http://www.twitter.com" title="Follow my tweets"><img src="img/social/twitter_32.png" alt="Facebook" /></a></li>
<li><a href="http://www.google.com" title="Add to the circle"><img src="img/social/google_plus_32.png" alt="Facebook" /></a></li>
</ul>
</div>
<!-- ENDS social -->
<!-- Content -->
<div id="content">
<!-- masthead -->
<div id="masthead">
<span class="head"></span><span class="subhead"></span>
<ul class="breadcrumbs">
<li><a href="index.php">home</a></li>
<li>/ login-register</li>
</ul>
</div>
<!-- ENDS masthead -->
<!-- page content -->
<div id="page-content-full">
<br/>
<div id="container_demo" >
<?php
if(isset($_GET['msg'])){
$message= $_GET['msg'];
if($message==1){
echo "<span style='color:red' >
<b>Invalid username or password</b></span>";
}
else if($message==5){
echo "<span style='color:red' >
<b>Please Login to View and Apply</b></span>";
}
else if($message==3){
echo "<span style='color:red' >
<b>Password couldn't be updated. Please try again with valid username</b></span>";
}
}
?><br><br>
<!-- hidden anchor to stop jump http://www.css3create.com/Astuce-Empecher-le-scroll-avec-l-utilisation-de-target#wrap4 -->
<a class="hiddenanchor" id="toregister"></a>
<a class="hiddenanchor" id="tologin"></a>
<div id="wrapper">
<div id="login" class="animate form">
<?php
if(isset($_GET['id']))
{
$an=$_GET['id'];
//$_SESSION['id'];
?>
<form action="login.php?id=<?= $an ?>" autocomplete="on" method="post">
<?php
}
else {
?>
<form action="student_recover_password_db.php" autocomplete="on" method="post" name="firstform" >
<?php } ?>
<h1>Recover Password</h1>
<br/><br/>
<p>
<label for="username" class="uname" data-icon="u" > Enter your new password</label>
<input id="username" name="newpass" required="required" type="text" placeholder="eg. X8df!90EO"/>
</p>
<p>
<label for="password" class="youpasswd" data-icon="p"> Confirm Your password </label>
<input id="password" name="confirmpass" required="required" type="password" placeholder="eg. X8df!90EO" />
</p>
<p class="login button">
<input type="submit" value="Update"/>
</p>
</form>
</div>
</div>
<br/> <br/><br/><br/>
</div>
</div>
<br/> <br/><br/><br/><br/> <br/><br/>
</div>
<!-- ENDS page content -->
</div>
<!-- ENDS content -->
<div class="clearfix"></div>
<div class="shadow-main"></div>
</div>
<!-- ENDS MAIN -->
<?php
include("footer.php");
?>
</body>
</html>