{include file="header.tpl"}

<h3>{t}Edit Profile{/t}</h3>
<div class="signup">

{if $frm.display == 'updated'}
<div class="ok">{t}Your account has been successfully updated{/t}</div>
{/if}

{if $errors}
<ul class="error">                                                                      
{if $errors.turing}<li> {t}Invalid turing image provided{/t}</li>{/if}
{if $errors.email}<li> {t}Please, enter your email{/t}</li>{/if}
{if $errors.email_exists}<li> {t}Email is already registered. Please, use password reminder to restore your password{/t}</li>{/if}
{if $errors.invalid_email}<li> {t}Please, enter a valid E-mail address{/t}</li>{/if}
{if $errors.password2}<li> {t}Please, verify passwords you have entered. Both passwords should be equal{/t}</li>{/if}
</ul>
{/if}

<form method="post" action="">
<input type="hidden" name="action" value="update">
<table class="form">
<tr>
 <th>{t}Username:{/t}</th>
 <td><b>{$userinfo.username|escape:htmlall}</b></td>
</tr>
<tr>
 <th>{t}E-mail:{/t}</th>
 <td><input type="text" name="email" value="{$frm.email|default:$userinfo.email|escape:htmlall}"></td>
</tr>
<tr>
 <th>{t}Password:{/t}</th>
 <td><input type="password" name="password" value="{$frm.password|escape:htmlall}"></td>
</tr>
<tr>
 <th>{t}Confirm Password:{/t}</th>
 <td><input type="password" name="password2" value="{$frm.password2|escape:htmlall}"></td>
</tr>
{foreach from=$ecs key=id item=data}
<tr>
 <th>{$data.name} <img src="{"`$theme`images/`$data.name`.gif"|encurl}" alt="{$data.name}"></th>
 <td><input type="text" name="account[{$id}]" value="{$frm.account.$id|default:$userinfo.accounts.$id|escape:htmlall}"></td>
</tr>
{/foreach}
{if $settings.use_turing}
<tr>
  <th><img src="{"?a=turing&`$sesname`=`$sesid`&r=`$rand`"|encurl}" alt="turing code"></th>
  <td><input type=text name="turing" maxlength=6 size=6></td>
</tr>
{/if}
<tr>
 <th></th>
 <td><input type="submit" value="{t}Update{/t}"></td>
</tr>
</table>
</form>

</div>

{include file="footer.tpl"}