<?php
require_once('config/config.php');
require_once('foo/functions.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="img/favicon.png">
    <title><?php echo WEB_TITLE ?></title>

    <!-- Bootstrap CSS -->    
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- bootstrap theme -->
    <link href="css/bootstrap-theme.css" rel="stylesheet">
    <!--external css-->
    <!-- font icon -->
    <link href="css/elegant-icons-style.css" rel="stylesheet" />
    <link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles -->
    <link href="css/style.css" rel="stylesheet">
    <link href="css/style-responsive.css" rel="stylesheet" />
	
	<link href="css/jquery.keypad.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 -->
    <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
</head>

  <body class="login-body">

    <div class="container">
	
	<!--header start-->
      <header class="header white-bg">

            <!--logo start-->
			<img src="img/logo.png" alt="<?php echo WEB_NAME ?>" />
            <!--logo end-->

            
      </header>      
      <!--header end-->

      <form class="form-validate login-form" id="forgotten_form" action="signpin.php" method="post">        
        <div class="login-wrap">
            <p class="login-img">
			<img src="img/logo.png" alt="<?php echo WEB_NAME ?>" />
			</p>
			
			<!-- Error Message -->
			<?php if (!empty($_GET['error'])): ?>
			<div class="alert fade in alert-danger">
				<button data-dismiss="alert" class="close close-sm" type="button">
				<i class="icon-remove"></i>
				</button>
				<?php echo $_GET['error']?>
			</div>
			<?php endif ?>
			
			
			<!-- Success Message -->
			<?php if (!empty($_GET['msg'])): ?>
			<div class="alert fade in alert-success">
				<button data-dismiss="alert" class="close close-sm" type="button">
				<i class="icon-remove"></i>
				</button>
				<?php echo $_GET['msg']?>
			</div>
			<?php endif ?>
			
			<p>Enter your PIN to continue</p>
				
            <div class="input-group">
                <span class="input-group-addon"><i class="icon-key"></i></span>
                <input type="password" id="pin" name="pin" class="form-control grey" placeholder="Please enter your PIN.">
            </div>
			
			<div class="input-group">
                <input type="button" class="btn btn-default" name="1" value="1" id="1" onClick=addNumber(this); />
				<input type="button" class="btn btn-default" name="2" value="2" id="2" onClick=addNumber(this); />
				<input type="button" class="btn btn-default" name="3" value="3" id="3" onClick=addNumber(this); />
				<input type="button" class="btn btn-default" name="4" value="4" id="4" onClick=addNumber(this); />
				<input type="button" class="btn btn-default" name="5" value="5" id="5" onClick=addNumber(this); />
				<input type="button" class="btn btn-default" name="6" value="6" id="6" onClick=addNumber(this); />
				<input type="button" class="btn btn-default" name="7" value="7" id="7" onClick=addNumber(this); />
				<input type="button" class="btn btn-default" name="8" value="8" id="8" onClick=addNumber(this); />
				<input type="button" class="btn btn-default" name="9" value="9" id="9" onClick=addNumber(this); />
				<input type="button" class="btn btn-default" name="10" value="10" id="10" onClick=addNumber(this); />
            </div>

            <button class="btn btn-primary btn-lg btn-block" type="submit">Sign In</button>
        </div>
      </form>

    </div>
	
	<!-- javascripts -->
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <!-- nice scroll -->
    <script src="js/jquery.scrollTo.min.js"></script>
    <script src="js/jquery.nicescroll.js" type="text/javascript"></script>
    <!-- jquery validate js -->
    <script type="text/javascript" src="js/jquery.validate.min.js"></script>
	
	<script type="text/javascript" src="js/jquery.keypad.js"></script>
	<script type="text/javascript" src="js/jquery.plugin.js"></script>
	<script>
	$(function () {
	$('#pin').keypad();
	});
	</script>
	
	<script>
	function addNumber(element){
	$('#pin').val($('#pin').val()+element.value);
	}
	</script>

    <!-- custom form validation script for this page-->
    <script src="js/form-validation-script.js"></script>
    <!--custome script for all page-->
    <script src="js/scripts.js"></script>


  </body>
</html>
