<?php require('casa/setup.casa.php');
include('inc_head.php');
?>
<body>

    <?php include('inc_menu.php');?>

    <div class="contact">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-lg-6">
                    <form>
                    <br><br><br><br>
                        <div class="row g-3">                           
                        <div class="col-sm-12">
                                <input id='txtUser' type="text" class="form-control bg-light border-0 px-4" placeholder="Usuario" style="height: 55px;">
                            </div> 
                            <div class="col-sm-12">
                                <input id='txtPass' type="password" class="form-control bg-light border-0 px-4" placeholder="Contraseña" style="height: 55px;">
                            </div> 
                            <div class="col-sm-12">
                                <button class="btn btn-primary w-100 py-3" type="submit">INICIAR SESION</button>
                            </div>
                            <div id='res'></div>
                        </div>
                    </form><br><br><br><br>
                </div>
            </div>
        </div>
    </div>

<?php include('inc_footer.php');?>    
</body>
</html>
<script>
$('form').on('submit', function(event) {
  event.preventDefault();

  $.post('<?php echo PATH_HOME.'indlogin/'.md5(uniqid()); ?>',{
    'uss': $('#txtUser').val(),
    'pss': $('#txtPass').val(),
    'coder': '<?php echo sha1(uniqid()); ?>'
  },function(data){
    $('#res').html(data);
  });
  
});
</script>