<?php

$xml=simplexml_load_file("config/config.xml");
include('config/controller.php');
include('config/config.php');
include_once('jcart/jcart.php');
include('include/head.php');
session_start();
if ($_SERVER['REQUEST_METHOD'] == "POST"){
	$cad = new Control();
	$cad->entraLogin($_POST['email'], $_POST['senha']);
}
?>
<body>
<div id="wrapper-outer" >
    <div id="wrapper">
        <div id="wrapper-inner">
			<?php
				include('include/header.php');
	
				include('include/menu.php');
			?>
            <div id="content">
				<div class="container">
    				<div>
        				<div id="main">
      				
            				<h1 class="page-header"><a href="index.php">Home</a> << Login</h1>
     								<?php
    								if($_GET['vi'] == 'erro'){
    								?>
									<div class="alert alert-error">
										<button type="button" class="close" data-dismiss="alert">×</button>
										<strong>Login e/ou senha</strong> inválido. Tente novamente!
									</div>
    								<?php
    								}
    								?>             				
            					<div class="login-register">
									<div class="row">
										<div class="span4">
										    <div class="tab-content">
										        <div class="tab-pane active" id="login">
										            <form id="entrada" method="post" action="login.php">
										                <div class="control-group">
										                    <label class="control-label" for="email">
										                        Email
										                        <span class="form-required" title="This field is required.">*</span>
										                    </label>
										
										                    <div class="controls">
										                        <input type="text" name="email" id="email">
										                    </div>
										                    <!-- /.controls -->
										                </div>
										                <!-- /.control-group -->
										
										                <div class="control-group">
										                    <label class="control-label" for="senha">
										                        Senha
										                        <span class="form-required" title="This field is required.">*</span>
										                    </label>
										
										                    <div class="controls">
										                        <input type="password" name="senha" id="senha">
										                    </div>
										                    <!-- /.controls -->
										                </div>
										                <!-- /.control-group -->
										
										                <div class="form-actions">
										                    <input type="submit" value="Login" class="btn btn-primary arrow-right">
										                    <br>
										                    <br>
										                    <h7>Não tem login? <a href="cadastro.php">Cadastre-se aqui!</a></h5>
										                </div>
										                <!-- /.form-actions -->
										            </form>
										        </div>
										        <!-- /.tab-pane -->
										    </div>
										    <!-- /.tab-content -->
										</div><!-- /.span4-->
										<div class="span8">
    										<h2 class="page-header">Faça o login para efetuar a sua compra!</h2>
    										<hr class="dotted">
										    <p>
										        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ullamcorper libero sed ante auctor vel
										        gravida nunc placerat. Suspendisse molestie posuere sem, in viverra dolor venenatis sit amet. Aliquam
										        gravida nibh quis justo pulvinar luctus. Phasellus a malesuada massa.
										    </p>
										</div>
									</div>
									<!-- /.row -->
								</div><!-- /.login-register -->        
							</div>
    					</div>
					</div>
    			</div><!-- /#content -->
			</div><!-- /#wrapper-inner -->
	<?php
	include('include/footer.php');
	include('include/configuracao.php');
	?>
<script type="text/javascript" src="assets/js/jquery.js"></script>
<script type="text/javascript" src="assets/js/jquery.ezmark.js"></script>
<script type="text/javascript" src="assets/js/jquery.currency.js"></script>
<script type="text/javascript" src="assets/js/jquery.cookie.js"></script>
<script type="text/javascript" src="assets/js/retina.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/carousel.js"></script>
<script type="text/javascript" src="assets/libraries/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
<script type="text/javascript" src="assets/libraries/chosen/chosen.jquery.min.js"></script>
<script type="text/javascript" src="assets/libraries/iosslider/_src/jquery.iosslider.min.js"></script>
<script type="text/javascript" src="assets/libraries/bootstrap-fileupload/bootstrap-fileupload.js"></script>
<script type="text/javascript" src="assets/js/realia.js"></script>
<script src="assets/js/jquery.validate.js" type="text/javascript"></script>
<script src="assets/js/validate.methods.js" type="text/javascript"></script>
</body>
</html>