<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $crud->setConsulta("select * from empleado where cedula='{$_GET['uid']}'"); $crud->seleccionar(); $datos_con = $crud->seleccionar($con->getConection()); $dep = $datos_con[0]['departamento_id']; ?> <div id="datos"> <h2 style="margin-top:5px">Editar</h2> <input type="hidden" name="iden2" id="iden2" value="<?php echo $_GET['uid']; ?> " class="ancho" /> <p> <label>Primer Apellido: <input name="apellido_uno" id="apellido_uno" type="text" class="ancho" value="<?php echo $datos_con[0]['apellido1']; ?> "> </input> </label> </p>
<?php session_start(); include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $array[0] = "'{$_POST['select_cliente']}','{$_POST['select_dpto']}','{$_POST['select_municipio']}','{$_POST['select_sucursal']}','{$_POST['puesto']}'"; $campos = "cliente_id,departamento_id,municipio_id,sucursal_id,puesto_nombre"; $tabla = "puesto"; $crud->insertar($array, $campos, $tabla, $con->getConection(), 'Puesto Ingresado Exitosamente.'); $con->desconectar();
<!DOCTYPE html> <?php include '_include/configuration.php'; include '_classes/conectar.php'; include '_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); session_start(); if (isset($_SESSION['user_authorized'])) { session_destroy(); } if (isset($_POST['join'])) { $crud->setConsulta("select * from usuario where nick = '{$_POST['user']}' and password = '******'password']}' and estado = 'Activo'"); $datos1 = $crud->seleccionar($con->getConection()); if ($crud->getTuplas() > 0) { if ($datos1[0]['cambio_password'] == 0) { $_SESSION['user_authorized'] = true; $_SESSION['nom'] = $datos1[0]['nombre']; $_SESSION['apel'] = $datos1[0]['apellido']; $_SESSION['password'] = $datos1[0]['password']; $_SESSION['usuario'] = $datos1[0]['nick']; $_SESSION['rol'] = $datos1[0]['perfil']; $_SESSION['id'] = $datos1[0]['id']; $_SESSION['cambio'] = $datos1[0]['cambio_password']; ?> <script type="text/javascript"> window.location.href = "pages/examples/usuarios.php"; </script>
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; include "../_classes/intersecto.php"; session_start(); $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); //para sacar el subsidio de transporte actual $crud_sub = new Crud(); $crud_sub->setConsulta('select monto as sub_trans from sub_transp where year = (select year(curdate()))'); $datos_t = $crud_sub->seleccionar($con->getConection()); $sub_t = round($datos_t[0]['sub_trans'] / 30); $tot_recs_noct = 0; // header("Cache-Control: no-cache, must-revalidate"); ?> <!-- Clientes sin marca asignada --> <input type="hidden" name="iden" id="iden" /> <!-- <div id="botonera_e"> <input type="button" name="eliminar2" id="eliminar2" value="Eliminar" onclick="javascript:delete_clients()" />
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; session_start(); $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $cadena = str_replace("festivo_id=on or", "", $_POST['condition']); $crud->eliminar("festivo", $con->getConection(), "{$cadena}", "Fecha eliminada exitosamente."); $con->desconectar();
<?php include '_include/configuration.php'; include '_classes/conectar.php'; include '_classes/crud.php'; session_start(); $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $array[0] = "'{$_POST['nombre']}','{$_POST['apellido']}','{$_POST['password']}','{$_POST['nick']}','{$_POST['perfil']}','{$_POST['tipo_usuario']}','{$_POST['activo_usuario']}'"; $campos = "usuario_nombre,usuario_apellido,usuario_password,usuario_nick,usuario_tipo,usuario_perfil,usuario_active"; $tabla = "usuario"; $crud->insertar($array, $campos, $tabla, $con->getConection(), 'Usuario guardado exitosamente.'); $con->desconectar(); ?>
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; session_start(); $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $cadena = str_replace("minimo_id=on or", "", $_POST['condition']); $crud->eliminar("minimo", $con->getConection(), "{$cadena}", "Monto eliminado exitosamente."); $con->desconectar(); ?>
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; session_start(); $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $cadena = str_replace("novedad_id=on or", "", $_POST['condition']); $crud->eliminar("novedad", $con->getConection(), "{$cadena}", "Novedades eliminadas exitosamente."); $con->desconectar();
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $mensaje = 'Cliente Actualizado Con Exito.'; $crud->update("update cliente set cliente_nit='{$_POST['nit']}',cliente_nombre ='{$_POST['nombre']}',\n cliente_direccion='{$_POST['direccion']}',cliente_telefono='{$_POST['telefono']}',cliente_email='{$_POST['email']}',\ncliente_web ='{$_POST['web']}',contacto_nombre='{$_POST['c_nombre']}',contacto_telefono='{$_POST['c_telefono']}',contacto_email = '{$_POST['c_email']}'\n where cliente_id ='{$_POST['iden2']}' \n \t", $mensaje, $con->getConection()); ?>
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; session_start(); $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $cadena = str_replace("municipio_id=on or", "", $_POST['condition']); $crud->eliminar("municipio", $con->getConection(), "{$cadena}", "Municipios eliminados exitosamente."); $con->desconectar();
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $mensaje = 'Departamento Actualizado Con Exito.'; $crud->update("update departamento set departamento_nombre= '{$_POST['nombre']}' where departamento_id='{$_POST['iden2']}'", $mensaje, $con->getConection()); ?>
<?php session_start(); include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $array[0] = "'{$_POST['select_cliente']}','{$_POST['select_dpto']}','{$_POST['select_municipio']}','{$_POST['nombre']}','{$_POST['direccion']}',\n '{$_POST['telefono']}','{$_POST['suc_contacto']}','{$_POST['email_contacto']}','{$_POST['tel_contacto']}'"; $campos = "cliente_id,departamento_id,municipio_id,sucursal_nombre,sucursal_direccion,sucursal_telefono,sucursal_contacto_nombre\n,sucursal_contacto_email,sucursal_contacto_telefono"; $tabla = "sucursal"; $crud->insertar($array, $campos, $tabla, $con->getConection(), 'Sucursal Ingresada Exitosamente.'); $con->desconectar();
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; include '../_classes/logueo.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud2 = new Crud(); $fecha = date("Y-m-d"); $time = date("H:i:s"); $day = date("w"); //se mira si la persona existe en la base de datos $crud2->setConsulta("SELECT cedula AS existe, tipo_usuario FROM empleado e WHERE e.`cedula`='{$_POST['usuario']}'"); $datos2 = $crud2->seleccionar($con->getConection()); if ($datos2[0]['existe'] > 0) { //se miran cuantos logueos lleva la persona en el día $crud3 = new Crud(); if ($datos2[0]['tipo_usuario'] == '1' || $datos2[0]['tipo_usuario'] == '2') { $crud3->setConsulta(" SELECT log_id, tipo_log FROM logeo WHERE log_id=(SELECT MAX(log_id) FROM logeo WHERE cedula ='{$_POST['usuario']}')"); $datos1 = $crud3->seleccionar($con->getConection()); } else { $crud3->setConsulta("SELECT COUNT(log_id)AS entradas FROM logeo WHERE fecha= '{$fecha}' AND cedula ='{$_POST['usuario']}'"); $datos1 = $crud3->seleccionar($con->getConection()); } //ingresar según las veces que se haya logueado $log = new logueo($fecha, $datos2[0]['tipo_usuario'], $time, $datos1[0]['entradas'], $_POST['usuario'], $datos1[0]['tipo_log'], $day); $log->registrar_ingreso(); $sw = $log->getSw(); if ($sw != 1) { $array1[0] = $log->getArray();
<?php session_start(); include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $fecha = date('Y-m-d'); $array[0] = "'COTIZADO','{$fecha}','{$_SESSION['id']}','{$_POST['condition']}'"; $campos = "estado,fecha_creacion,creada_por,cliente_id"; $tabla = "cotizacion"; $mensaje = "Solicitud creada con exito."; $crud->insertar($array, $campos, $tabla, $con->getConection(), $mensaje); ?>
<?php session_start(); if (!isset($_SESSION['user_authorized'])) { header("Location:index.php"); } header('Content-Type: text/html; charset=ISO-8859-1'); include '_include/configuration.php'; include '_classes/conectar.php'; include '_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); switch ($_GET['uid2']) { case 1: $var = '1'; $titulo = "<h3>PRE-MATEMÁTICAS:</h3>"; $contenido = ' <li>Adpatción</li> <li>Color: amarillo.</li> <li>Figura: Círculo.</li> <li>Noción: Ariba - Abajo.</li> '; break; case 2: $var = '2'; $titulo = "<h3>PRE-ESCRITURA:</h3>"; $contenido = ' <li>Garabateo libre</li>
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; session_start(); $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $cadena = str_replace("puesto_id=on or", "", $_POST['condition']); $crud->eliminar("puesto", $con->getConection(), "{$cadena}", "Puestos eliminados exitosamente."); $con->desconectar();
<?php session_start(); include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $crud->update("update usuario set usuario_nombre ='{$_POST['nombre']}',usuario_apellido='{$_POST['apellido']}',usuario_nick='{$_POST['nick']}'\n ,usuario_password='******'password']}',usuario_tipo='{$_POST['tipo_usuario']}',usuario_active='{$_POST['estado_usuario']}' where usuario_id = '{$_POST['iden2']}'", "Usuario Exitosamente Actualizado.", $con->getConection()); $con->desconectar();
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $mensaje = 'Turno acutalizado con exito.'; $crud->update("update turno set turno_nombre='{$_POST['nombre']}', turno_descripcion ='{$_POST['descrip']}',\n dias_laborales='{$_POST['dl']}', dias_descanso ='{$_POST['dd']}',dtd='{$_POST['dtd']}', r_ini_d ='{$_POST['inidia']}',\n r_fin_d='{$_POST['findia']}', dtn ='{$_POST['dtn']}',r_ini_n='{$_POST['ininoche']}', r_fin_n ='{$_POST['finnoche']}',\n tp_jornada='{$_POST['tp_j']}', inicio_turno ='{$_POST['tipo_inicio']}' where turno_id ='{$_POST['iden2']}' \n \t", $mensaje, $con->getConection()); $con->desconectar(); ?>
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $crud2 = new Crud(); $crud2->setConsulta("SELECT * FROM sucursal WHERE sucursal_id = '{$_GET['uid']}'"); $datos2 = $crud2->seleccionar($con->getConection()); $dep = $datos2[0]['departamento_id']; ?> <div id="datos" > <h2 style="margin-top:5px">Editar Sucursales</h2> <input type="hidden" name="iden2" id="iden2" value="<?php echo $_GET['uid']; ?> " class="ancho" /> <p> <label> Seleccione Cliente <select name="select_cliente" type="text" id="select_cliente" class="ancho"> <?php $crud_cliente = new Crud(); $crud_cliente->setConsulta("SELECT cliente_id,cliente_nombre FROM cliente ORDER BY cliente_nombre ASC"); $datos_cliente = $crud_cliente->seleccionar($con->getConection());
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $mensaje = 'Empleado actualizado con exito.'; $crud->update("update empleado set apellido1='{$_POST['apellido_uno']}', apellido2 ='{$_POST['apellido_dos']}',\n nombre1 = '{$_POST['nombre_uno']}',nombre2='{$_POST['nombre_dos']}',cedula= '{$_POST['cedula']}',departamento_id ='{$_POST['departamento_id']}',\n municipio_id = '{$_POST['select_municipio']}',direccion = '{$_POST['direccion']}', barrio= '{$_POST['barrio']}',\n telefono_fijo = '{$_POST['telefono_fijo']}',celular ='{$_POST['celular']}',email= '{$_POST['email']}',cargo ='{$_POST['cargo']}'\n ,tipo_sangre='{$_POST['tipo_sangre']}' where cedula ='{$_POST['iden2']}' ", $mensaje, $con->getConection()); ?>
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; session_start(); $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); // header("Cache-Control: no-cache, must-revalidate"); $consulta = "UPDATE minimo SET fecha ='{$_POST['year']}', minimo_monto ='{$_POST['monto']}'\nWHERE minimo_id='{$_POST['iden2']}'"; $mensaje = "Monto Actualizado con exito."; $crud->update($consulta, $mensaje, $con->getConection()); $con->desconectar();
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; session_start(); $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $cadena = str_replace("categoria_id=on or", "", $_POST['condition']); $crud->eliminar("usuario", $con->getConection(), "{$cadena}", "Usuarios eliminados exitosamente."); $con->desconectar();
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $ruta = 'Files/' . $_POST['condition']; $crud->update("update ruta set ruta_url = '{$ruta}' where ruta_id ='{$_POST['condition2']}'", 'Actualizado con exito', $con->getConection());
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $crud2 = new Crud(); $crud3 = new Crud(); //sacar la provincia $crud2->setConsulta("SELECT id,nombre FROM provincia WHERE nombre ='{$_POST['provincia']}' "); $datos1 = $crud2->seleccionar($con->getConection()); // //sacar el distrito $crud3->setConsulta("SELECT id,nombre FROM distrito WHERE nombre ='{$_POST['distrito2']}' "); $datos2 = $crud3->seleccionar($con->getConection()); // $prov = $datos1[0]['id']; $dist = $datos2[0]['id']; if ($_POST['idocul'] == '') { $array[0] = "'{$_POST['nombre']}','{$prov}','{$dist}','{$_POST['direccion']}','{$_POST['email']}','{$_POST['telefono']}'"; $campos = "nombre,provincia_id,distrito_id,direcion,email,telefono"; $tabla = "sucursal"; $mensaje = "Sucursal Guardada con exito."; $crud->insertar($array, $campos, $tabla, $con->getConection(), $mensaje); } else { $crud->update("update sucursal set nombre = '{$_POST['nombre']}',provincia_id = '{$prov}',distrito_id = '{$dist}',direcion = '{$_POST['direccion']}',email = '{$_POST['email']}',telefono = '{$_POST['telefono']}' where id = '{$_POST['idocul']}'", 'Sucursal actualizada exitosamente.', $con->getConection()); } $con->desconectar(); ?>
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $crud3 = new Crud(); $cadena = "cotizacion_id = '{$_POST['refe']};'"; $crud3->eliminar("items", $con->getConection(), "{$cadena}", ""); $i = 1; $valores = ''; while ($i <= $_POST['contador']) { $tipo_serv = $_POST['tipo_serv_' . $i]; $descrip = $_POST['ocul_descr_' . $i]; $weblink = $_POST['ocul_link_' . $i]; $crud->moneda_dec($_POST['precio_' . $i]); $precio = $crud->getValor(); $cantidad = $_POST['cantidad_' . $i]; $crud->moneda_dec($_POST['costo_ship_' . $i]); $shipping = $crud->getValor(); $peso = $_POST['peso_' . $i]; $state = $_POST['state_tax_' . $i]; $crud->moneda_dec($_POST['pa_' . $i]); $precio_web = $crud->getValor(); $crud->moneda_dec($_POST['flete_' . $i]); $flete = $crud->getValor(); $crud->moneda_dec($_POST['subtotal_' . $i]); $total = $crud->getValor(); $cotizacion_id = $_POST['refe'];
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); if ($_POST['idocul'] == '') { $array[0] = "'{$_POST['cip_ruc']}','{$_POST['nombre']}','{$_POST['apellido']}','{$_POST['direccion']}','{$_POST['provincia']}','{$_POST['distrito2']}','{$_POST['telefono1']}','{$_POST['telefono1']}','{$_POST['email']}'"; $campos = "cip_ruc,nombre,apellido,direccion,provincia,distrito,telefono1,telefono2,email"; $tabla = "cliente"; $mensaje = "Cliente Guardado con exito."; $crud->insertar($array, $campos, $tabla, $con->getConection(), $mensaje); } else { $crud->update("update cliente set cip_ruc = '{$_POST['cip_ruc']}',nombre = '{$_POST['nombre']}',apellido = '{$_POST['apellido']}',direccion = '{$_POST['direccion']}',provincia = '{$_POST['provincia']}',distrito = '{$_POST['distrito2']}',telefono1 = '{$_POST['telefono1']}',telefono2 = '{$_POST['telefono2']}',email = '{$_POST['email']}' where id = '{$_POST['idocul']}'", 'Cliente actualizado exitosamente.', $con->getConection()); } $con->desconectar(); ?>
<?php session_start(); if (!isset($_SESSION['user_authorized'])) { header("Location:index.php"); } include '_include/configuration.php'; include '_classes/conectar.php'; include '_classes/crud.php'; $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html dir='ltr' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'> <head> <link href='http://fonts.googleapis.com/css?family=Clicker+Script' rel='stylesheet' type='text/css'/> <link href='http://fonts.googleapis.com/css?family=Oldenburg' rel='stylesheet' type='text/css'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <script type="text/javascript">(function() { (function(){function c(a){this.t={};this.tick=function(a,c,b){var d=void 0!=b?b:(new Date).getTime();this.t[a]=[d,c];if(void 0==b)try{window.console.timeStamp("CSI/"+a)}catch(e){}};this.tick("start",null,a)}var a;window.performance&&(a=window.performance.timing);var h=a?new c(a.responseStart):new c;window.jstiming={Timer:c,load:h};if(a){var b=a.navigationStart,e=a.responseStart;0<b&&e>=b&&(window.jstiming.srt=e-b)}if(a){var d=window.jstiming.load;0<b&&e>=b&&(d.tick("_wtsrt",void 0,b),d.tick("wtsrt_", "_wtsrt",e),d.tick("tbsd_","wtsrt_"))}try{a=null,window.chrome&&window.chrome.csi&&(a=Math.floor(window.chrome.csi().pageT),d&&0<b&&(d.tick("_tbnd",void 0,window.chrome.csi().startE),d.tick("tbnd_","_tbnd",b))),null==a&&window.gtbExternal&&(a=window.gtbExternal.pageT()),null==a&&window.external&&(a=window.external.pageT,d&&0<b&&(d.tick("_tbnd",void 0,window.external.startE),d.tick("tbnd_","_tbnd",b))),a&&(window.jstiming.pt=a)}catch(k){}})();window.tickAboveFold=function(c){var a=0;if(c.offsetParent){do a+=c.offsetTop;while(c=c.offsetParent)}c=a;750>=c&&window.jstiming.load.tick("aft")};var f=!1;function g(){f||(f=!0,window.jstiming.load.tick("firstScrollTime"))}window.addEventListener?window.addEventListener("scroll",g,!1):window.attachEvent("onscroll",g); })();</script> <meta content='blogger' name='generator'/> <link href='favicon.ico' rel='icon' type='image/x-icon'/> <link href='http://kiddiezshop-btemplates.blogspot.com/' rel='canonical'/> <link rel="alternate" type="application/atom+xml" title="Kiddiez Shop - Atom" href="http://kiddiezshop-btemplates.blogspot.com/feeds/posts/default" /> <link rel="alternate" type="application/rss+xml" title="Kiddiez Shop - RSS" href="http://kiddiezshop-btemplates.blogspot.com/feeds/posts/default?alt=rss" /> <link rel="service.post" type="application/atom+xml" title="Kiddiez Shop - Atom" href="https://www.blogger.com/feeds/6852192370751838918/posts/default" /> <link rel="me" href="https://www.blogger.com/profile/12349406774361643377" />
<?php include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; $con2 = new Coneccion($server, $user, $password, $dbname); $con2->conectar(); $crud2 = new Crud(); $crud2->setConsulta("SELECT\n puesto.`puesto_id`,puesto.`puesto_nombre`\n FROM\n `cliente`\n INNER JOIN `programacion` \n ON (`cliente`.`cliente_id` = `programacion`.`cliente_id`)\n INNER JOIN `departamento` \n ON (`departamento`.`departamento_id` = `programacion`.`departamento_id`)\n INNER JOIN `municipio` \n ON (`municipio`.`municipio_id` = `programacion`.`municipio_id`)\n INNER JOIN `sucursal` \n ON (`sucursal`.`sucursal_id` = `programacion`.`sucursal_id`)\n INNER JOIN `empleado` \n ON (`empleado`.`cedula` = `programacion`.`guarda_id`)\n INNER JOIN `turno` \n ON (`turno`.`turno_id` = `programacion`.`turno_id`)\n INNER JOIN `novedad` \n ON (`novedad`.`novedad_id` = `programacion`.`novedad_id`)\n INNER JOIN puesto ON (programacion.`puesto`=puesto.`puesto_id`) WHERE departamento.`departamento_id`= '{$_GET['uid1']}'\n AND municipio.`municipio_id`= '{$_GET['uid2']}' AND sucursal.`sucursal_id`='{$_GET['uid3']}'\n GROUP BY puesto.`puesto_id` \n ORDER BY puesto.`puesto_nombre` ASC"); $datos2 = $crud2->seleccionar($con2->getConection()); $i = 0; ?> <option value="" selected="selected">Escoja Opción</option> <?php while ($i < sizeof($datos2)) { ?> <option value="<?php echo $datos2[$i]['puesto_id']; ?> "><?php echo $datos2[$i]['puesto_nombre']; ?> </option> <?php $i++; } $con2->desconectar();
<?php include '_include/configuration.php'; include '_classes/conectar.php'; include '_classes/crud.php'; include_once 'mailer/class.phpmailer.php'; include_once 'mailer/class.smtp.php'; session_start(); $con = new Coneccion($server, $user, $password, $dbname); $con->conectar(); $crud = new Crud(); $crud2 = new Crud(); //verifico si hay o no un usuario con ese nick $crud2->setConsulta(" SELECT * from usuario WHERE usuario_nick ='{$_POST['usuario']}' and usuario_password = '******'passwordd']}' and usuario_active='1'"); $datos1 = $crud2->seleccionar($con->getConection()); if ($crud2->getTuplas() > 0) { $crud->update("update usuario set usuario_password = '******'confi_password']}' where usuario_nick = '{$_POST['usuario']}' ", "Clave cambiada Exitosamente.", $con->getConection()); } else { echo 'Verifique los datos ingresados.'; } $con->desconectar(); ?>
<?php session_start(); include '../_include/configuration.php'; include '../_classes/conectar.php'; include '../_classes/crud.php'; include '../_classes/pivote.php'; include '../_classes/generar_pro.php'; ?> <?php $con2 = new Coneccion($server, $user, $password, $dbname); $con2->conectar(); $crud2 = new Crud(); $crud2->setConsulta("SELECT turno_id,turno_nombre,turno_descripcion,dias_laborales,dias_descanso,dtd,dtn,inicio_turno,r_ini_d,r_fin_d,r_ini_n,r_fin_n\n FROM turno WHERE turno_id='{$_POST['select_turno']}'"); $datos2 = $crud2->seleccionar($con2->getConection()); $ini_n = $datos2[0]['r_ini_n']; $fin_n = $datos2[0]['r_fin_n']; $ini_d = $datos2[0]['r_ini_d']; $fin_d = $datos2[0]['r_fin_d']; $pivot = new Pivote($datos2[0]['dtd'], $datos2[0]['dtn'], $datos2[0]['dias_descanso'], $datos2[0]['inicio_turno']); $pivot->llena_pivote(); $pivot->getPivote(); $largo = $pivot->getLongitud(); $inicio = $pivot->getPivote(); // $k= $_POST['select_dia_ini_turno']-1; $k = 0; $asig = $inicio[$k]; $gen_pro = new Program($_POST['desde'], $_POST['hasta']); $gen_pro->calcular_rango(); $tope = $gen_pro->getInterval();