{include file="header.tpl"}

<div id="sidebar">
{include file="sidebar.tpl"}
</div>

<div class="mainContent">

<h1>{$smarty.const.EDIT_USER_DETAILS}</h1>
	<p>{$smarty.const.UPDATE_ACCOUNT}</p>

{if $success}
	<p class="green"><strong>{$success}</strong></p>
{elseif $error_message}
	<p class="red"><strong>{$error_message}</strong></p>
{/if}

{foreach item="records" from=$records}
<fieldset>
	<legend>{$smarty.const.EDIT_USER_LEGEND}</legend>
		<form action="useredit.php" method="post">
			<p><label for="first_name">{$smarty.const.FIRST_NAME}</label>
			<input id="first_name" name="first_name" type="text" size="30" maxlength="30" value="{$records.first_name}" />
			</p>
			<p><label for="last_name">{$smarty.const.LAST_NAME}</label>
			<input id="last_name" name="last_name" type="text" size="30" maxlength="30" value="{$records.last_name}" />
			</p>
			<p><label for="phone">{$smarty.const.PHONE}</label>
			<input id="phone" name="phone" type="text" size="30" maxlength="30" value="{$records.phone}" />
			</p>
			<p><label for="alt_phone">{$smarty.const.ALT_PHONE}</label>
			<input id="alt_phone" name="alt_phone" type="text" size="30" maxlength="30" value="{$records.alt_phone}" />
			</p>
			<p><label for="fax">{$smarty.const.FAX}</label>
			<input id="fax" name="fax" type="text" size="30" maxlength="30" value="{$records.fax}" />
			</p>
			<p {if $mail_error}class="error"{/if}><label for="email">{$smarty.const.EMAIL}</label>
			<input id="email" name="email" type="text" size="35" maxlength="50" value="{$records.email}" />
			</p>
			
			<p><input name="submit" type="submit" value="{$smarty.const.SUBMIT}" />
			<a href="member.php">{$smarty.const.BACK_TO_MEMBER_HOME}</a><br />
			</p>
		</form>
</fieldset>
{/foreach}

<fieldset>
	<legend>{$smarty.const.EDIT_PROFILE_IMAGE_LEGEND}</legend>
		<form enctype="multipart/form-data" action="useredit.php" method="post">
			<p><label for="image">{$smarty.const.YOUR_IMAGE}</label>
			<input id="image" name="image" type="file" size="30" value="" />
			</p>
			<p>
			<input type="hidden" name="max" value="512000" />
			<input name="addimage" type="submit" value="{$smarty.const.SUBMIT}" />
			<a href="member.php">{$smarty.const.BACK_TO_MEMBER_HOME}</a><br />
			</p>
		</form>
</fieldset>

</div>

{include file="footer.tpl"}