<!DOCTYPE html>
<html>
<head>
	<title>SPS Lite Accounting</title>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<!-- Tell the browser to be responsive to screen width -->
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic" rel="stylesheet" type="text/css" />
	<link rel="shortcut icon" href="<?php echo base_url(); ?>dist/img/logo_salihin_32x32.png">
	<link rel="apple-touch-icon" href="<?php echo base_url(); ?>dist/img/logo_salihin_32x32.png">
	<!-- Bootstrap 3.3.5 -->
	<link rel="stylesheet" href="<?php echo base_url(); ?>bootstrap/css/bootstrap.min.css">
	<!-- Font Awesome -->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
	<!-- Ionicons -->
	<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
	<!-- Theme style -->
	<link rel="stylesheet" href="<?php echo base_url(); ?>dist/css/AdminLTE.css">
	<!-- iCheck -->
	<link rel="stylesheet" href="<?php echo base_url(); ?>plugins/iCheck/square/blue.css">
	<link rel="stylesheet" href="<?php echo base_url(); ?>dist/custom/custom.css">
	<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
	<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
	<![endif]-->
</head>
<body class="hold-transition skin-red-light login-page">
	<input type="hidden" id="expired" name="expired" type="text" value="<?php echo $expired; ?>" />
	<div class="login-box">
		<div class="login-wrap col-lg-12 col-md-12 col-xs-12">
			<div class="login-box-body">
				<div class="login-logo">
					<a href="<?php echo base_url(); ?>home" alt="SPS Lite Accounting"><img src="<?php echo base_url(); ?>dist/img/logo.png" style="width:100%" /></a>
				</div>
				<div class="alert alert-danger alert-dismissible <?php echo validation_errors() ? '' : 'hidden'?>">
                	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
					<?php echo validation_errors(); ?>
				</div>
				<p class="login-box-msg">Admin Login Page</p>
				<?php
				$hidden = array('order_time' => date ( 'Y-m-d H-i-s' ), 'prevurls' => $prevurls);
				echo form_open ( 'login/verifyadmin', array('id' => 'loginForm', 'name' => 'loginForm'), $hidden);
				?>
				<div class="form-group has-feedback">
					<input type="email" id="userID" name="userID" class="form-control" placeholder="Email" required />
					<input type="hidden" id="adminlogin" name="adminlogin" />
					<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
				</div>
				<div class="form-group has-feedback">
					<input type="password" id="password" name="password" class="form-control" placeholder="Password" required />
					<span class="glyphicon glyphicon-lock form-control-feedback"></span>
				</div>
				<div class="row">
					<div class="col-xs-8">
						<div class="checkbox icheck hidden">
							<label>
								<input type="checkbox" id="remember_user" name="remember_user" checked /> Remember Me
							</label>
						</div>
					</div>
					<div class="col-xs-4">
						<input type="submit" id="signIn" name="signIn" class="btn btn-primary btn-block btn-flat" value="Sign in" />
					</div>
				</div>
				<?php echo form_close(); ?>
			</div>
			<div class="additional-info col-xs-12 text-center">
				<a href="<?php echo base_url() ?>login">Customer Site</a>
				<span class="divider-h"></span>
				<a href="<?php echo base_url() ?>forgetPassword">Forgot your password?</a>
			</div>
		</div>
	</div>
	<script src="<?php echo base_url(); ?>plugins/jQuery/jQuery-2.1.4.min.js"></script>
	<!-- Bootstrap 3.3.5 -->
	<script src="<?php echo base_url(); ?>bootstrap/js/bootstrap.min.js"></script>
	<!-- iCheck -->
	<script src="<?php echo base_url(); ?>plugins/iCheck/icheck.min.js"></script>
	<script type="text/javascript">
	bootstrap_alert = function(message, type){
		$('#alert-placeholder').html('<div class="alert alert-'+type+'"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a><span>'+message+'</span></div>');
	}

	$(function() {
		$('#remember_user').attr('checked', true);

		$('input').iCheck({
			checkboxClass: 'icheckbox_square-blue',
			radioClass: 'iradio_square-blue'
		});

		$('input').on('ifChecked', function(event){
			$('#remember_user').attr('checked', true);
		});

		$('input').on('ifUnchecked', function(event){
			$('#remember_user').attr('checked', false);
		});
		
		var expired = $('#expired').val();
		if(expired == 1){
			bootstrap_alert('Your account has expired. Please contact our administration for further action.', 'danger');
		}
	});
    </script>
</body>
</html>
