{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}
<div class="box">
<div class="box_title" id="tba">User Login</div>
<div class="box_body">

{if $frm.display eq 'invalid_login'}
<div style="color:red" align="center">Your login or password{if $settings.use_turing} or turing image code{/if} is wrong. Please check this information.</div>
{/if}

<form method="post" name="mainform" onsubmit="return checkform()">
<input type=hidden name="a" value="do_login">
<input type=hidden name="referrer" value="{$login_referrer}">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
 <td>Username:</td>
 <td><input type="text" name="username" value="{$frm.username|escape:html}" class="inpts" size="45"></td>
</tr>
<tr>
 <td>Password:</td>
 <td><input type="password" name="password" value="" class="inpts" size="45"></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" size="12" class="inpts"></td>
</tr>
{/if}
<tr>
 <td></td>
 <td><input type="submit" value="Login" class="sbmt"></td>
</tr></table>
</form>
<div align="right"><a href="{"?a=forgot_password"|encurl}" style="color:red">Remind your login information</a></div>
</div></div>
{include file="footer.tpl"}
