Grafica
<%
/****** 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;
int total_categorias = 0;
int total_areas = 0;
String ids_categorias = new String("");
String ids_areas = new String("");
String tipo_campo = new String("");
String tipo_ticket = new String("");
// 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;
}
//*******************************************************************************************************//
if (lb_connection) {
try {
Enumeration names = request.getParameterNames();
String nextID = new String("");
while (names.hasMoreElements()) {
nextID = names.nextElement().toString();
if (nextID.startsWith("id_cat_categorias_")) {
ids_categorias += nextID.substring(18) + ",";
total_categorias++;
}
}
ids_categorias = ids_categorias.substring(0, ids_categorias.length() - 1);
nextID = new String("");
names = request.getParameterNames();
while (names.hasMoreElements()) {
nextID = names.nextElement().toString();
if (nextID.startsWith("id_area_")) {
ids_areas += nextID.substring(8) + ",";
total_areas++;
}
}
ids_areas = ids_areas.substring(0, ids_areas.length() - 1);
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 ";
}
}
%>
Reporte APP
<%
ls_query = "SELECT id_cat_categorias, nombre_categoria FROM cat_categorias WHERE status=true AND id_cat_categorias in("+ids_categorias+") ORDER BY nombre_categoria ";
lrs_res = lst_stm.executeQuery(ls_query);
while (lrs_res.next()) {
out.println("