<%-- Document : alta_declarante_user Created on : 20/08/2013, 82:37:09 PM Author : Martha --%> <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@page import = "conexion.*" import = "java.sql.*" import = "general.Config" import = "general.Permisos" import = "java.util.Date" import = "java.text.SimpleDateFormat" %> Nueva Declaranción de Funcionarios <% /*********************************** Permite modificar los datos de un usuario existente ***********************************************/ /********************************************creado por: Ing Martha*******************************************************/ out.println(""); String nompag[] = request.getRequestURI().split("/"); Date hoy = new Date(); SimpleDateFormat formato = new SimpleDateFormat("yyyy-MM-dd"); String fecha_hoy = formato.format(hoy); %> <% //Connection lcnt_con = null; Statement lst_stm = null; ResultSet lrs_res = null; //ResultSet lrs_res2 = null; // Statement lst_stm2 = null; /*INICIO. Segunda Conexión*/ ConexionDeclaranet cd = null; Connection lcd_connection = null; //Statement lstg_conecta=null; /*FIN. SEGUNDA CONEXIÓN*/ String ls_query = new String(""); String emergent_error = new String(""); boolean lb_connection = false; String debug = new String("si"); String idfuente = new String(""); String nombre_usuario = new String(""); /********* INICIO. Conexión 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 "; } /********* FIN. Conexión a la base de datos ********/ //********* 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(); 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 { %>
ALTA FUNCIONARIO (DECLARANET)
 Apellido Paterno:  Apellido Materno:
 Nombre (s):  RFC:
  Sexo:
 DOMICILIO PARTICULAR
 Calle:  Número:  Número interior:
 Colonia:  Localidad:
 C. P. :  Telefono:
 Entidad Federativa:  Municipio:
DATOS LABORALES DEL DECLARANTE
 Categoría  Área:
 Fecha de Inicio del Cargo:
 CARGO QUE INICIA
 Dependencia u Organismo      Área de Adscripción:
DATOS DEL USUARIO
 E-mail:
 Contraseña  Confirmar contraseña:
 Número de identidicación IFE
 Desactivar el ingreso al sistema
  
<% } catch (Exception e) { emergent_error = "Error al recuperar datos de la alta del Declarante "; if (debug.equals("si")) { emergent_error += e + " Query actual: " + ls_query; } %>
<%=emergent_error%>
<% } finally { lst_stm.close(); lcd_connection.close(); } } else { %>
<%=emergent_error%>
<% } //Registrar en la bitácora try { String mensaje_log = new String(""); mensaje_log = "Usuario -" + session.getAttribute("username").toString() + "- desplegó formulario para agregar un Funcionario para su Declaración;"; Config.GuardarLog(Integer.parseInt(session.getAttribute("id_user").toString()), mensaje_log, 3); } catch (Exception e) { } %>