Файловый менеджер - Редактировать - /home2/cocinasdalloway/public_html/administrador/models/clients/LoadDetalle.php
Назад
<?php @session_start(); if(isset($_SESSION["ad_id"])){ date_default_timezone_set('America/Mexico_City'); $hoy=date('Y-m-d H:i:s'); //Archivo de Configuracion include("../connection/config.php"); mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); try{ //Crear Objeto para conexion $conexion = new mysqli($host, $user, $pass, $db); } catch (Exception $e) { //echo $e->getMessage(); $arr = array('status' => 200, 'detail' => 'error', 'message' => 'Error de conexión. Contacte a TI'); echo json_encode($arr); exit; } $id=$_POST['Id']; $query_clientes = " SELECT * FROM clientes WHERE id = $id "; $consu_clientes = $conexion -> query($query_clientes); $conta_clientes = mysqli_num_rows($consu_clientes); $execu_clientes = $consu_clientes->fetch_array(MYSQLI_BOTH); $inputHidden='<input type="hidden" name="idCliente" id="idCliente" value="'.$id.'"/>'; $inputNombre='<input name="nombre" id="nombre" value="'.$execu_clientes['nombre'].'" maxlength="100"/>'; $inputPaterno='<input name="paterno" id="paterno" value="'.$execu_clientes['a_paterno'].'" maxlength="80"/>'; $inputMaterno='<input name="materno" id="materno" value="'.$execu_clientes['a_materno'].'" maxlength="80"/>'; $inputEmail='<input type="email" name="email" id="email" value="'.$execu_clientes['correo'].'" placeholder="Email" maxlength="200"/>'; $inputPassword='<input name="password" id="password" value="'.$execu_clientes['pass'].'" maxlength="50" />'; $selected4=""; $selected5=""; if($execu_clientes['activo']=='si'){ $selected4="selected"; } if($execu_clientes['activo']=='no'){ $selected5="selected"; } $selectActivo='<select name="activo" id="activo"> <option value="si" '.$selected4.'>Si</option> <option value="no" '.$selected5.'>No</option> </select>'; $selected6=""; $selected7=""; $table= '<form class="card-body d-flex flex-column" name="formDetail" id="formDetail" action="" > <table width="80%" cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;"> <tr> <td>Nombre:</td> <td>'.$inputNombre.'</td> <td>A. Paterno:</td> <td>'.$inputPaterno.'</td> <td>A. Materno:</td> <td>'.$inputMaterno.'</td> </tr> <tr> <td>Correo:</td> <td>'.$inputEmail.'</td> <td>Pass:</td> <td>'.$inputPassword.'</td> <td>Activo:</td> <td>'.$selectActivo.'</td> </tr> <tr> <td colspan="6" style="vertical-align: bottom;"><input class="mt-auto btn btn-block btn-primary btn-sm" readonly id="but_update" value="Actualizar Generales"/></td> </tr> </table> '.$inputHidden.' </form>'; $arr = array('status' => 100, 'detail' => 'success', 'message' => 'Informacion correcta', 'data' => $table); echo json_encode($arr); }else{ $arr = array('status' => 200, 'detail' => 'error', 'message' => 'No existe la sesion'); echo json_encode($arr); } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.22 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка