{include file="header.tpl"}
<div class="box">
<div class="box_title">Edit Account</div>
<div class="box_body">

{if $frm.display == 'updated'}
<div style="color:green">Your account has been successfully updated.</div><br><br>
{/if}

{if $errors}
<ul style="color:red">                                                                      
{if $errors.turing}<li> Invalid turing image provided</li>{/if}
{if $errors.email}<li> Please, enter your email</li>{/if}
{if $errors.invalid_email}<li> Please, enter your valid email</li>{/if}
{if $errors.password2}<li> Please, verify passwords you have entered. Both passwords shoudl be equal</li>{/if}
</ul>
{/if}

<form method="post" action="">
<input type="hidden" name="action" value="update">
<table cellpadding="2" cellspacing="2" border="0">
<tr>
 <td>Username</td>
 <td><b>{$userinfo.username|escape:htmlall}</b></td>
</tr>
<tr>
 <td>Email</td>
 <td><input type="text" name="email" value="{$frm.email|default:$userinfo.email|escape:htmlall}" class="inpts" size="45"></td>
</tr>
<tr>
 <td>Password</td>
 <td><input type="password" name="password" value="{$frm.password|escape:htmlall}" class="inpts" size="45"></td>
</tr>
<tr>
 <td>Confirm Password</td>
 <td><input type="password" name="password2" value="{$frm.password2|escape:htmlall}" class="inpts" size="45"></td>
</tr>

{foreach from=$uecs key=i item=data}
<tr>
 <td>{$data.name}</td>
 <td><input type="text" name="account[{$i}]" value="{$frm.account.$i|default:$data.account|escape:htmlall}" class="inpts" size="32"> <img src="{"images/`$data.name`.gif"|encurl}" title="{$data.name}" align="absmiddle"></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="10" class="inpts"></td>
</tr>
{/if}
<tr>
 <td></td>
 <td><input type="submit" value="Update" class="sbmt"></td>
</tr>
</table>
</form>

</div></div>

{include file="footer.tpl"}