<?php
include_once 'includes/processes.php';
$Login_Process = new Login_Process;
$Login_Process->check_login($_GET['page']);
$Login = $Login_Process->log_in($_POST['username'], $_POST['password'], $_POST['page'], $_POST['submit']); 
extract($_GET);
?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
  <title><?php echo Site_Name; ?></title>

  <meta charset="utf-8">
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width">

  <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,700italic,400,600,700">
  <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Oswald:400,300,700">
  <link rel="stylesheet" href="./css/font-awesome.min.css">
  <link rel="stylesheet" href="./js/libs/css/ui-lightness/jquery-ui-1.9.2.custom.min.css">
  <link rel="stylesheet" href="./css/bootstrap.min.css">

    <!-- App CSS -->
  <link rel="stylesheet" href="./css/target-admin.css">
  <link rel="stylesheet" href="./css/custom.css">


  <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
  <![endif]-->
  <!--Start of HoduCC Widget Code Script-->
                <script type="text/javascript">var HoduCCIFrame=document.createElement("iframe");HoduCCIFrame.setAttribute("src","https://airpeace.avetiumconsult.com/cc_plugin/index.php?token=131b83ff783b03335643091b77d33180"),HoduCCIFrame.setAttribute("allow","geolocation; microphone; camera"),HoduCCIFrame.setAttribute("id","HoduCCPluginIFrame"),HoduCCIFrame.setAttribute("allowfullscreen","true"),HoduCCIFrame.setAttribute("webkitallowfullscreen","true"),HoduCCIFrame.setAttribute("mozallowfullscreen","true"),HoduCCIFrame.setAttribute("scrolling","no"),HoduCCIFrame.setAttribute("frameborder","0"),document.body.appendChild(HoduCCIFrame);var HoduCCPluginIFrame=document.getElementById("HoduCCPluginIFrame");HoduCCPluginIFrame.setAttribute('style','bottom:0;right:10px;position:fixed;z-index:99999;');var eventMethod=window.addEventListener?"addEventListener":"attachEvent",eventer=window[eventMethod],messageEvent="attachEvent"===eventMethod?"onmessage":"message";eventer(messageEvent,function(e){var t=JSON.parse(e.data);for(key in t){HoduCCPluginIFrame&&(HoduCCPluginIFrame.setAttribute(key,t[key]))}});</script>
                <!--End of HoduCC Widget Code Script-->
</head>

<body class="account-bg">

<div class="navbar">

  <div class="container">

    <div class="navbar-header">

      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
        <i class="fa fa-cogs"></i>
      </button>

      <a class="navbar-brand navbar-brand-image" href="./">
        <img src="./img/logo.png" alt="Site Logo">
      </a>

    </div> <!-- /.navbar-header -->

    <div class="navbar-collapse collapse">

      



       
        

      <ul class="nav navbar-nav navbar-right">   

        <li>
          <a href="https://www.flyairpeace.com" target="_blank">
            Flyairpeace.com
          </a>
        </li> 

      </ul>
       

    </div> <!--/.navbar-collapse -->

  </div> <!-- /.container -->

</div> <!-- /.navbar -->

<hr class="account-header-divider">

<div class="account-wrapper">


    <div class="account-body">
		<?php if(isset($invld) && $invld=1): ?>
			<div class="alert alert-danger alert-dismissible" role="alert">
			  <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
			  Username or Password is Invalid.
			</div>
		<?php endif; ?>
		<?php if(isset($invld) && $invld=2): ?>
			<div class="alert alert-danger alert-dismissible" role="alert">
			  <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
			 Account Pending, <br /> Contact Supervisor
			 </div>
		<?php endif; ?>
		 <?php if(isset($invld) && $invld=3): ?>
			<div class="alert alert-danger alert-dismissible" role="alert">
			  <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
			 Account Suspended, <br /> Contact Supervisor.
			 </div>
		<?php endif; ?>
      <h3 class="account-body-title"><?php echo Site_Name; ?></h3>

      <h5 class="account-body-subtitle">Please sign in to get access.</h5>

      <form class="form account-form" method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
		<input name="page" type="hidden" value="<?php echo $_GET['ref']; ?>" />
        <div class="form-group">
          <label for="login-username" class="placeholder-hidden">Email Address</label>
          <input type="text" class="form-control" name="username" id="login-username" placeholder="Email Address" <?php if(isset($_GET["em"]) && $_GET["em"] !=""){ echo "value=\"".$_GET['em']."\" "; echo "readonly"; } ?> tabindex="1" required />

        </div> <!-- /.form-group -->

        <div class="form-group">
          <label for="login-password" class="placeholder-hidden">Password</label>
          <input type="password" class="form-control" name="password" id="login-password" placeholder="Password" tabindex="2" required />
        </div> <!-- /.form-group -->

        <div class="form-group">
          <button type="submit" name="submit" class="btn btn-primary btn-block btn-lg" tabindex="4">Login</button>
        </div> <!-- /.form-group -->

      </form>


    </div> <!-- /.account-body -->

  </div> <!-- /.account-wrapper -->



        

  <script src="./js/libs/jquery-1.10.1.min.js"></script>
  <script src="./js/libs/jquery-ui-1.9.2.custom.min.js"></script>
  <script src="./js/libs/bootstrap.min.js"></script>

  <!--[if lt IE 9]>
  <script src="./js/libs/excanvas.compiled.js"></script>
  <![endif]-->
  <!-- App JS -->
  <script src="./js/target-admin.js"></script>
  
  <!-- Plugin JS -->
  <script src="./js/target-account.js"></script>

  


  

</body>
</html>
