<?php
$message = NULL;
session_save_path("/home/users/web/b557/sl.flyingcoachlimo/public_html/cgi-bin/tmp");
session_start();
if (!isset($_SESSION["verified"])) {
header ("Location: index.php");
exit();
}
// Connect to the database
include("incDBConnectAdmin.php");
// Determine if the user had submitted new data and update the database
if (isset($_POST['submit'])) {
$newpass = $_POST["newpass"];
$newpass2 = $_POST["newpass2"];
if ($newpass == $newpass2) {
// Change password and commit to database
$query = "UPDATE logininfo SET ePassword='" . $newpass . "'";
mysql_query($query);
$message = "New password saved";
}
else {
$message = "Passwords did not match - Please re-enter";
};
}
?>
<link rel="stylesheet" href="../stylesheet.css" type="text/css" />
<table align="center" border="0" width="350">
<tr valign="top" height="25">
<td>
<h1>
www.LetUsDesign.it - Edit.it CMS v1.0.7
</h1>
<p>
Please note that upon submission, all changes you make are final and will be committed to the database immediately. All changes and edits made are final and can not be reverted.<br/><br/>
</p>
</td>
</tr>
<tr valign="top" height="25">
<td>
<font color="red"><?php echo $message; ?></font>
<form method="post" action="changepass.php">
<div>
New Password: <input type="text" name="newpass" /><br/>
Conf. Password: <input type="text" name="newpass2" /><br/>
<input type="submit" name="submit" value="Submit" />
</div>
</form>
</td>
</tr>
<tr>
<td>
<a href="main.php">Go Back To Main Menu</a>
<br/><br/>
<a href="logout.php">Logout of Page Editor</a>
</td>
</tr>
</table>
</body>
</html>