<?php

/**
 *
 * @copyright  2010-2016 izend.org
 * @version    10
 * @link       http://www.izend.org
 */
?>
<?php extract($errors); ?>
<form action="" method="post">
<input type="hidden" name="login_token" value="<?php echo $token; ?>" />
<p class="inlabel<?php if ($missing_login or $bad_login): ?> inerror<?php endif; ?>"><?php if ($with_name): ?>What is your connection name?<?php else: ?>What is your email address?<?php endif; ?></p>
<p><input type="text" name="login_login" id="login_login" size="30" maxlength="100" title="Identifier" onkeypress="return focusonenter(event, 'login_password')" value="<?php echo htmlspecialchars($login, ENT_COMPAT, 'UTF-8'); ?>" />
<?php if ($connectbar): ?>
<?php echo $connectbar; ?>
<?php endif; ?>
</p>
<?php if ($with_name): ?>
<p class="info">You may also enter your email address.</p>
<?php endif; ?>
<p class="inlabel<?php if ($missing_password or $access_denied): ?> inerror<?php endif; ?>">And your access key?</p>
<p><input type="password" name="login_password" id="login_password" size="20" maxlength="20" title="Password" onkeypress="<?php if ($with_captcha): ?>return focusonenter(event, 'login_code')<?php else: ?>return submitonenter(event, 'login_enter')<?php endif; ?>" /></p>
<?php if ($password_page): ?>
<p class="info link">If you have forgotten your password, <a href="<?php echo $password_page; ?>" rel="nofollow">click here</a>.</p>
<?php endif; ?>
<?php if ($with_captcha): ?>
<p>
<img src="<?php echo $base_path; ?>/captcha/login" alt="" height="40" title="Verification code" />
:
<input type="text" name="login_code" id="login_code" size="4" maxlength="4" title="4 letters" autocomplete="off" onkeypress="return submitonenter(event, 'login_enter')" value="" />
</p>
<?php endif; ?>
<p><input type="submit" class="submit submit_enter" name="login_enter" id="login_enter" value="Enter" /></p>
<?php if ($newuser_page): ?>
<p class="info link">To create your personal account, <a href="<?php echo $newuser_page; ?>" rel="nofollow">click here</a>.</p>
<?php endif; ?>
</form>
<div class="errors">
<?php if ($missing_code): ?>
<p>Enter the verification code displayed in the image.</p>
<?php elseif ($bad_code): ?>
<p>The verification code is incorrect.</p>
<?php endif; ?>
<?php if ($missing_login or $missing_password): ?>
<p>Enter your identifier and your password.</p>
<?php elseif ($bad_login): ?>
<p>The identifier is invalid.</p>
<?php elseif ($access_denied): ?>
<p>Access denied.</p>
<?php endif; ?>
</div>
<?php
$focus=false;
if ($missing_code or $bad_code) {
	$focus='#login_code';
}
else if ($missing_login or $bad_login) {
	$focus='#login_login';
}
else if ($missing_password or $access_denied) {
	$focus='#login_password';
}
?>
<?php if ($focus): ?>
<script type="text/javascript">
$(function() {$('<?php echo $focus; ?>').focus();});
</script>
<?php endif; ?>
