Файловый менеджер - Редактировать - /home2/cocinasdalloway/lotes.cocinasdalloway.com/Administrador/Home/orders.php
Назад
<?php $IdUsuario=$_SESSION["lt_id"]; ?> <div class="page-title"> <div class="title_left"> <h3>Mis Lotes <small> <?php //echo $nombre_area;?></small></h3> </div> <div class="title_right"> <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search"> </div> </div> </div> <div class="clearfix"></div> <div class="row"> <div class="col-md-12"> <div class="x_panel"> <div class="x_content"> <div class="row"> <div class="col-sm-12"> <div class="card-box table-responsive"> <!--<table id="datatable-buttons" class="table table-striped table-bordered" style="width:100%">--> <table id="datatable-buttons1" class="table table-striped table-bordered" style="width:100%"> <thead> <tr> <th>#</th> <th>Estatus</th> <th>Lote</th> <th>Fraccionamiento</th> <th>Costo</th> <th>Cliente</th> <!-- <th>Vendedor</th> --> <th>Contrato</th> <th>Ver</th> </tr> </thead> <tbody> <?php $query_ordenes = " SELECT * FROM MedidasLotes WHERE idUsuario = '$IdUsuario'"; $consu_ordenes = $conexion -> query($query_ordenes); $cont=1; while($execu_ordenes = $consu_ordenes->fetch_array(MYSQLI_BOTH)){ $id_cliente = $execu_ordenes["idCliente"]; $id_fraccionamiento = $execu_ordenes["colonia"]; $costo = $execu_ordenes["costo"]; $estatus = $execu_ordenes["estatus"]; $nombreLote = $execu_ordenes["nombre"]; $query_colonia = " SELECT * FROM Colonias WHERE id = '$id_fraccionamiento'"; $consu_colonia = $conexion -> query($query_colonia); $execu_colonia = $consu_colonia->fetch_array(MYSQLI_BOTH); $nombreFraccionamiento = $execu_colonia["descripcion"]; $query_clientes = " SELECT * FROM clientes WHERE id = '$id_cliente'"; $consu_clientes = $conexion -> query($query_clientes); $execu_clientes = $consu_clientes->fetch_array(MYSQLI_BOTH); $nombre = $execu_clientes["nombre"]; $query_vendedor = " SELECT * FROM users WHERE id = '$id_vendedor'"; $consu_vendedor = $conexion -> query($query_vendedor); $execu_vendedor = $consu_vendedor->fetch_array(MYSQLI_BOTH); $nombreVendedor = $execu_vendedor["nombre"]; ?> <tr> <td><?php echo $cont;?></td> <td><?php echo $estatus;?></td> <td><?php echo $nombreLote;?></td> <td><?php echo $nombreFraccionamiento;?></td> <td><?php echo number_format($costo,2);?></td> <td><?php echo $nombre;?></td> <!-- <td><?php echo $nombreVendedor;?></td> --> <td style="text-align: center;"><?php if($id_cliente!=0){ ?> <a href="javascript:void(0)" onclick="GeneraContrato(<?php echo $execu_ordenes["id"]?>)"><i class="fa fa-cloud-download"></i></a> <?php } ?></td> <td style="text-align: center;"> <a href="../../ClientArea/index.php?Id=<?php echo $execu_ordenes["id"];?>" target="_blank" ><i class="fa fa-map-marker"></i></a> </td> </tr> <?php $cont++; } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> <script> $(document).ready(function() { $("#datatable-buttons1").DataTable({ order: [[4, 'desc']], "pageLength": 25, dom: "lBf", "buttons": [ { extend: 'collection', text: 'Exportar', buttons: [ 'copy', 'excel', 'csv', 'pdf', 'print' ], className: "btn btn-round btn-success" } ] }); }); function GeneraContrato(Id){ console.log(Id) $.ajax({ url: "GeneraContrato.php", type: "POST", dataType: "json", data: { id : Id }, success: function(response) { if(response.detail=='error'){ alert(response.message) }else{ // Descarga el archivo generado window.location.href = response.filename; } }, error: function(error) { console.error('Error al generar el documento:', error); } }); } </script>
| ver. 1.4 |
Github
|
.
| PHP 8.2.22 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка