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/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/gitmisc.xml
.idea/encodings.xml
.idea/**
.idea/modules.xml
......@@ -13,7 +14,7 @@ target/
*.iws
*.iml
*.ipr
/encodings.xml
### Eclipse ###
.apt_generated
.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 @@
</list>
</option>
</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" />
</component>
</project>
\ No newline at end of file
......@@ -3,6 +3,7 @@ package com.roshka.proyectofinal.Postulante;
import com.roshka.proyectofinal.DataBase;
import com.roshka.proyectofinal.entity.Postulante;
import com.roshka.proyectofinal.entity.Bootcamp;
import com.roshka.proyectofinal.entity.PostulanteLenguaje;
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
......@@ -15,7 +16,6 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
@WebServlet("/SaveServlet")
public class SaveServlet extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
......@@ -24,14 +24,13 @@ public class SaveServlet extends HttpServlet {
response.setContentType("text/html");
PrintWriter out=response.getWriter();
boolean rechazarDatos = false;
int bootcampActual = 3;
int bootcampActual = Integer.parseInt(request.getParameter("bootcamp_id"));
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"));
......@@ -44,6 +43,17 @@ public class SaveServlet extends HttpServlet {
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 direccion=request.getParameter("direccion");
boolean experienciaProgramando = false;
......@@ -53,17 +63,17 @@ public class SaveServlet extends HttpServlet {
if (request.getParameter("experiencia_laboral") != null){
experienciaLaboral = true;
}
if (request.getParameter("experiencia_programando") != null) {
experienciaProgramando = true;
}
if (request.getParameter("notebook") != null){
notebook = true;
}
if (request.getParameter("universidad") != null){
universidad = true;
}
Bootcamp bootcamp = new Bootcamp();
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){
postulante.setNombre(nombre);
......@@ -77,33 +87,47 @@ public class SaveServlet extends HttpServlet {
postulante.setNotebook(notebook);
postulante.setBootcampId(bootcampActual);
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){
//out.print("<p>Record saved successfully!</p>");
out.print(" <div class=\"alert\">\n" +
if(status>0){
//out.print("<p>Record saved successfully!</p>");
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" +
" <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>");
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){
ex.printStackTrace();
}
......
......@@ -44,9 +44,34 @@ public class Postulante {
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() {
return id;
}
public int getNro_cedula() {
return nroCedula;
}
......@@ -118,35 +143,13 @@ public class Postulante {
this.id = id;
}
public int getNroCedula() {
return nroCedula;
}
public void setNroCedula(int nroCedula) {
this.nroCedula = nroCedula;
}
public String getNombreBootcamp() {
return nombreBootcamp;
}
public void setNombreBootcamp(String 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{
/* contenedor */
/* para el forrmulario */
.form label{
display: block;
border: none;
align-items:center;
border: none;
align-items:center;
}
......@@ -94,9 +92,10 @@ border-radius: 10px;
text-decoration:none;
background-color: rgba(11, 49, 110, 0.75);
background-image: url(imagenes/descarga.svg);
border-radius: 10px;;
padding: 15px;
border-radius: 5px;;
padding: 10px;
border-radius: 10px;
margin:10px;
text-decoration: none;
color:#ffff;
text-align:left;
......@@ -104,21 +103,37 @@ border-radius: 10px;
width:80px;
text-align:center;
}
/*hola mundo*/
input#ruby,input#python,input#c,input#javascript,input#java{
width:20px;
width:30px;
}
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;
}
/* parrafo final */
//mi parte jose leeme
</style>
.closebtn:hover {
color: black;
}
img.logoi{
width: 200px;
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(webapp/imagenes/descarga.svg);
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{
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{
......@@ -54,93 +53,73 @@ body {
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;
}
html, body {
margin:0;
padding:0;
height:100%;
}
.menu ul li a {
padding-left: 5px;
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;
.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;
}
/* Contenido pie de pagina */
/* 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
}
/* */
.postulacion {
border-radius: 30px;
}
.cta-main {
width: 200px;
font-family: monospace;
background-color: yellow;
border: none;
}
......@@ -9,7 +9,7 @@
<!-- para concectar con css -->
<link rel="stylesheet" href="estilos/home.css">
<link rel="stylesheet" href="home.css">
<!-- el icono para la pagina -->
<link rel="shortcut icon" href="imagenes/roshkaicon.ico" sizes="any" />
......@@ -26,6 +26,10 @@
<ul>
<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_bootcamp.jsp">Crear bootcamp</a>
<li class="link-menu"><a href="login.jsp">Login</a>
......@@ -35,6 +39,7 @@
</li>
<li class="link-menu"><a href="formulario_profesor.jsp">Crear profesor</a>
</li>
</ul>
</div>
......@@ -87,130 +92,3 @@
</body>
</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" %>
<!DOCTYPE html>
<html>
......@@ -22,5 +20,4 @@
</body>
</html>
>>>>>>> origin/develop
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" href="imagenes/roshkaicon.ico" sizes="any" />
</head>
<style>
<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 @@
<head>
<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>
</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