{include file="header.tpl"}

{literal}
<script type="text/javascript">
function checkform() {
  if (document.forgotform.email.value == '') {
    alert("Please type your username or email!");
    document.forgotform.email.focus();
    return false;
  }
  return true;
}
</script>
{/literal}
<h3>{t}Password Remind{/t}</h3>

{if $frm.display == 'confirmation_sent'}
<div class="ok">{t}Confirmation link was sent to your e-mail address. Please follow the link to reset your password.{/t}</div>
{elseif $frm.display == 'password_sent'}
<div class="ok">{t login_link="?a=login"|encurl}Your login info was sent to your e-mail. You can <a href="%login_link">login</a> now.{/t}</div>
{elseif $frm.display == 'invalid_code'}
<div class="error">{t}The code you have provided is invalid. It means you have used broken link or password was already sent to you.{/t}</div>
{else}

{if $errors}
<ul class="error">
{if $errors.turing}<li> {t}Invalid turing image provided{/t}</li>{/if}
{if $errors.no_input}<li> {t}Please enter your username or e-mail addresss{/t}</li>{/if}
</ul>
{/if}


<form method="post" name="forgotform" onsubmit="return checkform()" action="">
<input type=hidden name=a value="forgot_password">
<input type=hidden name=action value="forgot_password">
<table class="form">
<tr>
 <th>{t}Username or E-mail:{/t}</th>
 <td><input type=text name="email"></td>
</tr>
{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}Submit{/t}"></td>
</tr>
</table>
</form>
{/if}

{include file="footer.tpl"}
