<?php
require_once('conexion.php');
session_start();
require_once('include/sesiones.php');
if (isset($_SESSION['clie_id']))
{
    

 
?>
<!DOCTYPE html>
<html lang="en">
  <head>
  <?php
    include ('head.php');
  ?>
  </head>
<body>
<?php
  $configuracion="";
  $cotizacion="active";
  $clientes="";

  include ('menu.php');
?> 
<div class="main">
 <div class="">
      <div class="" >
      <div class="col-md-2"> 
         <?php include ('include/menu_ventas.php');?>
      </div> <!-- /span6 -->
        <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-file fa-2x"></i> COTIZACIONES</h1>
                </div>
            </div>
                 <?php include ('php_cotizaciones/editar_cliente.php'); ?>
              <div class="widget stacked">
                <div class="widget-content">
                  <section id="buttons">
                    <div class="col-md-9">
                      <a class="btn btn-info " href="V_registrar_cotizacion.php"><i class="icon-plus"></i> Nuevo</a>
                    </div>
                   
                     <div class="col-md-3">
                      <input id="q" type="text" class="form-control input-sm "  placeholder="Buscador" onkeyup='load(1);' autofocus>
                    </div>
                   
                  </section>
                </div> <!-- /widget-content -->
              </div> <!-- /widget --> 
              <div class="table-responsive">
                <center> <span id="loader"></span></center>
                <div id="resultados"></div><!-- Carga los datos ajax -->
                <div class='outer_div'></div><!-- Carga los datos ajax -->
              </div>
            </div> <!-- /widget-content -->
          </div> <!-- /span6 -->
        </div> <!-- /row -->
      </div> <!-- /container -->
    </div> <!-- /main -->
  </div> 
<script type="text/javascript" src="php_cotizaciones/ajax.js"></script>   
<script type="text/javascript" src="js/VentanaCentrada.js"></script>
<script>
   function enviar_email(cot_id){
      VentanaCentrada('./pdf_inv/email_cotizacion.php?cot_id='+cot_id,'Factura','','800','600','true');
    }
</script>
      <script>
    $( "#enviar_cotizacion" ).submit(function( event ) {
      $('#guardar_datos').attr("disabled", true);
      
     var parametros = $(this).serialize();
       $.ajax({
          type: "POST",
          url: "./pdf/documentos/mail_cotizacion.php",
          data: parametros,
           beforeSend: function(objeto){
            $(".resultados_ajax").html("Mensaje: Cargando...");
            },
          success: function(datos){
          $(".resultados_ajax").html(datos);
          $('#guardar_datos').attr("disabled", false);
          
          }
      });
      event.preventDefault();
    })
  </script>
    <script>
    $(setup)
    function setup() {
      $('#intro select').zelect({ placeholder:'' })
    }
  </script>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<?php
 
  include ('script.php');
?>
  </body>
</html>
<?php

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