
{literal}
<script language="JavaScript">
<!--
function validateForm(f)
{
    if (isWhitespace(f.email.value)) {
        errors[errors.length] = new Option('{/literal}{t escape=js}Email Address{/t}{literal}', 'email');
    }
    if (isWhitespace(f.passwd.value)) {
        errors[errors.length] = new Option('{/literal}{t escape=js}Password{/t}{literal}', 'passwd');
    }
    if (errors.length > 0) {
        return false;
    }
}
//-->
</script>
{/literal}
<form name="login_form" onSubmit="javascript:return checkFormSubmission(this, 'validateForm');" method="post" action="login.php">
<input type="hidden" name="cat" value="login">
<input type="hidden" name="url" value="{$smarty.get.url|escape:"html"}">
<table align="center" width="400" border="0" cellspacing="0" cellpadding="1" bgcolor="#FFFFFF">
  <tr>
    <td>
      <table bgcolor="#FFFFFF" width="100%" border="0" cellspacing="0" cellpadding="4">
        <tr>
          <td colspan="2" align="center">
            <br /><br />
            <h3>{$app_setup.tool_caption|default:$application_title} - {t}Login{/t}</h3>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table align="center" width="400" border="0" cellspacing="0" cellpadding="1" bgcolor="#000000">
  <tr>
    <td>
      <table bgcolor="#FFFFFF" width="100%" border="0" cellspacing="0" cellpadding="4">
        <tr>
          <td colspan="2" bgcolor="#006486"><img src="images/blank.gif" width="1" height="5"></td>
        </tr>
        {if $smarty.get.err != 0}
        <tr>
          <td colspan="2" align="center" class="error" bgcolor="#006486">
            <b>
            {if $smarty.get.err == 1}
              {t}Error: Please provide your email address.{/t}
            {elseif $smarty.get.err == 2}
              {t}Error: Please provide your password.{/t}
            {elseif $smarty.get.err == 3 or $smarty.get.err == 4}
              {t}Error: The email address / password combination could not be found in the system.{/t}
            {elseif $smarty.get.err == 5}
              {t}Your session has expired. Please login again to continue.{/t}
            {elseif $smarty.get.err == 6}
              {t name=$application_title}Thank you, you are now logged out of %1{/t}.
            {elseif $smarty.get.err == 7}
              {t}Error: Your user status is currently set as inactive. Please
              contact your local system administrator for further information.{/t}
            {elseif $smarty.get.err == 8}
              {t}Thank you, your account is now active and ready to be
              used. Use the form below to login.{/t}
            {elseif $smarty.get.err == 9}
              {t}Error: Your user status is currently set as pending. This
              means that you still need to confirm your account
              creation request. Please contact your local system
              administrator for further information.{/t}
            {elseif $smarty.get.err == 11}
              {t}Error: Cookies support seem to be disabled in your browser. Please enable this feature and try again.{/t}
            {elseif $smarty.get.err == 12}
              {t name=$application_title}Error: In order for %1 to work properly, you must enable cookie support in your browser. Please login
              again and accept all cookies coming from it.{/t}
            {/if}
            </b>
          </td>
        </tr>
        {/if}
        <tr>
          <td align="right" width="40%" class="default_white" bgcolor="#006486"><b>{t}Email Address{/t}:</b></td>
          <td width="60%" bgcolor="#006486">
            <input accessKey="e" class="default" type="text" name="email" value="{$email|default:$smarty.get.email|escape:"html"}" size="30">
            {include file="error_icon.tpl.html" field="email"}
          </td>
        </tr>
        <tr>
          <td align="right" width="40%" class="default_white" bgcolor="#006486"><b>{t}Password{/t}:</b></td>
          <td width="60%" bgcolor="#006486">
            <input accessKey="p" class="default" type="password" name="passwd" size="20" maxlength="32">
            {include file="error_icon.tpl.html" field="passwd"}
          </td>
        </tr>
        <tr align="center">
          <td colspan="2" bgcolor="#006486">
            <input type="submit" name="Submit" value="{t}Login{/t}" class="button">
          </td>
        </tr>
        <tr align="center">
          <td colspan="2" class="default_white" bgcolor="#006486">
            <a class="white_link" href="forgot_password.php{if $smarty.get.email != ""}?email={$smarty.get.email|escape:"html"}{/if}">{t}I Forgot My Password{/t}</a>&nbsp;&nbsp;
            {if $app_setup.open_signup == 'enabled'}<a class="white_link" href="signup.php">{t}Signup for an Account{/t}</a>{/if}
          </td>
        </tr>
        <tr>
          <td bgcolor="#006486" colspan="2" align="center" class="default_white">
            <b>* {t}Requires support for cookies and javascript in your browser{/t}</b>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</form>
{if $anonymous_post}
<br />
<table width="400" bgcolor="{$cell_color}" border="0" cellspacing="0" cellpadding="1" align="center">
  <tr>
    <td>
      <table bgcolor="#FFFFFF" width="100%" cellspacing="1" cellpadding="2" border="0">
        <tr>
          <td class="default">
            <b>{t}NOTE: You may report issues without the need to login by using the following URL{/t}:</b>
            <br /><br />
            <a href="{$app_base_url}post.php" class="link">{$app_base_url}post.php</a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
{/if}
{literal}
<script language="JavaScript">
<!--
window.onload = setFocus;
function setFocus()
{
    if (!isWhitespace(document.login_form.email.value)) {
        document.login_form.passwd.focus();
    } else {
        document.login_form.email.focus();
    }
}
//-->
</script>
{/literal}

