function AJAX_cambio_en_estado_de_orden() { protegerme(true); $DATOS['estado'] = $_POST['estado']; $DATOS['estado_notas'] = $_POST['estado_notas']; db_actualizar_datos(db_prefijo . 'SSL_compra_contenedor', $DATOS, 'codigo_compra="' . db_codex($_POST['codigo_compra']) . '"'); }
function IMAGEN_tipo_tcredito() { require_once 'PHP/vital.php'; protegerme(); $c = sprintf('SELECT AES_DECRYPT(`n_credito`,"%s") AS n_credito_DAES, pin_4_reverso_t_credito, fecha_exp_t_credito, precio_grabado, precio_envio FROM `flores_SSL_compra_contenedor` WHERE transaccion="%s"', db__key_str, $_GET['pin']); $r = mysql_query($c); $f = mysql_fetch_assoc($r); $string = preg_replace('/(\\d{4})(\\d{4})(\\d{4})(\\d{4})/', '$1-$2-$3-$4', $f['n_credito_DAES']); $im = ImageCreate((int) (strlen($string) * 9), 64); $background_color = ImageColorAllocate($im, 224, 230, 255); $text_color = ImageColorAllocate($im, 0, 0, 0); ImageString($im, 5, 0, 0, $string, $text_color); ImageString($im, 5, 0, 16, $f['fecha_exp_t_credito'], $text_color); ImageString($im, 5, 0, 32, $f['pin_4_reverso_t_credito'], $text_color); ImageString($im, 5, 0, 48, '$' . number_format($f['precio_grabado'] + $f['precio_envio'], 2, '.', ','), $text_color); header("Content-type: image/png"); ImagePNG($im); ImageDestroy($im); }
<?php protegerme(); $GLOBAL_MOSTRAR_PIE = false; set_time_limit(0); /* * IMPORTANT NOTE: This generated file contains only a subset of huge amount * of options that can be used with phpMyEdit. To get information about all * features offered by phpMyEdit, check official documentation. It is available * online and also for download on phpMyEdit project management page: * * http://platon.sk/projects/main_page.php?project_id=5 * * This file was generated by: * * phpMyEdit version: 5.7.1 * phpMyEdit.class.php core class: 1.204 * phpMyEditSetup.php script: 1.50 * generating setup script: 1.50 */ // MySQL host name, user name, password, database, and table $opts['dbh'] = $db_link; $opts['page_name'] = PROY_URL_ACTUAL; $opts['tb'] = db_prefijo . 'accesorios'; // Name of field which is the unique key $opts['key'] = 'codigo_accesorio'; // Type of key field (int/real/string/date etc.) $opts['key_type'] = 'int'; // Sorting field(s) $opts['sort_field'] = array('codigo_accesorio'); // Number of records to display on the screen
<script type="text/javascript"> $(function($) { $(".datepicker").datepicker({ dateFormat: 'dd/mm/yy' }); $("input[type=submit]").click($(this).disabled=true;return true); }); </script> <?php protegerme(false, true); ini_set("memory_limit", "128M"); $arrCSS[] = 'css/jquery-ui/jquery-ui-1.8.4.custom'; $arrJS[] = 'jquery.ui.core'; $arrJS[] = 'jquery.ui.datepicker'; /** Para selector (paginador) **/ $sufijo = strstr(PROY_URL_ACTUAL_DINAMICA, '?') ? '&' : '?'; $URL = preg_replace('/&?l=[0-9]*&?/', '', PROY_URL_ACTUAL_DINAMICA); function aplicacion_ingresar_nota($ID_aplicacion, $nota, $tipo_nota, $notificar = true) { db_agregar_datos(db_prefijo . 'historial', array('tipo' => $tipo_nota, 'fecha' => mysql_datetime(), 'cambio' => $nota, 'ID_aplicacion' => $ID_aplicacion, 'ID_usuario' => _F_usuario_cache('ID_usuario'))); if ($notificar) { $cNotificaciones = sprintf('SELECT DISTINCT correo FROM ' . db_prefijo . 'historial AS h LEFT JOIN ' . db_prefijo . 'usuarios AS u USING(ID_usuario) WHERE h.ID_usuario<>' . _F_usuario_cache('ID_usuario') . ' AND nivel="' . _N_agente_us . '" AND h.ID_aplicacion=' . $ID_aplicacion); $rNotificaciones = db_consultar($cNotificaciones); $mensaje = ' <p><b>' . _F_usuario_cache('nombre') . '</b> ha ingresado una nueva nota en una aplicación:</p> <p><b>' . $nota . '</b></p> <p><a href="' . PROY_URL . 'aplicaciones?ver=' . $ID_aplicacion . '">Ir a la aplicación</a></p> <hr /> <p> <small> Ud. ha recibido esta notificación por una de las siguientes causas: <ul> <li>Ud. es el agente que lleva el caso</li>
<?php protegerme(false, array('empresa', 'administrador')); /* * IMPORTANT NOTE: This generated file contains only a subset of huge amount * of options that can be used with phpMyEdit. To get information about all * features offered by phpMyEdit, check official documentation. It is available * online and also for download on phpMyEdit project management page: * * http://platon.sk/projects/main_page.php?project_id=5 * * This file was generated by: * * phpMyEdit version: unknown * phpMyEdit.class.php core class: unknown * phpMyEditSetup.php script: unknown * generating setup script: 1.50 */ // MySQL host name, user name, password, database, and table $opts['dbh'] = $db_link; $opts['page_name'] = PROY_URL_ACTUAL; $opts['tb'] = db_prefijo . 'historial'; // Name of field which is the unique key $opts['key'] = 'ID_historial'; // Type of key field (int/real/string/date etc.) $opts['key_type'] = 'int'; // Sorting field(s) $opts['sort_field'] = array('ID_historial'); // Number of records to display on the screen // Value of -1 lists all records in a table $opts['inc'] = 15;
<?php protegerme(false, array(NIVEL_administrador, NIVEL_empresa)); $c = sprintf('SELECT `ID_mensaje`, `ID_empresa`, `tipo`, `mensaje`, `leido` FROM `mensaje` WHERE ID_empresa=%s', usuario_cache('ID_empresa')); $r = db_consultar($c); $mensajes = ''; if (mysql_num_rows($r)) { while ($f = mysql_fetch_assoc($r)) { $mensajes .= sprintf('<p class="mensaje_%s">%s</p>', $f['tipo'], $f['mensaje']); } } else { $mensajes = '<p class="destacado">Su empresa no tiene nuevos mensajes.</p>'; } ?> <h1>Centro de mensajes y estadísticas | <?php echo usuario_cache('usuario'); ?> | <?php echo usuario_cache('razon_social'); ?> </h1><h1> <h2>Mensajes</h2> <?php echo $mensajes;
<?php protegerme(false, array(NIVEL_administrador)); $mensajes = ''; $cestadisticas = 'SELECT COALESCE(`siglas`,`razon_social`) AS "Razón social", COUNT(*) AS "Número de empleados" FROM empleado LEFT JOIN empresa USING(ID_empresa) GROUP BY ID_empresa ORDER BY COUNT(*) DESC,COALESCE(`siglas`,`razon_social`)'; $restadisticas = db_consultar($cestadisticas); $estadisticas_empleado = db_ui_tabla($restadisticas, 'class="t100"'); $cestadisticas = 'SELECT COALESCE(`siglas`,`razon_social`) AS "Razón social", COUNT(*) AS "Número de empleados activo" FROM empleado LEFT JOIN empresa USING(ID_empresa) WHERE (SELECT COUNT(*) FROM cese WHERE cese.ID_empleado=empleado.ID_empleado AND cese.fecha_cese > ALL(SELECT fecha_inicio FROM historial WHERE historial.ID_empleado=empleado.ID_empleado)) = 0 GROUP BY ID_empresa ORDER BY COUNT(*) DESC,COALESCE(`siglas`,`razon_social`)'; $restadisticas = db_consultar($cestadisticas); $estadisticas_empleado_activo = db_ui_tabla($restadisticas, 'class="t100"'); $cestadisticas = 'SELECT COALESCE(`siglas`,`razon_social`) AS "Razón social", COUNT(*) AS "Número de usuarios" FROM usuario LEFT JOIN empresa USING(ID_empresa) GROUP BY ID_empresa ORDER BY COUNT(*) DESC,COALESCE(`siglas`,`razon_social`)'; $restadisticas = db_consultar($cestadisticas); $estadisticas_usuario = db_ui_tabla($restadisticas, 'class="t100"'); $cestadisticas = 'SELECT COALESCE(`siglas`,`razon_social`) AS "Razón social", COUNT(*) AS "Número de consultas" FROM consulta LEFT JOIN empresa USING(ID_empresa) GROUP BY ID_empresa ORDER BY COUNT(*) DESC,COALESCE(`siglas`,`razon_social`)'; $restadisticas = db_consultar($cestadisticas); $estadisticas_consulta = db_ui_tabla($restadisticas, 'class="t100"'); $cestadisticas = 'SELECT COALESCE(`siglas`,`razon_social`) AS "Razón social", COUNT(*) AS "Número de ceses laborales" FROM cese LEFT JOIN empresa USING(ID_empresa) GROUP BY ID_empresa ORDER BY COUNT(*) DESC,COALESCE(`siglas`,`razon_social`)'; $restadisticas = db_consultar($cestadisticas); $estadisticas_cese = db_ui_tabla($restadisticas, 'class="t100"'); $cestadisticas = 'SELECT COALESCE(`siglas`,`razon_social`) AS "Razón social", COUNT(*) AS "Número de accesos" FROM acceso LEFT JOIN empresa USING(ID_empresa) GROUP BY ID_empresa ORDER BY COUNT(*) DESC,COALESCE(`siglas`,`razon_social`)'; $restadisticas = db_consultar($cestadisticas); $estadisticas_acceso = db_ui_tabla($restadisticas, 'class="t100"'); $cestadisticas = 'SELECT COALESCE(`siglas`,`razon_social`) AS "Razón social", COUNT(*) AS "Número de accesos" FROM acceso LEFT JOIN empresa USING(ID_empresa) WHERE CONCAT(YEAR(tiempo),MONTH(tiempo))=CONCAT(YEAR(NOW()),MONTH(NOW())) GROUP BY ID_empresa ORDER BY COUNT(*) DESC,COALESCE(`siglas`,`razon_social`)'; $restadisticas = db_consultar($cestadisticas); $estadisticas_acceso_mensual = db_ui_tabla($restadisticas, 'class="t100"'); $cestadisticas = 'SELECT IF(giro="","[Desconocido]",giro) AS "Giro", COUNT(*) AS "Número de empresas" FROM empresa GROUP BY giro ORDER BY COUNT(*) DESC,`Giro`'; $restadisticas = db_consultar($cestadisticas); $estadisticas_giro = db_ui_tabla($restadisticas, 'class="t100"'); ?> <h1>Centro de mensajes y estadísticas para Administradores</h1> <h2>Mensajes</h2>
function ajax__anexo_tipo() { require_once 'PHP/__vital.php'; protegerme(false, array(NIVEL_administrador, NIVEL_empresa)); require_once 'VISTAS/empleado.amigable.anexo.' . $_POST['tipo'] . '.php'; }
<?php protegerme(false, array(_N_vendedor)); $arrJS[] = 'jquery.form'; $arrJS[] = 'jquery.ui.core'; $arrJS[] = 'jquery.ui.datepicker'; $arrJS[] = 'jquery.ui.datepicker-es'; $arrCSS[] = 'CSS/css/ui-lightness/jquery-ui-1.7.2.custom'; $GLOBAL_MOSTRAR_PIE = false; $buffer = ''; $total = 0; $WHERE = ''; if (isset($_GET['fecha'])) { $WHERE = sprintf('AND DATE(fecha)="%s"', mysql_date($_GET['fecha'])); } if (isset($_GET['pendientes'])) { $WHERE = 'AND fecha_entrega>=DATE(NOW())'; } if (isset($_GET['fecha_entrega'])) { $WHERE = sprintf('AND fecha_entrega="%s"', mysql_date($_GET['fecha_entrega'])); } if (isset($_GET['fecha_inicio']) && isset($_GET['fecha_final'])) { $WHERE = sprintf('AND fecha BETWEEN "%s" AND "%s"', mysql_date($_GET['fecha_inicio']), mysql_date($_GET['fecha_final'])); } if (isset($_GET['fecha_entrega_inicio']) && isset($_GET['fecha_entrega_final'])) { $WHERE = sprintf('AND fecha_entrega BETWEEN "%s" AND "%s"', mysql_date($_GET['fecha_entrega_inicio']), mysql_date($_GET['fecha_entrega_final'])); } $c = sprintf('SELECT provar.foto, provar.descripcion AS "variedad_titulo", provar.receta, procon.codigo_producto, procon.titulo AS "contenedor_titulo",`codigo_compra`, `codigo_usuario`, `codigo_variedad`, `precio_grabado`, `precio_envio`, `tipo_t_credito`, `fecha_exp_t_credito`, `nombre_t_credito`, `pin_4_reverso_t_credito`, `correo_contacto`, `direccion_entrega`, `fecha`, `fecha_entrega`, DATE_FORMAT(fecha,"%%e de %%M de %%Y [%%r]") fecha_formato, DATE_FORMAT(fecha_entrega,"%%e de %%M de %%Y") fecha_entrega_formato, `telefono_destinatario`, `telefono_remitente`, `tarjeta_de`, `tarjeta_para`, `tarjeta_cuerpo`, `estado`, `estado_notas`, `usuario_notas`, `transaccion` FROM `flores_SSL_compra_contenedor` AS comcon LEFT JOIN flores_producto_variedad AS provar USING(codigo_variedad) LEFT JOIN flores_producto_contenedor AS procon USING(codigo_producto) WHERE 1 %s ORDER BY `fecha` DESC, `estado` DESC', $WHERE); $r = db_consultar($c); while ($f = mysql_fetch_assoc($r)) { $info_estado = '';