<?php
/******************************************************************************
************** Simple SMS Site Software *********************************
************** SSSSv1.0*****************************************************
************** by (aq) limited http://aql.com *******************************
************** All Rights Reserved ******************************************
************** Please read COPYRIGHT file prior to modification********
********************************************************************************/
session_start();
$user = $_SESSION['user'];
$pass = $_SESSION['pass'];
include("inc/header.inc.php");
include("inc/dbinfo.inc.php");
if ($access == "forbidden") {
include("inc/restricted.inc.php");
}
elseif ($access == "locked") {
include("inc/restricted.inc.php");
}
elseif ($access == "guest") {
include("inc/restricted.inc.php");
}
else {
$query = "SELECT * FROM users WHERE username = '$user' AND password = '$pass'";
$result = mysql_query($query);
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysql_fetch_row($result);
?>
<form method="POST" name="edit_form" action="do_change_details.php">
<tr>
<td width="50%">
<h1>Edit Details</h1>
<input type="hidden" name="theUser" value="<?echo $user?>">
<h2>Address</h2>
<input name="add1" size="20" value="<?echo $row[4];?>"><br>
<input name="add2" size="20" value="<?echo $row[5];?>"><br>
<input name="add3" size="20" value="<?echo $row[6];?>"><br>
<input name="postcode" size="10" value="<?echo $row[7];?>">
<h2>Name</h2>
<input name="name" size="20" value="<?echo $row[2];?>">
</td>
<td width="50%">
<h2>Email</h2>
<input name="email" size="20" value="<?echo $row[8];?>">
<h2>Mobile</h2>
<input name="mobile" size="20" value="<?echo $row[9];?>">
<h2>Landline</h2>
<input name="landline" size="20" value="<?echo $row[10];?>">
</td>
</tr>
</table>
<table>
<tr>
<td>
<h2>Extra notes</h2>
<textarea name="theNotes" class="notesbox" rows="6" cols="50"><?echo $row[3];?></textarea>
<br>
<input type="submit" value="Submit" name="B1">
</td>
</tr>
</form>
<?
}
include("inc/footer.inc.php");
?>