Commit 8cad19f6 by Jose Baez

Merge branch 'postulantediseñosyovan' into 'develop'

Postulantediseñosyovan

See merge request !36
parents d3a6ea52 5672de56
......@@ -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="17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
......@@ -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("<p>Record saved successfully!</p>");
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" +
" <span class=\"closebtn\" onclick=\"this.parentElement.style.display='none';\">&times;</span> \n"
+
" <strong>Formulario Cargado!</strong> EXITOSAMENTE CARGADO\n" +
"</div>");
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("<div class='alert info''>");
out.print("<span class='closebtn'' onclick='this.parentElement.style.display='none';'>&times;</span>");
out.print(
"<span class='closebtn'' onclick='this.parentElement.style.display='none';'>&times;</span>");
out.print("<strong>Formulario ya Cargado!</strong> YA EXISTE EL FORMULARIO");
out.print("</div>");
//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("<div class='alert info error'>" +
"<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 ya Cargado!</strong> YA EXISTE EL FORMULARIO\n" +
"</div>");
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();
}
......
......@@ -7,6 +7,7 @@ pageEncoding="UTF-8"%>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="imagenes/roshkaicon.ico" sizes="any" />
<title>Bootcamp</title>
<meta name="author" content="cssremix.com">
<meta name="robots" content="index,follow">
......
// 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 <span class="closebtn"> (<div class="alert">)
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);
}
}
......@@ -11,6 +11,7 @@ pageEncoding="UTF-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="form.css" type="text/css">
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="formJS.js"></script>
<script src="Javascript.js"></script>
<link rel="stylesheet" media="(max-width: 800px)" href="example.css" />
<title>Formulario Postulante</title>
......@@ -133,4 +134,5 @@ pageEncoding="UTF-8"%>
}
init();
})();
</script>
\ No newline at end of file
</script>
......@@ -24,7 +24,7 @@
Lenguaje len = null;
ProfesorDao profeDao = new ProfesorDao();
List<Profesor> listProfesor = profeDao.listar();
List<Profesor> listProfesor = profeDao.listarProfesor();
Iterator<Profesor> iterProfe = listProfesor.iterator();
Profesor profe = null;
%>
......@@ -130,7 +130,7 @@
Lenguaje len2 = null;
ProfesorDao profeDao2 = new ProfesorDao();
List<Profesor> listProfesor2 = profeDao2.listar();
List<Profesor> listProfesor2 = profeDao2.listarProfesor();
Iterator<Profesor> iterProfe2 = listProfesor2.iterator();
Profesor profe2 = null;
Bootcamp bootcampToEdit = (Bootcamp)request.getAttribute("Bootcamp");
......
* {
box-sizing: border-box;
}
body {
font-family: 'Concert One', cursive;
font-size: 13px
......
<!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">
* {
box-sizing: border-box;
}
a{
text-decoration:none;
}
body {
font-family: 'Concert One', cursive;
font-family: 'Francois One', sans-serif;
font-family: 'Satisfy', cursive;
font-family: 'Staatliches', cursive;
font-size: 13px
}
.header, .footer {
background-color:rgb(18, 18, 98);
color: white;
padding: 60px;
}
.column {
float: left;
padding: 30px;
}
.clearfix::after {
content: "";
clear: both;
display: table;
}
a{
color:white;
}
.menu {
width: 50%;
}
.content {
width: 50%;
}
.menu ul {
list-style-type: none;
margin: 0;
padding: 0;
}
.menu li {
padding: 8px;
margin-bottom: 8px;
background-color: rgb(18, 18, 98);
color: #ffffff;
}
.menu li:hover {
background-color: rgb(18, 18, 98);
}
</style>
</head>
<body>
<div class="header">
<h1> MENU TH</h1>
<h2> EN LOS SIGUIENTES LINKS PUEDE MODIFICAR, AGREGAR O ELIMINAR DATOS DE LA BASE DE DATOS DEL BOOTCAMP </h2>
</div>
<div class="column content">
<h1>PUEDE ACCEDER A LOS SIGUIENTES LINKS:</h1>
</div>
<div class="clearfix">
<div class="column menu">
<ul>
<li><a href="#"> MANAGE BOOTCAMP </a></li>
<li><a href="filtros-postulante"> MANAGE POSTULANTE </a></li>
<li><a href="#"> MANAGE LENGUAJES </a></li>
<li><a href="#"> MANAGE PROFESORES </a></li>
<li><a href="#"> USUARIO NUEVO (ADMINISTRADOR) </a></li>
</ul>
</div>
</div>
</body>
</html>
......@@ -14,13 +14,41 @@
</head>
<body>
<div class="logo">
<a href="./index.html"> <img class="logoi" src="imagenes/logo-roshka.svg" alt="" /> </a>
<!-- logo con link -->
</div>
<div class="container">
<h1>Lista Postulantes</h1>
<div class="filtros">
<form action="filtros-postulante" >
<input type="search" name="nombreBuscar"
placeholder="Buscar por nombre">
<button type="submit">Buscar</button>
<form action="filtros-postulante" method="post">
<form action="filtros-postulante" method="post">
<input type="search" name="nombre" placeholder="Buscar por Bootcamp" required>
<button type="submit">Bootcamp</button>
</form>
<form action="filtros-postulante" method="post">
<input type="hidden" name="nombre" value="notebook">
<button type="submit">Notebooks</button>
<form action="filtros-postulante" method="post">
<input type="hidden" name="nombre" value="aceptado">
<button class="aceptado" type="submit">Aceptado</button>
</form>
</form>
</div>
<div>
<h1>LISTA POSTULANTES</h1>
<form action="filtros-postulante" >
<input type="search" name="nombreBuscar"
placeholder="Buscar por nombre">
<button type="submit">Buscar</button>
</form>
<table>
<tr>
<th>#</th>
......@@ -33,26 +61,17 @@
<th>Experiencia laboral</th>
<th>Estudio universitario</th>
<th>
<form action="filtros-postulante" method="post">
<input type="hidden" name="nombre" value="notebook">
<button type="submit">Notebooks</button>
</form>
Notebooks
</th>
<th>
<form action="filtros-postulante" method="post">
<input type="search" name="nombre" placeholder="Buscar por Bootcamp" required>
<button type="submit">Bootcamp</button>
</form>
Bootcamps
</th>
<th>
<form action="filtros-posjtulante" method="post">
<input type="hidden" name="nombre" value="aceptado">
<button type="submit">Aceptado</button>
</form>
Aceptado
</th>
<th></th>
</tr>
<tbody>
<tbody class="tcuerpo">
<c:forEach var="postulante" items="${postulantes}" varStatus="myIndex">
<tr>
<td> ${myIndex.index + 1}-</td>
......
@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;}
......@@ -10,6 +10,7 @@ Pinterest: https://pinterest.com/mycnlz/
<div class='box-form'>
<div class='box-login-tab'></div>
<div class='box-login-title'>
<link rel="shortcut icon" href="imagenes/roshkaicon.ico" sizes="any" />
<div class='i i-login'></div><h2> USUARIO </h2>
<link rel="stylesheet" href="usrebe.css">
<link rel="stylesheet" href="usrebe.js">
......
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