-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.php
48 lines (46 loc) · 1.24 KB
/
settings.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
<?php
include('lock.php');
$msgpass='';
if(isset($_REQUEST['msgpass']))
$msgpass=$_REQUEST['msgpass'];
$result=mysql_query("SELECT * FROM `users` WHERE `email`='$login_session'");
$noofrows=mysql_num_rows($result);
if($noofrows==1)
{
$row=mysql_fetch_array($result);
$code=$row['salt'];
$currentpassword=$row['password'];
}
mysql_free_result($result);
?>
<html>
<head>
<title>SnapHeap</title>
</head>
<body>
<div>
<table width="100%">
<tr>
<td>
<a href="index.php"><h3><i>SnapHeap</i></h3></a>
</td>
<td align="right">
Welcome <?php echo $login_session; ?> | <a href="dashboard.php">Dashboard</a> | <a href="settings.php">Settings</a> | <a href="logout.php">Logout</a>
</td>
</tr>
</table>
</div>
<hr/>
<?php echo $msgpass.'<br/>'; ?>
<h3><i>Change password</i></h3>
<form action="resetpass.php" method="post">
<input type="hidden" id="code" name="code" value="<?php echo $code; ?>" />
Current Password:<input type="password" id="otp" name="otp" value="" /><br/>
<input type="hidden" id="email" name="email" value="<?php echo $login_session; ?>" />
New password:<input type="password" id="pass" name="pass" /><br/>
Confirm password:<input type="password" id="cpass" name="cpass" /><br/>
<input type="submit" value="Reset password" />
</form>
<hr/>
</body>
</html>