<?php
	include("../utilities/UtilitiesManagers.php");
	include("../utilities/UtilitiesReporting.php");
	include("../utilities/UtilitiesClients.php");
	include("../utilities/UtilitiesEncryption.php");
	include("../include/session.php");
	global $database;
	date_default_timezone_set('America/New_York');
	
	$req_user = trim($_GET['uid']);
	
	
	
	
?>

<script type="text/javascript" src="js/jquery.itextclear.js"></script>
<script type="text/javascript" src="js/jquery.autocomplete.js"></script>
<script type="text/javascript" src="js/jquery.autogrowtextarea.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $('input[type=text], input[type=password], input[type=url], input[type=email], input[type=number]', '.form').iTextClear();
	
	$("#form-children").autoGrow();
	$("#form-noteshistory").autoGrow();
});
</script>
	<?php
		if(isset($recID)){
	?>
	<h1 class="page-title">Client Record: <?php echo $name; ?></h1>	
	<?php
		}else{
	?>
	<h1 class="page-title">Account: <?php echo $session->userinfo['name'];?></h1>
	<?php	}	?>
	<div class="container_12 clearfix leading">
		<div class="grid_12">
			

			<form class="form has-validation" method="POST" action="process.php">
	
				
				<div class="clearfix">
					<h4>My Account Information</h4>
				</div>
		   
			
				<div class="clearfix">

					<label for="form-usersname" class="form-label">Name:</label>

					<div class="form-input">
					
					<input class="left" id="form-usersname" type="text" name="name" maxlength="50" value="<?php
						if($form->value("name") == ""){
							echo $session->userinfo['name'];
						}else{
							echo $form->value("name");
						}
						?>">
					</div>
				</div>
			
				<div class="clearfix">

					<label for="form-currentpass" class="form-label">Current Password:</label>

					<div class="form-input">
					
					<input id="form-currentpass" type="password" name="curpass" maxlength="30" value="<?php echo $form->value("curpass"); ?>">
						<?php echo $form->error("curpass"); ?>
					</div>
				</div>
			
				<div class="clearfix">

					<label for="form-newpass" class="form-label">New Password:</label>

					<div class="form-input">
					
					<input id="form-newpass" class="left" type="password" name="newpass" maxlength="30" value="<?php echo $form->value("newpass"); ?>">
						<?php echo $form->error("newpass"); ?>
					</div>
				</div>
				
				
				<div class="clearfix">

					<label for="form-newpass" class="form-label">Email Address:</label>

					<div class="form-input">
					
					<input class="left" type="text" name="email" maxlength="50" value="<?php
					if($form->value("email") == ""){
						echo $session->userinfo['email'];
					}else{
						echo $form->value("email");
					}
					?>">
					<?php echo $form->error("email"); ?>
					</div>
				</div>
			
			


		
		
					   
						<div class="form-action clearfix">
							<input type="hidden" name="subedit" value="1">
							<input type="hidden" name="username" value="<?php echo $session->username; ?>">
							<button class="button" type="submit">Edit Account</button>

							

						</div>

					</form>
				</div>
			</div>