<%-- Document : frm_reporte_app Created on : 12/01/2012, 05:52:42 PM Author : psoto --%> <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@page import = "conexion.*" import = "java.sql.*" import = "extras.formatFecha" import = "general.Config" import = "general.Permisos" import = "own.codec.*" import = "java.text.NumberFormat" import = "java.util.Date" import = "java.util.Calendar" import = "java.util.Hashtable" import = "java.util.ArrayList" import = "java.text.SimpleDateFormat" %> Reporte APP <% /****** Despliega la lista de cines del sistema filtrados por el texto de búsqueda de buscar_cines.jsp (no obligatorio)***********/ /********************************************creado por: L.I. Salvador Díaz Parra*******************************************************/ out.println(""); String nompag[] = request.getRequestURI().split("/"); Date hoy = new Date(); SimpleDateFormat formato = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); String fecha_hoy = formato.format(hoy); %> <% ConexionEquipos c = null; Connection lcnt_con = null; ResultSet lrs_res = null; Statement lst_stm = null; String ls_query = new String(""); ResultSet lrs_res2 = null; Statement lst_stm2 = null; String ls_query2 = new String(""); String emergent_error = new String(""); boolean lb_connection = false; String debug = new String("si"); boolean elementos_encontrados = false; Hashtable cambios_encontrados = new Hashtable(); String id_cat_categorias = new String(""); String id_area = new String(""); String tipo_ticket = new String("2"); String fecha_inicio = new String(""); String fecha_termino = new String(""); String tipo_campo = new String("fecha_cierre"); int total_gral = 0; // Conexión a la base de datos try { if (!Config.getParametro("debug").equals("si")) { debug = "no"; } c = new ConexionEquipos(); lcnt_con = c.getConnection(); lst_stm = lcnt_con.createStatement(); lst_stm2 = lcnt_con.createStatement(); lb_connection = true; } catch (Exception e) { emergent_error = "Error al conectarse a la base de datos "; if (debug.equals("si")) { emergent_error += e; } lb_connection = false; } //********* Validación fundamental para evitar ejecución de código sin privilegios suficientes **********// try { if (!Permisos.PermisoModulo(nompag[nompag.length - 1].toString(), Integer.parseInt(session.getAttribute("id_user").toString()))) { if (lb_connection) { lst_stm.close(); lcnt_con.close(); } emergent_error += " Privilegios insuficientes. "; lb_connection = false; } } catch (Exception e) { emergent_error += " Privilegios insuficientes. "; if (debug.equals("si")) { emergent_error += "Trace: " + e.toString(); } lb_connection = false; } //*******************************************************************************************************// if (lb_connection) { try { if (request.getParameter("tipo_ticket") != null) { tipo_ticket = request.getParameter("tipo_ticket"); if (request.getParameter("tipo_ticket").equals("1")) { tipo_campo = " fecha_creacion "; } else if (request.getParameter("tipo_ticket").equals("2")) { tipo_campo = " fecha_cierre "; } else if (request.getParameter("tipo_ticket").equals("3")) { tipo_campo = " fecha_creacion "; } } if (request.getParameter("fecha_inicio") != null) { fecha_inicio = request.getParameter("fecha_inicio"); } else { fecha_inicio = fecha_hoy; } if (request.getParameter("fecha_termino") != null) { fecha_termino = request.getParameter("fecha_termino"); } else { fecha_termino = fecha_hoy; } %>
Reporte APP
De: A: Tipo Tickets:      

<% } catch (Exception e) { emergent_error += "Error: " + e.toString() + " Ultimo query: " + ls_query; %>
<%=emergent_error%>
<% } finally { lst_stm.close(); } } else { %>
<%=emergent_error%>
<% } //Registrar en la bitácora try { String mensaje_log = new String(""); mensaje_log = "Usuario -" + session.getAttribute("username").toString() + "- desplegó la informacion de APP --;"; Config.GuardarLog(Integer.parseInt(session.getAttribute("id_user").toString()), mensaje_log, 3); } catch (Exception e) { } %>