<?php
if(isset($_SESSION['user_id']) AND (substr($_SERVER['PHP_SELF'], -10) != 'iesire.html')) {
    $url = PATH.'index.html';
    ob_end_clean();
    header("Location: $url");
    exit();
    }else{

    ?>
<?php include FORM; ?>
<div class="w3-row-padding">
<div class="w3-quarter">
<?php include APP.'sidebar_gen.php'; ?>
</div>
<div class="w3-threequarter">
 
 <div class="w3-row">
   <div class="w3-rest w3-card w3-container w3-indigo w3-margin-bottom">
   <h3>Noutăți</h3>   
   </div>
 </div> 
 
 
 <div class="w3-row">
   
   <div class="w3-quarter w3-hide-small">&nbsp;</div>
   
   <div class="w3-half w3-indigo w3-container w3-margin-top w3-margin-bottom w3-card">
   <h3 class="w3-center w3-margin-bottom w3-padding w3-border-bottom">Autentificare</h3>
   
<?php if(isset($e_err)){ ?>
   <div class="w3-container">
       <div class="w3-panel w3-red w3-center">
            <h5 style="margin-top:4px;"><?=$e_err?></h5>
       </div>
   </div>
<?php } ?>

<?php if(isset($p_err)){ ?>
   <div class="w3-container">
       <div class="w3-panel w3-red w3-center">
            <h5 style="margin-top:4px;"><?=$p_err?></h5>
       </div>
   </div>
<?php } ?>

<?php if(isset($err_login)){ ?>
   <div class="w3-container">
       <div class="w3-panel w3-red w3-center">
            <h5 style="margin-top:4px;"><?=$err_login?></h5>
       </div>
   </div>
<?php } ?>

<?php if(isset($try)){ ?>
   <div class="w3-container">
       <div class="w3-panel w3-red w3-center">
            <h5 style="margin-top:4px;"><?=$try?></h5>
       </div>
   </div>
<?php } ?>
   
   <form class="w3-container" action="" method="post">
   <div class="w3-margin-bottom">
   <label>Adresa de e-mail</label>
   <input class="w3-input" type="email" name="email" placeholder="Treceți adresa dvs. de e-mail" required=""/>
   </div>
   
   <div class="w3-margin-bottom">
   <label>Parola</label>
   <input class="w3-input" type="password" name="parola" placeholder="Introduce-ți parola" required=""/>
   </div>
   
   <div class="w3-margin-bottom w3-center">
   <button class="w3-button w3-green w3-hover-black" type="submit"><i class="fa fa-unlock"></i> Accesează</button>
   </div>
   
   <input type="hidden" name="acces" value="true"/>
   </form>
   
   <div class="w3-bar w3-white">
   
   <a href="contnou.html" class="w3-bar-item w3-button w3-blue w3-hover-black" style="width:40%">Cont nou</a>
   <a href="recuperareparola.html" class="w3-bar-item w3-button w3-red w3-hover-black" style="width:60%">Recuperare parolă</a>
   
   </div>
   
   </div>
   
  <div class="w3-quarter w3-hide-small">&nbsp;</div>
   
 </div>

</div>

</div>


<?php } ?>