{include file="header.tpl"}

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

<div class="mainContent">
{if $logged_in}

  <h1>{$smarty.const.CHANGE_PASSWD}</h1>
	<p>{$smarty.const.UPDATE_PASSWORD}</p>

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

<fieldset>
	<legend>{$smarty.const.CHANGE_EXISTING_LEGEND}</legend>
		<form method="post" action="reset.php">
			<p {if $pass_error}class="error"{/if}><label for="old_pass">{$smarty.const.OLD_PASS}</label>
			<input id="old_pass" name="old_pass" type="password" size="30" value="" />
			</p>
			<p><label for="new_pass">{$smarty.const.NEW_PASS}</label>
			<input id="new_pass" name="new_pass" type="password" size="30" value="" />
			</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="{$formemail}" />
			</p>
			<p><input type="submit" name="change" value="{$smarty.const.SUBMIT}" /></p>
		</form>
</fieldset>
{else}

  <h1>{$smarty.const.RESET_PASSWD_HEADER}</h1>
	<p>{$smarty.const.SENDME_PASSWORD}</p>
	
{if $success}
	<p class="green"><strong>{$success}</strong></p>
{elseif $error_message}
	<p class="red"><strong>{$error_message}</strong></p>
{/if}

<fieldset>
	<legend>{$smarty.const.RESET_EXISTING_LEGEND}</legend>
		<form method="post" action="reset.php">
			<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="" />
			</p>

			<p><input type="submit" name="submit" value="{$smarty.const.RESET}" /></p>
		</form>
</fieldset>

{/if}

</div>

{include file="footer.tpl"}