function buscarProd($fecha_uno, $fecha_dos) { $con = new Database(); $sql = "select * from productos where fecha_alta BETWEEN '" . $fecha_uno . " 00:00:00' and '" . $fecha_dos . " 23:59:59'"; $con->Query($sql); $html = "<table class='tabla-prod table table-hover table-condensed' id='example'>\n\t <thead>\n\t <tr>\n\t <th></th>\n\t <th>Nombre del producto</th>\n\t <th>Fecha de ingreso</th>\n\t <th>Opciones</th>\n\t </tr>\n\t </thead>\n\t <tbody>"; while ($fila = $con->NextRow()) { $html .= "<tr><td></td>"; $html = $html . "<td>" . $fila['nombre'] . "</td>" . "<td>" . $fila['fecha_alta'] . "</td>"; $html = $html . "<td>\n\t\t\t\t\t\t<button type='button' class='btn btn-warning btn-sm btn-small' data-toggle='modal' data-target='#miventana' onclick='cargarProductoAModificar(" . $fila['id_pdt'] . ")'>Modificar</button>\n\t\t\t\t\t\t<button type='button' class='btn btn-danger btn-sm btn-small' data-toggle='modal' onclick='deleteProd(" . $fila['id_pdt'] . ")'>Eliminar</button>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>"; } $html = $html . "</tbody></table>"; sleep(1); echo $html; }
function buscarEmpleado($fecha_inicio, $fecha_fin, $sucursal) { $con = new Database(); $sql = "select * from empleados where sucursal=" . $sucursal . " and fecha_alta BETWEEN '" . $fecha_inicio . "00:00:00' and '" . $fecha_fin . " 23:59:59'"; // echo $sql; $con->Query($sql); $html = "<table class='table table-hover table-condensed' id='example'>\n\t <thead>\n\t <tr>\n\t <th>Nombre</th>\n\t <th>Apellido Paterno</th>\n\t <th>Apellido Materno</th>\n\t <th>Nacionalidad</th>\n\t <th>Estatus</th>\n\t <th>Opciones</th>\n\t </tr>\n\t </thead>\n\t <tbody>"; while ($fila = $con->NextRow()) { $html .= "<tr>"; $html = $html . "<td>" . $fila['nombre'] . "</td>" . "<td>" . $fila['apd_paterno'] . "</td>" . "<td>" . $fila['apd_materno'] . "</td>" . "<td>" . $fila['nacionalidad'] . "</td>" . "<td>" . $this->tipoEstatus($fila['status']) . "</td>"; $html = $html . "<td>\n\t\t\t\t\t\t\t<a href='../view/modificarEmpleado2.php?id_empleado=" . $fila['id_empleado'] . "' data-toggle='tooltip' title='MODIFICAR EMPLEADO' class='btn btn-success'> <i class='fa fa-edit'></i></a>\n\t\t\t\t\t\t\t<a href='../view/nuevoFamiliar.php?id_empleado=" . $fila['id_empleado'] . "' data-toggle='tooltip' title='AGREGAR FAMILIAR DE EMPLEADO' class='btn btn-info'> <i class='fa fa-group'></i></a>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>"; } $html = $html . "</tbody></table>"; sleep(1); echo $html; }
function listaEmpleados($fecha_uno, $fecha_dos) { $con = new Database(); $sql = "select * from empleados where fecha_alta BETWEEN '" . $fecha_uno . " 00:00:00' and '" . $fecha_dos . " 23:59:59'"; // $sql = "select * from empleados"; $con->Query($sql); $html = "<table class='tabla-prod table table-hover table-condensed' id='example'>\n\t <thead>\n\t <tr>\n\t <th></th>\n\t <th>Nombre del producto</th>\n\t <th>Apellido Paterno</th>\n\t <th>Apellido Materno</th>\n\t <th>Nacionalidad</th>\n\t <th>Estatus</th>\n\t <th>Opciones</th>\n\t </tr>\n\t </thead>\n\t <tbody>"; while ($fila = $con->NextRow()) { $html .= "<tr><td></td>"; $html = $html . "<td>" . $fila['nombre'] . "</td>" . "<td>" . $fila['apd_paterno'] . "</td>" . "<td>" . $fila['apd_materno'] . "</td>" . "<td>" . $fila['nacionalidad'] . "</td>" . "<td>" . $this->tipoEstatus($fila['status']) . "</td>"; $html = $html . "<td>\n\t\t\t\t\t\t\t<button type='button' class='btn btn-warning btn-sm btn-small' data-toggle='modal' data-target='#miventana' onclick='cargarEmpleadoAModificar(" . $fila['id_empleado'] . ")'>Modificar</button>\n\t\t\t\t\t\t\t<button type='button' class='btn btn-info btn-sm btn-small' data-toggle='modal' onclick='deleteProd(" . $fila['id_empleado'] . ")'>Consultar Historico</button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>"; } $html = $html . "</tbody></table>"; sleep(1); echo $html; }
<?php session_start(); if (empty($_SESSION["sqPLD"])) { header("Location: ../"); } $id_bitacora = $_POST['id_bitacora']; include_once "../model/mConexion.php"; $con = new Database(); $sql = "SELECT * FROM bitacora WHERE asiento= {$id_bitacora}"; $con->Query($sql); while ($fila = $con->NextRow()) { ?> <!--INICIO ELEMENTOS--> <div class="row"> <div class="col-md-12"> <div class="grid simple"> <div class="grid-title no-border"> <div class="tools"> <a href="javascript:;" class="collapse"></a> <a href="#grid-config" data-toggle="modal" class="config"></a> <a href="javascript:;" class="reload"></a> <a href="javascript:;" class="remove"></a> </div> </div> <!-- Inicio formulario --> <div class="grid-body no-border"> <div class="row"> <div class="clearfix"></div> <form class="formulario" id="formulario"> <div class="row"> <div class="col-md-4"> <div class="form-group"> <label class="form-label">FECHA Y HORA DE LA ACCION</label> <input id='name'type='text' class='form-control' disabled required <?php
<?php session_start(); if (empty($_SESSION["sqPLD"])) { header("Location: ../"); } $id_pdt = $_POST['id_pdt']; include_once "../model/mConexion.php"; $con = new Database(); $sql = "SELECT * FROM productos WHERE id_pdt= {$id_pdt}"; $con->Query($sql); while ($fila = $con->NextRow()) { ?> <!--INICIO ELEMENTOS--> <div class="row"> <div class="col-md-12"> <div class="grid simple"> <div class="grid-title no-border"> <div class="tools"> <a href="javascript:;" class="collapse"></a> <a href="#grid-config" data-toggle="modal" class="config"></a> <a href="javascript:;" class="reload"></a> <a href="javascript:;" class="remove"></a> </div> </div> <!-- Inicio formulario --> <div class="grid-body no-border"> <div class="row"> <div class="clearfix"></div> <form class="formulario" id="formulario"> <div class="col-md-4"> <div class="form-group"> <label class="form-label">Nombre del producto</label> <div class="input-with-icon "> <?php
<h2>Reservations/Contact</h2> <form method="POST" action="Reserva.php" enctype="multipart/form-data" class="comment-form" id="frmReserva" name="frmReserva"> <div class="wrap" id="IdReservaciones"> <div class="one_half "> <p class="comment-form-comment"> <label for="comment">Full name/s (Separated by enter)</label> <textarea id="nombre" name="nombre" cols="45" rows="4" aria-required="true"></textarea> </p> <p class="comment-form-comment"> <label for="comment">Hotel</label> <select id="hotel" name="hotel" class="ui-widget"> <?php $SHoteles = "SELECT * FROM cs_hoteles"; $db->Query($SHoteles); $NumHoteles = $db->NumRows(); for ($i = 0; $i < $NumHoteles; $i++) { $row = $db->NextRow(); ?> <option value="<?php echo $row['id_cs_hotel']; ?> "><?php echo $row['nombre']; ?> </option> <?php } ?> </select> </p> <p class="comment-form-comment">
function creditoSalario($id_cliente, $id_usuario, $monto) { //inconsistencia crédito-salario $con = new Database(); $sql = "select c.ingreso from clientes_empleos as c where c.id_clte={$id_cliente};"; $con->Query($sql); while ($row = $con->NextRow()) { $ingreso = $row['ingreso']; } $limite_ingreso = $ingreso / 4; $limite_ingreso = $ingreso - $limite_ingreso; // echo $limite_ingreso; if ($monto < $limite_ingreso) { return true; } else { $this->regAlertaAutoExpe("INCONSISTENCIA CRÉDITO-SALARIO", "", "", "", "", $id_cliente, "", $id_usuario, 3, 1, "EL MONTO A PAGAR QUINCENALMENTE POR PARTE DEL CLIENTE ES MAYOR DE LA TERCERA PARTE DE SU INGRESO", "SISTEMA", 9, 9); // $this->regAlertaAutoExpe("INCONSISTENCIA CRÉDITO-SALARIO","","","","",$id_cliente,"",$id_usuario,3,1,"EL MONTO A PAGAR QUINCENALMENTE POR PARTE DEL CLIENTE ES MAYOR DE LA TERCERA PARTE DE SU INGRESO",9,9); return false; } }
public function cargarMenu() { $query = "Select md.nombre, md.ruta, m.nombre as menu, m.idMenu from tblusuariopermisos as up join tblmenudetalle as md on up.idPermiso = md.idMenuDetalle join tblmenu as m on m.idMenu = md.idMenu WHERE up.idUsuario =" . $this->idUsuario . " order by m.idMenu, md.orden"; $con = new Database(); $con->Query($query); ?> <ul> <li class="classic"> <a href="index"> <span class="semi-bold">Inicio</span> </a> </li> <?php $idMenu = 0; $cierre = false; $fin = $con->NumRows(); $i = 1; while ($fila = $con->NextRow()) { if ($idMenu != $fila["idMenu"]) { if ($idMenu != 0) { ?> </ul> </li> <?php $cierre = false; } $idMenu = $fila["idMenu"]; ?> <li class="classic"> <a href="javascript:;"> <span class="semi-bold"><?php echo $fila["menu"]; ?> </span> <span class="arrow"></span> </a> <ul class="classic"> <?php } ?> <li> <a href="<?php echo $fila["ruta"]; ?> "> <?php echo utf8_encode($fila["nombre"]); ?> </a> </li> <?php if ($fin == $i) { ?> </ul> </li> <?php } $i++; } ?> </ul> <?php }
function deletePagoAmortizacion($diferencia, $id_contrato, $num) { $con = new Database(); $sql = "select (max(p.asiento)- {$num}) as asiento from tabla_amortizacion as p where p.id_contrato='{$id_contrato}' and p.status_pago=1;"; $con->Query($sql); while ($row = $con->NextRow()) { $asiento = $row['asiento']; //obtengo el id o asiento del ultimo pago pagado en la tabla de amortización para poder restarle lo eliminado } $sql = "select (p.saldo_insoluto + " . $diferencia . ") as saldo_insoluto,p.saldo_insoluto_inicial,(pm.pago_mayor - " . $diferencia . ")as pago_mayor from tabla_amortizacion as p,pagos_mayores as pm where p.asiento={$asiento} and pm.id_tabla_amortizacion=p.asiento;"; $con->Query($sql); while ($row = $con->NextRow()) { $pago_mayor = $row['pago_mayor']; $saldo_insoluto = $row['saldo_insoluto']; $saldo_insoluto_inicial = $row['saldo_insoluto_inicial']; } if ($pago_mayor >= 0) { $sql = "update pagos_mayores set pago_mayor={$pago_mayor} where id_tabla_amortizacion={$asiento};"; echo $sql; $con->Query($sql); $sql = "update tabla_amortizacion set saldo_insoluto={$saldo_insoluto} where asiento={$asiento};"; $con->Query($sql); $this->recalcularDatos($asiento, $id_contrato); //vuelvo a calcular el saldo pero del pago anterior $diferencia = 0; } if ($pago_mayor < 0) { $sql = "update pagos_mayores set pago_mayor=0 where id_tabla_amortizacion={$asiento};"; $con->Query($sql); $sql = "update tabla_amortizacion set saldo_insoluto={$saldo_insoluto_inicial},status_pago=-1 where asiento={$asiento};"; $con->Query($sql); $this->recalcularDatos($asiento, $id_contrato); $diferencia = $pago_mayor; } return $diferencia; }