{include file="header.tpl"}

{literal}
<script type="text/javascript">
function checkform() {
  if (document.mainform.username.value=='') {
    alert("Please type your username!");
    document.mainform.username.focus();
    return false;
  }
  if (document.mainform.password.value=='') {
    alert("Please type your password!");
    document.mainform.password.focus();
    return false;
  }
  return true;
}
</script>
{/literal}

<h3>{t}Login{/t}</h3>

{if $frm.display eq 'invalid_login'}
<div class="error">{t}Your login or password or turing image code is wrong. Please check this information.{/t}</div>
{/if}

<form method="post" name="mainform" onsubmit="return checkform()" action="">
<input type=hidden name="a" value="do_login">
<input type=hidden name="referrer" value="{$frm.referrer|escape:url}">
<table class="form">
<tr>
 <th>{t}Username:{/t}</th>
 <td><input type="text" name="username" value="{$frm.username|escape:html}"></td>
</tr>
<tr>
 <th>{t}Password:{/t}</th>
 <td><input type="password" name="password" value=""></td>
</tr>
<tr>
 <th></th><td><input type=checkbox name="remember" value=1 style="width:15px"> {t}Remeber me{/t}</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"></td>
</tr>
{/if}
<tr>
 <th></th>
 <td><input type="submit" value="{t}Login{/t}"></td>
</tr></table>
</form>
<a href="{"?a=signup"|encurl}">{t}Sign Up{/t}</a>
|
<a href="{"?a=forgot_password"|encurl}">{t}Remind your login information{/t}</a>

{include file="footer.tpl"}
