-
Notifications
You must be signed in to change notification settings - Fork 0
/
forgot1.php
93 lines (79 loc) · 2.06 KB
/
forgot1.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
<?php include("header.php");
if($_SERVER['REQUEST_METHOD']=="POST")
{
$sql="select * from soe_fgp where code like '".md5($_POST['code'])."'";
//die($sql);
$rs=mysql_query($sql) or die(mysql_error());
if(mysql_num_rows($rs)>0)
{
$row=mysql_fetch_array($rs);
$email=$row['email'];
$_SESSION['ems']=$email;
mysql_query("delete from soe_fgp where code like '".md5($_POST['code'])."'") or die(mysql_error());
?>
<script>
location.href='forgot.php';
</script>
<?php
die();
}
else
{
$msg='Verification Code Invalid!';
}
}
?>
<?php
if($msg!='')
{
?>
<script type="text/javascript">
$().ready(function()
{
$("#object").animate({
top: "0px"
}, 2000 ).fadeOut(11111);
});
</script>
<div id="object" class="message_box">
<span class="err"><?php echo $msg; ?></span></div>
<?php
}
?>
<script type="text/javascript">
$(document).ready(function() {
$("#fgp").validate({
rules: {
code: "required"
},
messages: {
code: "<br/>Please enter verification code."
}
});
$("#savebtn").click(function() {
$('#fgp').submit();
});
});
</script>
<?php include("left.php"); ?>
<div id="content_area_mid">
<div><h2>Reset Password</h2></div>
<form action="" method="post" name="fgp" id="fgp">
<div class="border2">
<div class="hei"> </div>
<div class="search_lable_innerpage">Reset Code</div>
<div class="search_txtbox_innerpage">: <input name="code" type="text" class="txt_box1" size="35" id="code">
</div>
<div class="clear"></div>
<div></div>
<div class="search_lable_innerpage"></div>
<div class="search_txtbox_innerpage"><a id='savebtn'><img src="images/blue_submit_button.jpg" alt="" width="78" height="35"></a><a href="#" onClick="javascript: document.fgp.reset();"><img src="images/clear_buton.jpg" alt=""></a></div>
<div class="clear"></div>
</div>
</form>
</div>
<div id="content_area_right"><?php echo showbanners("right"); ?></div>
<div class="clear"></div>
<!-- Content Area End -->
<div class="hei"> </div>
<?php include("left.php"); ?>