-
Notifications
You must be signed in to change notification settings - Fork 0
/
Change Password.php
160 lines (153 loc) · 5.36 KB
/
Change Password.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
<html>
<head>
<title>Forget password</title>
<link href="css/style.css" type="text/css" rel="stylesheet">
<link href="css/menu.css" type="text/css" rel="stylesheet">
<style type="text/css">
td.margin{
margin-right:100px;
}
</style>
<Script type="text/Javascript">
function validation()
{
var p1=document.getElementById("pd").value;
if( p1=="" )
{
alert(" Password can not be Blank");
return false;
}
var p2=document.getElementById("cpd").value;
if( p2=="")
{
alert(" Confirm Password can not be Blank");
return false;
}
if(p1!=p2)
{
alert("Password and Confirm Password should match.");
return false;
}
}
</Script>
</head>
<body>
<?php
session_start();
?>
<center>
<div id="top-fixed">
<div id="nav">
<ul>
<li><a href="PlanYourTrip/Hotel.php">PLAN YOUR TRIP</a></li>
<li class="dropdown">
<a href="#" class="dropbtn">EXPLORE</a>
<div class="dropdown-content">
<a href="Explore/Attractions.php">Attractions</a>
<a href="Explore/Beaches.php">Beaches</a>
<a href="Explore/Hills.php">Hills</a>
<a href="Explore/shopping.php">Shopping</a>
<a href="Explore/Sports.php">Sports</a>
</div>
</li>
<li><a href="Events/January.php">EVENTS</a></li>
<li><a href="Gallery.php">GALLERY</a></li>
<li><a href="About.php">ABOUT</a></li>
<li><a href="Contact.php">CONTACT</a></li>
</ul>
</div>
<?php
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true)
{
include("Connection.php");
$uid=$_SESSION["uid"];
$sql="select * from user_details where User_ID='$uid'";
$result=mysql_query($sql);
if($result == FALSE) {
die(mysql_error()); // TODO: better error handling
}
while($row=mysql_fetch_array($result))
{ ?>
<div id="user">
<?php echo "Welcome, $row[First_Name] "." $row[Last_Name] <br>";
echo '<a href="Welcome.php">My Profile</a><a> | </a>
<a href="Logout.php">Log out</a>'; ?>
</div>
<?php
}
}
else{
?>
<div id="user">
<a href="Login.php">LOGIN</a><a> | </a>
<a href="SignUp.php">SIGN UP</a>
</div>
<?php
}
?>
</div>
<div id="wrapper">
<div id="header">
<div id="header-logo"></div>
<div id="header-title" align="left">
<a class="title" href="Home.php"><h1>LA  ARGENTINE  TURISMO</h1></a>
</div>
</div>
<?php
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true)
{
include("Connection.php");
$uid=$_SESSION["uid"];
$sql="select * from user_details where User_ID='$uid'";
$result=mysql_query($sql);
if($result == FALSE) {
die(mysql_error()); // TODO: better error handling
}
?>
<div id="content-heading"><b><u>Change password</u></b></div>
<div id="contents">
<form name="relogin" action ="OperateChangePassword.php" onSubmit="return validation()" method="post">
<table>
<tr>
<td class="margin">                <input type="password" name="pwd" id="pd" placeholder="New Password"></td>
</tr>
<tr>
<td class="margin">                <input type="password" name="cpwd" id="cpd" placeholder="Confirm Password"></td>
</tr>
<tr>
<td><input class="btn" type="submit" value="Confirm"><input class="btn" type="reset" value="Cancel"></td>
</tr>
<tr>
<td class="link" >        <a href="Home.php">Back to Home</a></td>
</tr>
</table>
</form>
</div>
<?php
}
else{?>
<div id="contents"><p><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><b class="inner-heading">Please  <a href="Login.php"> Login </a>  to continue</b></p></div>
<?php }?>
<div id="footer">
<div id="footer1">
<a href="Home.php">Home</a><a> | </a>
<a href="PlanYourTrip/Hotel.php">Plan Your Trip</a><a> | </a>
<a href="Explore/Attractions.php">Explore</a><a> | </a>
<a href="Events/January.php">Events</a><a> | </a>
<a href="Gallery.php">Gallery</a><a> | </a>
<a href="About.php">About Us</a><a> | </a>
<a href="Contact.php">Contact Us</a>
</div>
<div id="footer2">
<a href="Others/TermsConditions.php">Terms & Conditions</a><a> | </a>
<a href="Others/Feedback.php">Feedback</a><a> | </a>
<a href="Others/Faq.php">FAQ</a><a> | </a>
<a href="Others/Links.php">Useful Links</a><a> | </a>
<a href="Others/Site.php">Site Map</a>
</div>
<p>© 2016 Argentina Tourism Board. All rights reserved. | Developed by Webtek Students.</p>
</div>
</div>
</center>
</body>
</html>