Commit 10e982ec by Nahuel Mereles Rodriguez

Merge branch 'develop' of…

Merge branch 'develop' of https://phoebe.roshka.com/gitlab/jbaez/ProyectoFinal-Bootcamp into crearBootcamp2
parents 6d96ba63 52aa56ab
...@@ -4,6 +4,7 @@ target/ ...@@ -4,6 +4,7 @@ target/
!**/src/test/**/target/ !**/src/test/**/target/
### IntelliJ IDEA ### ### IntelliJ IDEA ###
.idea/gitmisc.xml
.idea/encodings.xml .idea/encodings.xml
.idea/** .idea/**
.idea/modules.xml .idea/modules.xml
...@@ -13,7 +14,7 @@ target/ ...@@ -13,7 +14,7 @@ target/
*.iws *.iws
*.iml *.iml
*.ipr *.ipr
/encodings.xml
### Eclipse ### ### Eclipse ###
.apt_generated .apt_generated
.classpath .classpath
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</list> </list>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -3,6 +3,7 @@ package com.roshka.proyectofinal.Postulante; ...@@ -3,6 +3,7 @@ package com.roshka.proyectofinal.Postulante;
import com.roshka.proyectofinal.DataBase; import com.roshka.proyectofinal.DataBase;
import com.roshka.proyectofinal.entity.Postulante; import com.roshka.proyectofinal.entity.Postulante;
import com.roshka.proyectofinal.entity.Bootcamp; import com.roshka.proyectofinal.entity.Bootcamp;
import com.roshka.proyectofinal.entity.PostulanteLenguaje;
import jakarta.servlet.ServletException; import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServlet;
...@@ -15,7 +16,6 @@ import java.sql.PreparedStatement; ...@@ -15,7 +16,6 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.Statement; import java.sql.Statement;
@WebServlet("/SaveServlet") @WebServlet("/SaveServlet")
public class SaveServlet extends HttpServlet { public class SaveServlet extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) protected void doPost(HttpServletRequest request, HttpServletResponse response)
...@@ -24,14 +24,13 @@ public class SaveServlet extends HttpServlet { ...@@ -24,14 +24,13 @@ public class SaveServlet extends HttpServlet {
response.setContentType("text/html"); response.setContentType("text/html");
PrintWriter out=response.getWriter(); PrintWriter out=response.getWriter();
boolean rechazarDatos = false; boolean rechazarDatos = false;
int bootcampActual = 3; int bootcampActual = Integer.parseInt(request.getParameter("bootcamp_id"));
try { try {
Connection con = DataBase.getConnection(); Connection con = DataBase.getConnection();
//
Statement stmt = con.createStatement(); Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT correo,bootcamp_id FROM postulante WHERE postulante.bootcamp_id =" + bootcampActual); ResultSet rs = stmt.executeQuery("SELECT correo,bootcamp_id FROM postulante WHERE postulante.bootcamp_id =" + bootcampActual);
//
String nombre=request.getParameter("nombre"); String nombre=request.getParameter("nombre");
String apellido=request.getParameter("apellido"); String apellido=request.getParameter("apellido");
int cedula=Integer.parseInt(request.getParameter("cedula")); int cedula=Integer.parseInt(request.getParameter("cedula"));
...@@ -44,6 +43,17 @@ public class SaveServlet extends HttpServlet { ...@@ -44,6 +43,17 @@ public class SaveServlet extends HttpServlet {
rechazarDatos = true; rechazarDatos = true;
} }
} }
rs = stmt.executeQuery("SELECT * FROM lenguaje");
int contador = 0;
while (rs.next()){
String nombreLenguaje = rs.getString("nombre_lenguaje");
if (request.getParameter(nombreLenguaje) != null){
contador++;
}
}
if (contador == 0){
rechazarDatos = true;
}
String telefono=request.getParameter("telefono"); String telefono=request.getParameter("telefono");
String direccion=request.getParameter("direccion"); String direccion=request.getParameter("direccion");
boolean experienciaProgramando = false; boolean experienciaProgramando = false;
...@@ -53,17 +63,17 @@ public class SaveServlet extends HttpServlet { ...@@ -53,17 +63,17 @@ public class SaveServlet extends HttpServlet {
if (request.getParameter("experiencia_laboral") != null){ if (request.getParameter("experiencia_laboral") != null){
experienciaLaboral = true; experienciaLaboral = true;
} }
if (request.getParameter("experiencia_programando") != null) {
experienciaProgramando = true;
}
if (request.getParameter("notebook") != null){ if (request.getParameter("notebook") != null){
notebook = true; notebook = true;
} }
if (request.getParameter("universidad") != null){ if (request.getParameter("universidad") != null){
universidad = true; universidad = true;
} }
Bootcamp bootcamp = new Bootcamp();
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 //SI LOS DATOS SON CORRECTOS NO SE RECHAZAN ENTONCES CARGA A LA BASE
if (!rechazarDatos){ if (!rechazarDatos){
postulante.setNombre(nombre); postulante.setNombre(nombre);
...@@ -77,33 +87,47 @@ public class SaveServlet extends HttpServlet { ...@@ -77,33 +87,47 @@ public class SaveServlet extends HttpServlet {
postulante.setNotebook(notebook); postulante.setNotebook(notebook);
postulante.setBootcampId(bootcampActual); postulante.setBootcampId(bootcampActual);
postulante.setAceptado(false); postulante.setAceptado(false);
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;
while (rs.next()) {
idUltimoPostulante = rs.getInt("id");
}
rs = stmt.executeQuery("SELECT * FROM lenguaje");
while (rs.next()){
int idLenguaje = rs.getInt("id");
String nombreLenguaje = rs.getString("nombre_lenguaje");
if (request.getParameter(nombreLenguaje) != null){
cargarLenguaje.setIdLenguaje(idLenguaje);
cargarLenguaje.setIdPostulante(idUltimoPostulante);
statusLenguaje = PostulanteLenguajeDao.save(cargarLenguaje);
}
}
} }
int status=PostulanteDao.save(postulante); if(status>0){
if(status>0){ //out.print("<p>Record saved successfully!</p>");
//out.print("<p>Record saved successfully!</p>"); out.print(" <div class=\"alert\">\n" +
out.print(" <div class=\"alert\">\n" + " <span class=\"closebtn\" onclick=\"this.parentElement.style.display='none';\">&times;</span> \n" +
" <strong>Formulario Cargado!</strong> EXITOSAMENTE CARGADO\n" +
"</div>");
request.getRequestDispatcher("formulario.jsp").include(request, response);
}else{
if (rechazarDatos){
out.print(" <div class=\"alert info\">\n" +
" <span class=\"closebtn\" onclick=\"this.parentElement.style.display='none';\">&times;</span> \n" + " <span class=\"closebtn\" onclick=\"this.parentElement.style.display='none';\">&times;</span> \n" +
" <strong>Formulario Cargado!</strong> EXITOSAMENTE CARGADO\n" + " <strong>Formulario ya Cargado!</strong> YA EXISTE EL FORMULARIO\n" +
"</div>");
request.getRequestDispatcher("formulario.jsp").include(request, response);
}else {
out.println("Error al cargar datos");
out.print(" <div class=\"alert info error\">\n" +
" <span class=\"closebtn\" onclick=\"this.parentElement.style.display='none';\">&times;</span> \n" +
" <strong>Formulario ya Cargado!</strong> YA EXISTE EL FORMULARIO\n" +
"</div>"); "</div>");
request.getRequestDispatcher("formulario.jsp").include(request, response); request.getRequestDispatcher("formulario.jsp").include(request, response);
}else{
if (rechazarDatos){
//out.println("El correo ingresado ya esta registrado para el bootcamp actual");
out.print(" <div class=\"alert info\">\n" +
" <span class=\"closebtn\" onclick=\"this.parentElement.style.display='none';\">&times;</span> \n" +
" <strong>Formulario ya Cargado!</strong> YA EXISTE EL FORMULARIO\n" +
"</div>");
request.getRequestDispatcher("formulario.jsp").include(request, response);
}else {
out.println("Error al cargar datos");
out.print(" <div class=\"alert info error\">\n" +
" <span class=\"closebtn\" onclick=\"this.parentElement.style.display='none';\">&times;</span> \n" +
" <strong>Formulario ya Cargado!</strong> YA EXISTE EL FORMULARIO\n" +
"</div>");
request.getRequestDispatcher("formulario.jsp").include(request, response);
}
} }
}
}catch (Exception ex){ }catch (Exception ex){
ex.printStackTrace(); ex.printStackTrace();
} }
......
...@@ -44,9 +44,34 @@ public class Postulante { ...@@ -44,9 +44,34 @@ public class Postulante {
this.aceptado = aceptado; this.aceptado = aceptado;
} }
public int getNroCedula() {
return nroCedula;
}
public String getNombreBootcamp() {
return nombreBootcamp;
}
public boolean isExpLaboral() {
return expLaboral;
}
public boolean isEstudioUniversitario() {
return estudioUniversitario;
}
public boolean isNotebook() {
return notebook;
}
public boolean isAceptado() {
return aceptado;
}
public int getId() { public int getId() {
return id; return id;
} }
public int getNro_cedula() { public int getNro_cedula() {
return nroCedula; return nroCedula;
} }
...@@ -118,35 +143,13 @@ public class Postulante { ...@@ -118,35 +143,13 @@ public class Postulante {
this.id = id; this.id = id;
} }
public int getNroCedula() {
return nroCedula;
}
public void setNroCedula(int nroCedula) { public void setNroCedula(int nroCedula) {
this.nroCedula = nroCedula; this.nroCedula = nroCedula;
} }
public String getNombreBootcamp() {
return nombreBootcamp;
}
public void setNombreBootcamp(String nombreBootcamp) { public void setNombreBootcamp(String nombreBootcamp) {
this.nombreBootcamp = nombreBootcamp; this.nombreBootcamp = nombreBootcamp;
} }
public boolean isExpLaboral() {
return expLaboral;
}
public boolean isEstudioUniversitario() {
return estudioUniversitario;
}
public boolean isNotebook() {
return notebook;
}
public boolean isAceptado() {
return aceptado;
}
} }
(function() {
const form = document.querySelector('#agarraunolaputa');
const checkboxes = form.querySelectorAll('input[type=checkbox]');
const checkboxLength = checkboxes.length;
const firstCheckbox = checkboxLength > 0 ? checkboxes[0] : null;
function init() {
if (firstCheckbox) {
for (let i = 0; i < checkboxLength; i++) {
checkboxes[i].addEventListener('change', checkValidity);
}
checkValidity();
}
}
function isChecked() {
for (let i = 0; i < checkboxLength; i++) {
if (checkboxes[i].checked) return true;
}
return false;
}
function checkValidity() {
const errorMessage = !isChecked() ? 'Debe seleccionar al menos un lenguaje que conozca' : '';
firstCheckbox.setCustomValidity(errorMessage);
}
init();
})();
\ No newline at end of file
...@@ -43,11 +43,9 @@ p:hover{ ...@@ -43,11 +43,9 @@ p:hover{
/* contenedor */ /* contenedor */
/* para el forrmulario */ /* para el forrmulario */
.form label{ .form label{
display: block; display: block;
border: none; border: none;
align-items:center;
align-items:center;
} }
...@@ -94,9 +92,10 @@ border-radius: 10px; ...@@ -94,9 +92,10 @@ border-radius: 10px;
text-decoration:none; text-decoration:none;
background-color: rgba(11, 49, 110, 0.75); background-color: rgba(11, 49, 110, 0.75);
background-image: url(imagenes/descarga.svg); background-image: url(imagenes/descarga.svg);
border-radius: 10px;; border-radius: 5px;;
padding: 15px; padding: 10px;
border-radius: 10px; border-radius: 10px;
margin:10px;
text-decoration: none; text-decoration: none;
color:#ffff; color:#ffff;
text-align:left; text-align:left;
...@@ -104,21 +103,37 @@ border-radius: 10px; ...@@ -104,21 +103,37 @@ border-radius: 10px;
width:80px; width:80px;
text-align:center; text-align:center;
} }
/*hola mundo*/
input#ruby,input#python,input#c,input#javascript,input#java{ input#ruby,input#python,input#c,input#javascript,input#java{
width:20px; width:30px;
} }
input#experiencia_laboral,input#notebook,input#universidad{ input#experiencia_laboral,input#notebook,input#universidad{
width:100px; width:500px;
} }
/* para el alert */
.alert {
padding: 10px;
background-color: background-color: #2196F3;
color: white;
}
.alert.info {background-color: #2196F3;}
.alert.error {background-color: #ff0000;}
.closebtn {
margin-left: 15px;
color: white;
font-weight: bold;
float: right;
font-size: 22px;
line-height: 20px;
cursor: pointer;
transition: 0.3s;
}
.closebtn:hover {
/* parrafo final */ color: black;
//mi parte jose leeme }
</style>
img.logoi{ img.logoi {
width: 200px; width: 200px;
}
} img {
width: 400px;
img{ padding: 10px;
width: 400px; display: block;
padding: 10px; padding: 10px;
display: block; }
padding:10px ;
} .header {
.header { margin-bottom: 0;
margin-bottom: 0; width: 700px;
width: 700px; }
}
a{ a {
float: right 100px; float: right 100px;
color: #fff; color: #fff;
font-size: larger; font-size: larger;
text-decoration: none; text-decoration: none;
padding: 10px; padding: 10px;
}
}
body {
body { background: linear-gradient(100deg, rgba(20, 99, 155, 0.25), rgba(30, 148, 227, 0.25));
background: linear-gradient(100deg, rgba(20, 99, 155, 0.25), rgba(30, 148, 227, 0.25)); background-image: url(imagenes/descarga.svg);
background-image: url(webapp/imagenes/descarga.svg);
background-size: contain; background-size: contain;
background-attachment: fixed; background-attachment: fixed;
background-blend-mode: multiply; background-blend-mode: multiply;
font-family: Georgia, 'Times New Roman', Times, serif; font-family: Georgia, 'Times New Roman', Times, serif;
color: white; color: white;
position: relative; position: relative;
width: 100px; width: 100px;
height: 100px; height: 100px;
} }
/* ul{ /* ul{
list-style: none; list-style: none;
} }
.menu >ul{ .menu >ul{
...@@ -54,93 +53,73 @@ body { ...@@ -54,93 +53,73 @@ body {
marging-left marging-left
position:relative; position:relative;
} */ } */
.menu {
width: 400%;
float: left;
}
.menu ul li {
float: right;
list-style-type: none;
text-align: right;
}
div.menu{
float: right;
}
html, body {
margin:0;
padding:0;
height:100%;
}
.menu ul li a {
padding-left: 5px;
font-size: clamp(145px); .menu {
text-transform: uppercase; width: 400%;
display: block; float: left;
position: relative; }
overflow: hidden;
padding-bottom: 50px; .menu ul li {
white-space: nowrap; float: right;
} list-style-type: none;
.grafico,svg { text-align: right;
max-width: 50px; }
display: block;
height: auto; div.menu {
} float: right;
.seccion.hero { }
margin-top: 10px;
padding-bottom: 10px; .menu ul li a {
width: 900px; padding-left: 5px;
} text-decoration: none;
.hero { font-size: clamp(145px);
perspective: 100px; text-transform: uppercase;
} display: block;
.hero { position: relative;
display: grid; overflow: hidden;
grid-template-columns: auto repeat(5, 0.5fr) auto; padding-bottom: 50px;
} white-space: nowrap;
.hero { }
display: flex;
flex-direction: column; .grafico,
align-items: center; svg {
padding-left: 200px; max-width: 50px;
/* padding-right: 200px; display: block;
height: auto;
}
.seccion.hero {
margin-top: 10px;
padding-bottom: 10px;
width: 900px;
}
.hero {
perspective: 100px;
}
.hero {
display: grid;
grid-template-columns: auto repeat(5, 0.5fr) auto;
}
.hero {
display: flex;
flex-direction: column;
align-items: center;
padding-left: 200px;
/* padding-right: 200px;
*/ */
} }
/* */ /* */
.postulacion{
border-radius: 30px; .postulacion {
} border-radius: 30px;
.cta-main{ }
width: 200px;
font-family: monospace; .cta-main {
background-color: yellow; width: 200px;
border: none; font-family: monospace;
} background-color: yellow;
/* Contenido pie de pagina */ border: none;
/* usamos media quiere para el responsive */ }
/* @media (min-width: 768px)
.footer {
display: grid;
grid-template-rows: auto auto;
align-items: flex-start;
gap: 0;
padding: 80px 20px
} */
.footer{
margin-top: 10px;
padding-bottom: 10px;
height:100px;
width: 100px;
display: grid;
}
.menu-footer a{
text-decoration: none;
float: right;
}
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<!-- para concectar con css --> <!-- para concectar con css -->
<link rel="stylesheet" href="estilos/home.css"> <link rel="stylesheet" href="home.css">
<!-- el icono para la pagina --> <!-- el icono para la pagina -->
<link rel="shortcut icon" href="imagenes/roshkaicon.ico" sizes="any" /> <link rel="shortcut icon" href="imagenes/roshkaicon.ico" sizes="any" />
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
<ul> <ul>
<li class="link-menu"><a href="">Home</a></li> <li class="link-menu"><a href="">Home</a></li>
<li class="link-menu"><a href="bootcamp.jsp">Postulate</a></li>
<li class="link-menu"><a href="formulario_bootcamp.jsp">Crear bootcamp</a></li>
<li class="link-menu"><a href="manage_postulantes.jsp">Manage Postulantes(perdon angel)</a></li>
<li class="link-menu"><a href="formulario.jsp">Postulate</a></li> <li class="link-menu"><a href="formulario.jsp">Postulate</a></li>
<li class="link-menu"><a href="formulario_bootcamp.jsp">Crear bootcamp</a> <li class="link-menu"><a href="formulario_bootcamp.jsp">Crear bootcamp</a>
<li class="link-menu"><a href="login.jsp">Login</a> <li class="link-menu"><a href="login.jsp">Login</a>
...@@ -35,6 +39,7 @@ ...@@ -35,6 +39,7 @@
</li> </li>
<li class="link-menu"><a href="formulario_profesor.jsp">Crear profesor</a> <li class="link-menu"><a href="formulario_profesor.jsp">Crear profesor</a>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -87,130 +92,3 @@ ...@@ -87,130 +92,3 @@
</body> </body>
</html> </html>
<style>
img.logoi {
width: 200px;
}
img {
width: 400px;
padding: 10px;
display: block;
padding: 10px;
}
.header {
margin-bottom: 0;
width: 700px;
}
a {
float: right 100px;
color: #fff;
font-size: larger;
text-decoration: none;
padding: 10px;
}
body {
background: linear-gradient(100deg, rgba(20, 99, 155, 0.25), rgba(30, 148, 227, 0.25));
background-image: url(imagenes/descarga.svg);
background-size: contain;
background-attachment: fixed;
background-blend-mode: multiply;
font-family: Georgia, 'Times New Roman', Times, serif;
color: white;
position: relative;
width: 100px;
height: 100px;
}
/* ul{
list-style: none;
}
.menu >ul{
float: right;
}
.menu li a {
color:#fff;
text-decoration:none;
padding:10px 12px;
display:block;
}
.menu li ul li {
marging-left
position:relative;
} */
.menu {
width: 400%;
float: left;
}
.menu ul li {
float: right;
list-style-type: none;
text-align: right;
}
div.menu {
float: right;
}
.menu ul li a {
padding-left: 5px;
text-decoration: none;
font-size: clamp(145px);
text-transform: uppercase;
display: block;
position: relative;
overflow: hidden;
padding-bottom: 50px;
white-space: nowrap;
}
.grafico,
svg {
max-width: 50px;
display: block;
height: auto;
}
.seccion.hero {
margin-top: 10px;
padding-bottom: 10px;
width: 900px;
}
.hero {
perspective: 100px;
}
.hero {
display: grid;
grid-template-columns: auto repeat(5, 0.5fr) auto;
}
.hero {
display: flex;
flex-direction: column;
align-items: center;
padding-left: 200px;
/* padding-right: 200px;
*/
}
/* */
.postulacion {
border-radius: 30px;
}
.cta-main {
width: 200px;
font-family: monospace;
background-color: yellow;
border: none;
}
</style>
\ No newline at end of file
<<<<<<< HEAD
=======
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
...@@ -22,5 +20,4 @@ ...@@ -22,5 +20,4 @@
</body> </body>
</html> </html>
>>>>>>> origin/develop \ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<link rel="shortcut icon" href="imagenes/roshkaicon.ico" sizes="any" />
</head>
<style> <style>
<link href="https://fonts.googleapis.com/css2?family=Concert+One&family=Francois+One&family=Satisfy&family=Staatliches&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Concert+One&family=Francois+One&family=Satisfy&family=Staatliches&display=swap" rel="stylesheet">
......
...@@ -5,6 +5,11 @@ ...@@ -5,6 +5,11 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<!-- el icono para la pagina -->
<link rel="shortcut icon" href="imagenes/roshkaicon.ico" sizes="any" />
<!-- coneccion con el de css -->
<link rel="stylesheet" href="postulante.css">
<title>Postulantes Manage</title> <title>Postulantes Manage</title>
</head> </head>
......
body{
background-image: url(imagenes/descarga.svg);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment