<%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@page import="conexion.*" import="java.sql.*" import="general.Config" import="general.Permisos" %> Menú Principal <% String nompag[] = request.getRequestURI().split("/"); %> <% /********************** Muestra el Menú Principal de Usuario, se carga por default en el div con ID left *******************************/ /********************************************creado por: Ing Martha García*******************************************************/ Conexion c = null; Connection lcnt_con = null; ResultSet lrs_res = null; Statement lst_stm = null; String ls_query = new String(""); Connection lcnt_con2 = null; 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"); String changeStyleScript = new String(""); String changeFrameScript = new String(""); String changeLeftFrameScript = new String(""); String id_supermodulos = new String(""); String id_variantes = new String(""); int li_menu_number = 1; String ls_menu_number = "01"; // Conexión a la base de datos try { if (!Config.getParametro("debug").equals("si")) { debug = "no"; } c = new Conexion(); 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 "; // Verifica si está habilitado el modo debug 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(); lst_stm2.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 { try { id_supermodulos = request.getParameter("id_supermodulos").toString(); } catch (Exception e) { id_supermodulos = "0"; } try { id_variantes = request.getParameter("id_variantes").toString(); } catch (Exception e) { id_variantes = "0"; } %>
 Map <% } %>
<% } catch (Exception e) { emergent_error += "Error al obtener tabla de opciones, "; if (debug.equals("si")) { emergent_error += e + " Query actual: " + ls_query; } } lst_stm.close(); lst_stm2.close(); lcnt_con.close(); if (request.getHeader("user-agent").contains("MSIE") || request.getHeader("user-agent").contains("Konqueror") || request.getHeader("user-agent").contains("Galeon")) if (Config.getParametro("dsply_use_firefox").equals("si")) { %> Cambie a un navegador web superior
Obtenga Firefox
<% } } else { %>
<%=emergent_error%>
<% } %>