<?php
require_once dirname(__FILE__) . '/config/config.php';
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Admin login">
    <meta name="author" content="Proxibolt">
    <meta name="keyword" content="">

    <title><?php echo $site_name; ?> | <?php echo $text['sign_in']; ?></title>

	<!-- Bootstrap core CSS -->
    <link href="src/css/bootstrap/bootstrap.css" rel="stylesheet">
    <!--external css-->
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="src/plugins/lineicons/style.css">   
    
    <!-- Custom styles for this template -->
    <link href="src/css/admin.css" rel="stylesheet">
    <link href="src/css/admin-responsive.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="//oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

      <!-- **********************************************************************************************************************************************************
      MAIN CONTENT
      *********************************************************************************************************************************************************** -->
	<div id="login-page">
	  	<div class="container">
		    <form class="form-login" action="src/action.php" method="POST">
			    <h2 class="form-login-heading"><?php echo $text['sign_in']; ?></h2>
			    <input type="hidden" name="action" value="login">
			    <div class="login-wrap">
		            <input type="text" id="email" name="email" class="form-control" placeholder="<?php echo $text['email']; ?>" autofocus>
		            <br>
		            <input type="password" id="password" name="password" class="form-control" placeholder="<?php echo $text['password']; ?>">
		            <br>
		            <button class="btn btn-theme btn-block" id="submit"><i class="fa fa-lock"></i> <?php echo $text['sign_in']; ?></button>	
		        </div>			
	      	</form>	
	      	<div id="errorDiv" style="width: 330px; text-align:center; margin-left: auto; margin-right: auto; padding-top: 10px;">
	      		<?php
	      		if($_GET['login'] == 'wrong') {
	      			echo '<div class="alert alert-danger" role="alert">' . $text["invalid_login"] . '</div>';
	      		}
	      		elseif($_GET['login'] == 'fields') {
	      			echo '<div class="alert alert-danger" role="alert">' . $text["fill_fields"] . '</div>';
	      		}
	      		?>
	      	</div> 	 		  
	  	</div>
	</div>
    <!-- js placed at the end of the document so the pages load faster -->
    <script src="src/js/admin/jquery.js"></script>
    <script src="src/js/admin/bootstrap.min.js"></script>

    <!--BACKSTRETCH-->
    <!-- You can use an image of whatever size. This script will stretch to fit in any screen size.-->
    <script type="text/javascript" src="src/js/admin/jquery.backstretch.min.js"></script>
    <script>
        $.backstretch("src/images/bg_login.jpg", {speed: 0});
    </script>


  </body>
</html>
