<?php
session_start();
require_once('conexion.php');
require_once('include/sesiones.php');
if (isset($_SESSION['clie_id']))
{
  
?>
<!DOCTYPE html>
<html lang="en">
  <head>
  <?php
    include ('head.php');
  ?>
   
<script type="text/javascript">
$(document).ready(function() {  
  $('#clie_cc').blur(function(){
    
    $('#Info').html('<img src="img/loader.gif" alt="" height="20px"  />').fadeOut(1000);

    var clie_cc = $(this).val();    
    var dataString = 'clie_cc='+clie_cc;
    
    $.ajax({
            type: "POST",
            url: "verificar/verificar_cliente.php",
            data: dataString,
            success: function(data) {
        $('#Info').fadeIn(1000).html(data);
        //alert(data);
            }
        });
    });              
});    
</script>
  <script>
   function miFuncion() {
       load(1);
    }
  </script>
 </head>
<body  onload="miFuncion();">
<?php
 

  $configuracion="";
  $cotizacion="";
  $clientes="active";

  include ('menu.php');
?> 
    
<div class="main">
 <div class="">
      <div class="" >
      <div class="col-md-2">        
        <?php include ('include/menu_ventas.php');?>
      </div> <!-- /span3 -->
      <div class="col-md-10">  
        <div class="widget stacked">
          <div class="widget-content">
             <div class="panel panel-default">
                <div class="panel-body">
                    <h1 class="panel-title pull-left" style="font-size:20px;"><i class="fas fa-industry fa-2x"></i> CLIENTES</h1>
                </div>
            </div>
            <div class="widget stacked">
              <div class="widget-content">
                <section id="buttons">
                  <div class="col-md-8">
                    <a class="btn btn-info " data-toggle="modal" href="#nuevocliente"><i class="icon-plus"></i> Nuevo</a>
                  </div>
                  <div class="col-md-4">
                    <input  type="text" class="form-control" placeholder="Buscar Cliente" id="q" onKeyUp='load(1);' autofocus>
                  </div>
                </section>
              </div>
            </div>
              <center> <span id="loader"></span></center>
              <div id="resultados"></div><!-- Carga los datos ajax -->
              <div class='outer_div'></div><!-- Carga los datos ajax -->
          </div> <!-- /widget-content -->
        </div> <!-- /widget --> 
      </div> <!-- /span6 -->
    </div> <!-- /container -->
  </div> 
</div><!-- /main -->
<?php 
  include ('php_clientes/form_nuevo_cliente.php');
  include ('php_clientes/form_modificar_cliente.php');

  include ('script.php');
?>
<script type="text/javascript" src="php_clientes/ajax.js"></script>

  </body>
</html>
<?php

}
else
{
    echo '<script>location.href = "index.php";</script>';
}
?>
