<div id="tarifas" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title"> BUSCADOR POR TARIFA</h4>
            </div>
            <div class="modal-body">
                <form method="get" action="libraries/pdf/pdf_reportes/cliente_x_tarifa.php" target="_blank">
                    <label>Tarifas</label>
                    <select name="tarifa" id="tarifa" class="form-control name_list" required>
                        <?php
                            $datos = mysqli_query($con,"SELECT * FROM tarifas where empresa='$empresa' ") ;
                            while( $fila = mysqli_fetch_array( $datos ) )
                            {
                            echo' <option value="'.$fila['tar_id'].'">'.$fila['tar_nombre'].'</option>';
                            }
                        ?>
                    </select>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
                        <button type="submit"  class="btn btn-danger" name="reporte_contacto_iva" value="reporte_contacto_iva" id="reporte_contacto_iva" dir="libraries/pdf/pdf_reportes/contactos_cliente_x_tarifa.php">PDF</button>
                        <button type="submit" class="btn btn-success" name="reporte_contacto_iva2" value="reporte_contacto_iva2" id="reporte_contacto_iva2"  dir="libraries/php_excel/excel_contactos_clientes_tarifas.php">EXCEL</button>
                    </div>
                </form>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div> 
</div>

<div id="proveedores" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title"> BUSCADOR PROVEEDORES</h4>
            </div>
            <div class="modal-body">
                <form method="get" action="libraries/pdf/pdf_reportes/cliente_x_tarifa.php" target="_blank">
                    <label>PROVEEDORES</label>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
                        <button type="submit" class="btn btn-danger" name="reporte_contacto_prove" value="reporte_contacto_prove" id="reporte_contacto_prove" dir="libraries/pdf/pdf_reportes/contactos_proveedores.php">PDF</button>
                        <button type="submit" class="btn btn-success" name="reporte_contacto_prove2" value="reporte_contacto_prove2" id="reporte_contacto_prove2" dir="libraries/php_excel/excel_contactos_proveedores.php">EXCEL</button>
                    </div>
                </form>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div> 
</div>
<div id="clientes" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title"> BUSCADOR POR BARRIO</h4>
            </div>
            <div class="modal-body">
                <form method="get" action="libraries/pdf/pdf_reportes/contactos_cliente_x_barrio.php" target="_blank">
                    <label>Barrio</label>
                    <input type="text" class="form-control" value="" name="barrio" autocomplete="off" >
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
                        <button type="submit" class="btn btn-info" name="buscador" value="buscador" id="buscador">Buscar</button>
                    </div>
                </form>
            </div>
        </div> 
    </div> 
</div>
<!-- script para formulario con dos botones y redireccionamiento a paginas desde boton-->
<script type="text/javascript">
$(document).ready(function()
{
  $("button[type=submit]").click(function()
   {
    var accion = $(this).attr('dir');

    $('form').attr('action', accion);
  
   });
  
});
</script> 