<?php 
$controller = 'index';
$action = '';

include $_SERVER["DOCUMENT_ROOT"].'/app/include/bootstrap.php';
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>MG POS</title> 
     <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="public/css/login.css" rel="stylesheet">
    <link href="public/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <script src="public/js/jquery-1.10.2.js"></script>
    <script src="public/bootstrap/js/bootstrap.min.js"></script>
  </head>
  <body>
    <?php    
    

        error_reporting(E_ALL);
        if(isset($_POST['login'])){            
            $login = new Login($_POST);
            if($login->isLogged()){
                echo "<script>window.location = '/Controller/Home.php'</script>";
            }
        }
        ?>   
   
   <div class="content">
        <div class="main vlcone">            
                <div class="hotel-right">
                    <img src="public/img/logo_login.png"/>
                    <hr style="width: 60%;color: #584639">
                    <!--<p>DESDE 1995.</p>-->
                </div>
                <div class="hotel-left">
                    <div class="pay_form">
                        <h2>PUNTO DE VENTA</h2>
                        <form action="index.php" method="POST">
                            <input name="usuario" class="logo" type="text" placeholder="USUARIO" required="">
                            <input name="contrasena" class="key" placeholder="CONTRASENA" type="password" required="">
                            <input name="login" type="submit" value="Ingresar">
                        </form>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
        </div>
        <p class="footer">&copy; <?php echo date('Y');?> Paris Bakery.</p>
    </div>
</body>
</html>
