<?php
$page_title = 'Edit User';
include('includes/header.php');
$id = $_GET['i'];
include('edit-user-content.php');
include('edit-user-post.php');
?>

<!-- <div id="listing"> -->
	<h1>Edit User</h1>
	<p class="orangeText"><strong>Please complete the following form to edit a user.</strong>.</p>
	<p class="orangeText"><strong>Fields marked with an * are required!</strong></p>
	<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post" id="postForm"  enctype="multipart/form-data" >
	<?php
		if ($strValidation != "")
		{
			echo '<div class="error">'.$strValidation.'</div>';			
		}
	?>
		<label for="fName">First Name *</label>
		<input type="text" name="fName" value="<?php if ($fName != "") echo $fName; else echo $strFirstName; ?>" title="Enter the First Name" required id="fName">
		<label for="lName">Last Name *</label>
		<input type="text" name="lName" value="<?php if ($lName != "") echo $lName; else echo $strLastName; ?>" title="Enter the Last Name" required id="lName">
		<!-- <label for="uName">User Name *</label>
		<input type="text" name="uName" value="<?php //if ($uName != "") echo $uName; else echo $strUsername; ?>" title="Enter the User Name" required id="uName"> -->
		<label for="emailA">Email Address (this is the username) *</label>
		<input type="text" name="emailA" value="<?php if ($emailA != "") echo $emailA; else echo $strEmailAddress; ?>" title="Enter the Email Address" required id="emailA">
		<label for="pswd1">Password (enter a new password if you want to change it)</label>
		<input type="password" name="pswd1" value="" title="Enter the password (4 - 20 characters)"  id="pswd1">
		<label for="pswd2">Confirm Password (enter a new password if you want to change it)</label>
		<input type="password" name="pswd2" value="" title="Re-enter the password." id="pswd2" >
		<label for="security">Please select a security level *</label>
		<select name="security" title="Choose the access level" id="security">
			<option <?php if ($intSecurityLevel == 0) echo 'selected="selected"' ?> value="0">Please select a security level</option>
			<option <?php if ($intSecurityLevel == 25) echo 'selected="selected"' ?> value="25">Standard User</option>
			<option <?php if ($intSecurityLevel == 50) echo 'selected="selected"' ?> value="50">Administrator</option>
		</select>

		<input type="submit" class="buttonsLINK"  name="editUser" value="Update" title="Click here to save your changes." />
		<a class="buttonsLINK" href="user-listing.php" title="Click here to cancel this edit.">Cancel </a>

	</form>
<!-- </div> -->
<?php
	include('includes/footer.php');
?>
