<%-- Document : frm_review_listado_declaraciones Created on : 13/08/2013, 03:10:06 PM Author : Martha --%> <%@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.text.SimpleDateFormat" import = "java.util.GregorianCalendar" import = "clases.*" %> Resumen Declaraciones <% /** * ******************* Despliega el formulario de captura y * validación de datos de un nuevo usuario del * sistema************************ */ out.println(""); String nompag[] = request.getRequestURI().split("/"); /** * ******************** tomo la fecha del sistema * ************************ */ Date hoy = new Date(); SimpleDateFormat formato = new SimpleDateFormat("yyyy-MM-dd"); String fecha_hoy = formato.format(hoy); String nom = "__"; %> <% //Connection lcnt_con = null; ResultSet lrs_res = null; Statement lst_stm = null; String ls_query = new String(""); /*INICIO. Segunda Conexion*/ ConexionDeclaranet cd = null; Connection lcd_connection = null; //Statement lstg_conecta=null; /*FIN. SEGUNDA CONEXION*/ String emergent_error = new String(""); boolean lb_connection = false; String debug = new String("si"); Integer x = 0, total = 0; //********* INICIO. Conexion a la base de datos ********/ try { if (!Config.getParametro("debug").equals("si")) { debug = "no"; } cd = new ConexionDeclaranet(); lcd_connection = cd.getConnection(); lst_stm = lcd_connection.createStatement(); lb_connection = true; } catch (Exception e) { emergent_error = "Error al conectarse a la base de datos 2 "; if (debug.equals("si")) { emergent_error += "Trace: " + e.toString(); } lb_connection = false; } /** * ********FIN. CONEXION A LA BASE DE DATOS****** */ //********* Validacion fundamental para evitar ejecucion de codigo 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(); lcd_connection.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 { %>
Listado de Declaraciones (Frontend)

Introduce tu búsqueda

RFC:

<% nom = request.getParameter("nom"); total = declaration.total_declaration_status(1); if (total > 0 && nom != null) { %>
Resultados encontrados
<%--
Estado: Abiertas (<%=total%> declaraciones)
--%>
<%=declaration.enlistar_declaration_rfc(nom)%>
<% }%> <%total = declaration.total_declaration_status(2); if (total > 0) { %>
Estado: En espera de revisión (<%=total%> declaraciones)
<%=declaration.enlistar_declaration_status()%>
<% } %> <%-- total=declaration.total_declaration_status(3); if(total>0){ %>
Estado: Aceptadas (<%=total%> declaraciones)
<%=declaration.enlistar_declaration_admon(3)%>
<% } total=declaration.total_declaration_status(4); if(total>0){ %>
Estado: Rechazadas (<%=total%> declaraciones)
<%=declaration.enlistar_declaration_admon(4)%>
<% }%>--%>
<% } catch (Exception e) { emergent_error = "Error al actualizar la base de datos "; if (debug.equals("si")) { emergent_error += e + " Query actual: " + ls_query; } %>
<%=emergent_error%>
<% } finally { lst_stm.close(); lcd_connection.close(); } } else { %>
<%=emergent_error%>
<% } %>