diff --git a/.idea/misc.xml b/.idea/misc.xml index 5b6a5c4..8bb1e38 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -10,7 +10,7 @@ - + \ No newline at end of file diff --git a/src/main/java/com/roshka/proyectofinal/Postulante/SaveServlet.java b/src/main/java/com/roshka/proyectofinal/Postulante/SaveServlet.java index a1bd41d..0500e4e 100644 --- a/src/main/java/com/roshka/proyectofinal/Postulante/SaveServlet.java +++ b/src/main/java/com/roshka/proyectofinal/Postulante/SaveServlet.java @@ -23,60 +23,60 @@ public class SaveServlet extends HttpServlet { throws ServletException, IOException { response.setContentType("text/html"); - PrintWriter out=response.getWriter(); + PrintWriter out = response.getWriter(); boolean rechazarDatos = false; int bootcampActual = Integer.parseInt(request.getParameter("bootcamp")); try { Connection con = DataBase.getConnection(); Statement stmt = con.createStatement(); - ResultSet rs = stmt.executeQuery("SELECT correo,bootcamp_id FROM postulante WHERE postulante.bootcamp_id =" + bootcampActual); - - String nombre=request.getParameter("nombre"); - String apellido=request.getParameter("apellido"); - int cedula=Integer.parseInt(request.getParameter("cedula")); - String correo=request.getParameter("correo"); - //BUCLE PARA VERIFICAR EL CORREO EN EL BOOTCAMP ACTUAL - while (rs.next()){ - String correoBase =rs.getString("correo"); + ResultSet rs = stmt.executeQuery( + "SELECT correo,bootcamp_id FROM postulante WHERE postulante.bootcamp_id =" + bootcampActual); + + String nombre = request.getParameter("nombre"); + String apellido = request.getParameter("apellido"); + int cedula = Integer.parseInt(request.getParameter("cedula")); + String correo = request.getParameter("correo"); + // BUCLE PARA VERIFICAR EL CORREO EN EL BOOTCAMP ACTUAL + while (rs.next()) { + String correoBase = rs.getString("correo"); int bootcampIdBase = rs.getInt("bootcamp_id"); - if(correo.equals(correoBase) && (bootcampIdBase==bootcampActual)){ + if (correo.equals(correoBase) && (bootcampIdBase == bootcampActual)) { rechazarDatos = true; } } rs = stmt.executeQuery("SELECT * FROM lenguaje"); int contador = 0; - while (rs.next()){ + while (rs.next()) { String nombreLenguaje = rs.getString("nombre_lenguaje"); - if (request.getParameter(nombreLenguaje) != null){ + if (request.getParameter(nombreLenguaje) != null) { contador++; } } - if (contador == 0){ + if (contador == 0) { rechazarDatos = true; } - String telefono=request.getParameter("telefono"); - String direccion=request.getParameter("direccion"); - boolean experienciaProgramando = false; + String telefono = request.getParameter("telefono"); + String direccion = request.getParameter("direccion"); boolean experienciaLaboral = false; boolean universidad = false; boolean notebook = false; - if (request.getParameter("experiencia_laboral") != null){ + if (request.getParameter("experiencia_laboral") != null) { experienciaLaboral = true; } - if (request.getParameter("notebook") != null){ + if (request.getParameter("notebook") != null) { notebook = true; } - if (request.getParameter("universidad") != null){ + if (request.getParameter("universidad") != null) { universidad = true; } - Postulante postulante=new Postulante(); + Postulante postulante = new Postulante(); PostulanteLenguaje cargarLenguaje = new PostulanteLenguaje(); int status = 0; int statusLenguaje = 0; - //SI LOS DATOS SON CORRECTOS NO SE RECHAZAN ENTONCES CARGA A LA BASE - if (!rechazarDatos){ + // SI LOS DATOS SON CORRECTOS NO SE RECHAZAN ENTONCES CARGA A LA BASE + if (!rechazarDatos) { postulante.setNombre(nombre); postulante.setApellido(apellido); postulante.setNro_cedula(cedula); @@ -88,62 +88,65 @@ public class SaveServlet extends HttpServlet { postulante.setNotebook(notebook); postulante.setBootcampId(bootcampActual); postulante.setAceptado(false); - status=PostulanteDao.save(postulante); + status = PostulanteDao.save(postulante); - rs = stmt.executeQuery("SELECT id FROM postulante WHERE postulante.nro_cedula="+cedula+" AND postulante.bootcamp_id="+bootcampActual+" ORDER BY id DESC LIMIT 1"); - int idUltimoPostulante=0; + rs = stmt.executeQuery("SELECT id FROM postulante WHERE postulante.nro_cedula=" + cedula + + " AND postulante.bootcamp_id=" + bootcampActual + " ORDER BY id DESC LIMIT 1"); + int idUltimoPostulante = 0; while (rs.next()) { idUltimoPostulante = rs.getInt("id"); } rs = stmt.executeQuery("SELECT * FROM lenguaje"); - while (rs.next()){ + while (rs.next()) { int idLenguaje = rs.getInt("id"); String nombreLenguaje = rs.getString("nombre_lenguaje"); - if (request.getParameter(nombreLenguaje) != null){ + if (request.getParameter(nombreLenguaje) != null) { cargarLenguaje.setIdLenguaje(idLenguaje); cargarLenguaje.setIdPostulante(idUltimoPostulante); statusLenguaje = PostulanteLenguajeDao.save(cargarLenguaje); } } } - if(status>0){ - //out.print("

Record saved successfully!

"); - + if (status > 0) { + // out.print("

Record saved successfully!

"); out.print("
\n" + - " × \n" + + " × \n" + + " Formulario Cargado! EXITOSAMENTE CARGADO\n" + "
"); request.setAttribute("bootcamp", bootcampActual); RequestDispatcher rd = request.getRequestDispatcher("formulario.jsp"); rd.include(request, response); - //RequestDispatcher rd = request.getRequestDispatcher("formulario.jsp"); - //rd.include(request, response); - }else{ - if (rechazarDatos){ + // RequestDispatcher rd = request.getRequestDispatcher("formulario.jsp"); + // rd.include(request, response); + } else { + if (rechazarDatos) { out.print("
"); - out.print("×"); + out.print( + "×"); out.print("Formulario ya Cargado! YA EXISTE EL FORMULARIO"); out.print("
"); - //request.getRequestDispatcher("formulario.jsp").include(request, response); + // request.getRequestDispatcher("formulario.jsp").include(request, response); request.setAttribute("bootcamp", bootcampActual); RequestDispatcher rd = request.getRequestDispatcher("formulario.jsp"); rd.include(request, response); - }else { + } else { out.println("Error al cargar datos"); out.print("
" + - "× \n" + + "× \n" + + "Formulario ya Cargado! YA EXISTE EL FORMULARIO\n" + "
"); request.setAttribute("bootcamp", bootcampActual); RequestDispatcher rd = request.getRequestDispatcher("formulario.jsp"); rd.include(request, response); - //request.getRequestDispatcher("formulario.jsp").include(request, response); + // request.getRequestDispatcher("formulario.jsp").include(request, response); } } - }catch (Exception ex){ - ex.printStackTrace(); + } catch (Exception ex) { + ex.printStackTrace(); } out.close(); } diff --git a/src/main/webapp/bootcamp.jsp b/src/main/webapp/bootcamp.jsp index fbb0800..87c0f55 100644 --- a/src/main/webapp/bootcamp.jsp +++ b/src/main/webapp/bootcamp.jsp @@ -7,6 +7,7 @@ pageEncoding="UTF-8"%> + Bootcamp diff --git a/src/main/webapp/formJS.js b/src/main/webapp/formJS.js new file mode 100644 index 0000000..d4db8f6 --- /dev/null +++ b/src/main/webapp/formJS.js @@ -0,0 +1,15 @@ +// Get all elements with class="closebtn" +var close = document.getElementsByClassName("closebtn"); +var i; +// Loop through all close buttons +for (i = 0; i < close.length; i++) { + // When someone clicks on a close button + close[i].onclick = function(){ + // Get the parent of (
) + var div = this.parentElement; + // Set the opacity of div to 0 (transparent) + div.style.opacity = "0"; + // Hide the div after 600ms (the same amount of milliseconds it takes to fade out) + setTimeout(function(){ div.style.display = "none"; }, 600); + } +} diff --git a/src/main/webapp/formulario.jsp b/src/main/webapp/formulario.jsp index 1d2b60b..cc3cbc7 100644 --- a/src/main/webapp/formulario.jsp +++ b/src/main/webapp/formulario.jsp @@ -11,6 +11,7 @@ pageEncoding="UTF-8"%> + Formulario Postulante @@ -133,4 +134,5 @@ pageEncoding="UTF-8"%> } init(); })(); - \ No newline at end of file + + diff --git a/src/main/webapp/formulario_bootcamp.jsp b/src/main/webapp/formulario_bootcamp.jsp index f64cdcf..5c61b0b 100644 --- a/src/main/webapp/formulario_bootcamp.jsp +++ b/src/main/webapp/formulario_bootcamp.jsp @@ -24,7 +24,7 @@ Lenguaje len = null; ProfesorDao profeDao = new ProfesorDao(); - List listProfesor = profeDao.listar(); + List listProfesor = profeDao.listarProfesor(); Iterator iterProfe = listProfesor.iterator(); Profesor profe = null; %> @@ -130,7 +130,7 @@ Lenguaje len2 = null; ProfesorDao profeDao2 = new ProfesorDao(); - List listProfesor2 = profeDao2.listar(); + List listProfesor2 = profeDao2.listarProfesor(); Iterator iterProfe2 = listProfesor2.iterator(); Profesor profe2 = null; Bootcamp bootcampToEdit = (Bootcamp)request.getAttribute("Bootcamp"); diff --git a/src/main/webapp/menu.css b/src/main/webapp/menu.css index 1796088..d081613 100644 --- a/src/main/webapp/menu.css +++ b/src/main/webapp/menu.css @@ -1,7 +1,7 @@ * { box-sizing: border-box; } - + body { font-family: 'Concert One', cursive; font-size: 13px diff --git a/src/main/webapp/menu.html b/src/main/webapp/menu.html new file mode 100644 index 0000000..b718dca --- /dev/null +++ b/src/main/webapp/menu.html @@ -0,0 +1,101 @@ + + + + + + + + + +
+

MENU TH

+

EN LOS SIGUIENTES LINKS PUEDE MODIFICAR, AGREGAR O ELIMINAR DATOS DE LA BASE DE DATOS DEL BOOTCAMP

+
+ + +
+

PUEDE ACCEDER A LOS SIGUIENTES LINKS:

+
+ + + + + + + diff --git a/src/main/webapp/postulante-consulta.jsp b/src/main/webapp/postulante-consulta.jsp index 24ffb56..bc6275f 100644 --- a/src/main/webapp/postulante-consulta.jsp +++ b/src/main/webapp/postulante-consulta.jsp @@ -14,13 +14,41 @@ + +
+

Lista Postulantes

+
+
+ + + + + + + + +
+ +
+ + + + + + +
+ + + +
+ +
-

LISTA POSTULANTES

-
- - -
+ @@ -33,26 +61,17 @@ - + - + diff --git a/src/main/webapp/postulante.css b/src/main/webapp/postulante.css index 003bc2f..5ae626b 100644 --- a/src/main/webapp/postulante.css +++ b/src/main/webapp/postulante.css @@ -1,10 +1,82 @@ -@import 'https://fonts.googleapis.com/css?family=Open+Sans|Quicksand:400,700'; + body{ -background-image: url(imagenes/descarga.svg); -height: 100%; -font-family: 'Quicksand', sans-serif; -color: white; -webkit-font-smoothing: antialiased; --moz-osx-font-smoothing: grayscale; -} -h1{ font-size: 40px \ No newline at end of file + background-image: url(imagenes/descarga.svg); + font-family:Calibri, Candara, Segoe, Segoe UI, Optima, Arial, sans-serif; + font-weight: bold; + font-size: medium; +} + +img{ + width: 165px; + padding: 5px; +} +.container{ + width: 300%; + max-width: 785px; + min-width: 320px; + border-radius: 15px; + padding: 1rem; + +} +table{ + /* background-color: wheat; */ + text-align: left; + border-collapse: collapse; + width: 150%; + /* border: solid 3px black; */ +} +a{ + text-decoration: none; + color: antiquewhite; +} +h1{ + font-family:Calibri, Candara, Segoe, Segoe UI, Optima, Arial, sans-serif; + text-align: right; + color:wheat; + font-weight:bold; + +} + +button{ + margin:5px; + background-image: url(imagenes/descarga.svg); + color: aliceblue; +} +th,td{ + margin: 2px; + +} +table tr:nth-child(odd) { /* background-color: aliceblue; */ + + /* background-color: rgba(11, 49, 110, 0.75) */ + background-color: transparent; +} + +table tr:nth-child(even) { background-image: url(imagenes/descarga.svg); +} +td{ + padding: 3px; + border-color: red; + text-align: center; + /* border: solid 1px coral; */ +} +th{ + padding: 5px; + text-align: center; + /* border: solid 4px black; */ +} +th:hover{ + background-color: brown; +} + +tbody{ + margin: 15px; +padding: 15px +} + +tr:hover td { background: aqua; } +th { border: 1px solid black; height: 30px; + background-image: url(imagenes/descarga.svg); + } +button:hover{ +color: yellow;} diff --git a/src/main/webapp/usrebe.html b/src/main/webapp/usrebe.html index 797f287..fe84cf7 100644 --- a/src/main/webapp/usrebe.html +++ b/src/main/webapp/usrebe.html @@ -10,6 +10,7 @@ Pinterest: https://pinterest.com/mycnlz/
#Experiencia laboral Estudio universitario -
- - -
+ Notebooks
-
- - -
+ Bootcamps
-
- - -
+ Aceptado
${myIndex.index + 1}-