<commit_before><?php
defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * Community Auth - Login Form View
 *
 * Community Auth is an open source authentication application for CodeIgniter 3
 *
 * @package     Community Auth
 * @author      <NAME>
 * @copyright   Copyright (c) 2011 - 2015, <NAME>. (http://brianswebdesign.com/)
 * @license     BSD - http://www.opensource.org/licenses/BSD-3-Clause
 * @link        http://community-auth.com
 */

if( ! isset( $optional_login ) )
{
	echo '<legend class="first-content-element">Login</legend>';
}

if( ! isset( $on_hold_message ) )
{
	if( isset( $login_error_mesg ) )
	{
		echo '<div id="login-failed"><p>Invalid login name or password. Please note that both are case sensitive.</p></div>';
	}

	if( $this->input->get('logout') )
	{
		echo '<div id="logged-out"><p>You have successfully logged out.</p></div>';
	}

	echo form_open( $login_url, array( 'class' => 'std-form form-horizontal' ) ); 
?>

		<div class="form-group required">
			<label for="login_string" class="control-label col-md-2 required">Login Name</label>
			<div class="col-md-3">
				<input type="text" class="form_input" id="login_string" name="login_string" min="3" autocomplete="off" maxlength="<?php echo config_item('max_chars_for_user_name'); ?>" required="true">
			</div>
		</div>
		
		<div class="form-group required">
			<label for="login_pass" class="control-label col-md-2 required">Password</label>
			<div class="col-md-3">
				<input type="password" class="form-control" id="login_pass" name="login_pass" min="3" required="true" maxlength="<?php echo config_item('max_chars_for_password'); ?>" autocomplete="off" onfocus="this.removeAttribute('readonly');">
			</div>
		</div>

		<?php
			if( config_item('allow_remember_me') )
			{
		?>

			<div class="form-group">
				<div class="col-xs-offset-2 col-md-3">
					<div class="checkbox">
						<label for="remember_me" class="form_label"><input type="checkbox" id="remember_me" name="remember_me" value="yes"> Remember Me</label>
					</div>
				</div>
			</div>

		<?php
			}
		?>

		<div class="form-group">
			<div class="col-md-offset-2 col-md-3">
				<a href="<?php echo secure_site_url('examples/recover'); ?>">
					Can't access your account?
				</a>
			</div>
		</div>

		<div class="form-group last-content-element">
			<div class="col-md-offset-2 col-md-1">
				<input class="btn btn-primary" name="submit" id="submit_button" value="Login" type="submit">
			</div>
		</div>
	</div>
</form>

<?php

	}
	else
	{
		// EXCESSIVE LOGIN ATTEMPTS ERROR MESSAGE
		echo '
			<div style="border:1px solid red;">
				<p>
					Excessive Login Attempts
				</p>
				<p><commit_msg>Fixed footer on login page<commit_after><?php
defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * Community Auth - Login Form View
 *
 * Community Auth is an open source authentication application for CodeIgniter 3
 *
 * @package     Community Auth
 * @author      <NAME>
 * @copyright   Copyright (c) 2011 - 2015, <NAME>. (http://brianswebdesign.com/)
 * @license     BSD - http://www.opensource.org/licenses/BSD-3-Clause
 * @link        http://community-auth.com
 */

if( ! isset( $optional_login ) )
{
	echo '<legend class="first-content-element">Login</legend>';
}

if( ! isset( $on_hold_message ) )
{
	if( isset( $login_error_mesg ) )
	{
		echo '<div id="login-failed"><p>Invalid login name or password. Please note that both are case sensitive.</p></div>';
	}

	if( $this->input->get('logout') )
	{
		echo '<div id="logged-out"><p>You have successfully logged out.</p></div>';
	}

	echo form_open( $login_url, array( 'class' => 'std-form form-horizontal' ) ); 
?>

		<div class="form-group required">
			<label for="login_string" class="control-label col-md-2 required">Login Name</label>
			<div class="col-md-3">
				<input type="text" class="form_input" id="login_string" name="login_string" min="3" autocomplete="off" maxlength="<?php echo config_item('max_chars_for_user_name'); ?>" required="true">
			</div>
		</div>
		
		<div class="form-group required">
			<label for="login_pass" class="control-label col-md-2 required">Password</label>
			<div class="col-md-3">
				<input type="password" class="form-control" id="login_pass" name="login_pass" min="3" required="true" maxlength="<?php echo config_item('max_chars_for_password'); ?>" autocomplete="off" onfocus="this.removeAttribute('readonly');">
			</div>
		</div>

		<?php
			if( config_item('allow_remember_me') )
			{
		?>

			<div class="form-group">
				<div class="col-xs-offset-2 col-md-3">
					<div class="checkbox">
						<label for="remember_me" class="form_label"><input type="checkbox" id="remember_me" name="remember_me" value="yes"> Remember Me</label>
					</div>
				</div>
			</div>

		<?php
			}
		?>

		<div class="form-group">
			<div class="col-md-offset-2 col-md-3">
				<a href="<?php echo secure_site_url('examples/recover'); ?>">
					Can't access your account?
				</a>
			</div>
		</div>

		<div class="form-group last-content-element">
			<div class="col-md-offset-2 col-md-1">
				<input class="btn btn-primary" name="submit" id="submit_button" value="Login" type="submit">
			</div>
		</div>
</form>

<?php

	}
	else
	{
		// EXCESSIVE LOGIN ATTEMPTS ERROR MESSAGE
		echo '
			<div style="border:1px solid red;">
				<p>
					Excessive Login Attempts
				</p>
				<p>
{'fraction_non_alphanumeric': 0.18397017707362534, 'fraction_numerical': 0.008574091332712022, 'mean_word_length': 3.8605072463768115, 'pattern_counts': {'":': 0, '<': 120, '<?xml version=': 0, '>': 124, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4425335', 'n_tokens_mistral': 2094, 'n_tokens_neox': 1836, 'n_words': 412}