reprise directement sur la base de la correction

This commit is contained in:
morgann.david
2024-11-14 15:11:52 +01:00
commit 621f383535
36 changed files with 3505 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<%--
Document : authentifJSP
Created on : 23 oct. 2021, 10:02:18
Author : domin
--%>
<%@include file= "jspf/debutJSP.jspf" %>
<body>
<c:set var="page" value="1" scope="request" />
<%@include file= "jspf/header.jspf" %>
<div class="container">
<section id="contenuAffiche">
<fieldset id="authentif">
<legend>
Authentification
</legend>
<form id="fAuthentif" method="POST" action="authentification">
<div class="mb-3 mt-3">
<label for="ztLogin"> Login * </label>
<input type="text" placeholder="login" id="ztLogin"
autocomplete="username" name="ztLogin" class="form-control" required />
</div>
<div class="mb-3">
<label for="ztMDP"> Mot de passe * </label>
<input type="password" placeholder="mdp" id="ztMDP"
name="ztMDP" class="form-control" required />
</div>
<div class="text-center">
<button type="submit" value="Valider" class="btn btn-danger"><i class="bi bi-check2"></i> Valider</button>
</div>
</form>
${message}
</fieldset>
</section> <!-- /section id contenuAffiche -->
<%@include file= "jspf/footer.jspf" %>
</div> <!-- /div class container -->
<!-- Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
</body>
</html>

View File

@@ -0,0 +1,16 @@
<%-- jspf/debutJSP.jsp --%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.6.1/font/bootstrap-icons.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link href="css/mycss.css" rel="stylesheet" />
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
<title>SDIS29</title>
</head>

View File

@@ -0,0 +1,5 @@
<%-- jspf/footer.jspf --%>
<%@ page pageEncoding="UTF-8" %>
<footer>
<p>SDIS 29 - 58, avenue de Keradennec - 29337 QUIMPER CEDEX - 02 98 10 31 50</p>
</footer>

View File

@@ -0,0 +1,21 @@
<%-- any content can be specified here e.g.: --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page pageEncoding="UTF-8" %>
<form action="pompier" method="POST" id="fChoixPompier" name="fChoixPompier">
<div class="row">
<div class="col-md-9">
<label for="ldrPompier">Choix du pompier : </label>
ici se trouvera la liste déroulante des pompiers
</div>
<div class="col-md-3" id="btAfficherPompier" name="btAfficherPompier">
<!--<input class="btn btn-danger" name="btAfficherPompier" type="submit" value="Afficher" /> -->
<button class="btn btn-danger" name="btAfficherPompier" value="Afficher" type="submit"><i class="bi bi-eye-fill"></i> Afficher</button>
<button class="btn btn-danger ms-5" name="btAfficherPompier" value="Ajouter" type="submit"> <i class="bi bi-plus-lg"></i> Ajouter</button>
</div>
</div>
</form>

View File

@@ -0,0 +1,8 @@
<%@ page pageEncoding="UTF-8" %>
<form>
<img src="images/pompier.png"<br>
<input type="text" id="ztNom" name="nom" value="${sessionScope.lePompierConnecte.getNom()}" readonly>
<input type="text" id="ztPrenom" name="prenom" value="${sessionScope.lePompierConnecte.getPrenom()}" readonly><br>
<input type="text" id="ztAdresse" name="adresse" value="${sessionScope.lePompierConnecte.getAdresse()}" readonly><br>
<input type="text" id="ztGrade" name="grade" value="${sessionScope.lePompierConnecte.getLeGrade().getValeur()}" readonly>
</form>

View File

@@ -0,0 +1,45 @@
<%-- jspf/header.jspf --%>
<%@ page pageEncoding="UTF-8" %>
<c:set var="blancs8" value=" " scope="page" />
<header>
<div class="container" id="entete">
<img id="logo" src="images/logo-sdis.png" alt='logo sdis29' />
<div id="identite">
<div id="login">
<c:choose>
<c:when test="${empty sessionScope.lePompierConnecte}">
<h4>Bienvenue</h4>
</c:when>
<c:otherwise>
<h4>Bienvenue ${sessionScope.lePompierConnecte.getNom()} ${sessionScope.lePompierConnecte.getPrenom()}
</h4>
<button type="button" class="btn btn-warning fs-4" title="Déconnexion">
<a href="authentification">
<i class="bi bi-box-arrow-right heading" width="32" height="32" fill="currentColor"></i> Déconnexion
</a>
</button>
</c:otherwise>
</c:choose>
</div>
<h4>Service Départemental d'Incendie et de Secours du Finistère</h4>
Afficher ici les coordonnées de la caserne du pompier connecté
<nav class="navbar navbar-expand-sm bg-danger navbar-dark">
<div class="container-fluid">
<ul class="navbar-nav">
<li class="nav-item">
<span class="nav-link"><pre>${blancs8}</pre> </span>
</li>
<li class="nav-item">
Barre de navigation ici
</li>
</ul>
</div>
</nav>
</div> <!-- fin id=identie -->
</div> <!-- fin class=container -->
</header>

View File

@@ -0,0 +1,50 @@
<%--
pompierJSP.jsp
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file= "jspf/debutJSP.jspf" %>
<body>
<%@include file= "jspf/header.jspf" %>
<div class="container">
<section id="contenuAffiche" class="row">
<c:set var="legend" value="Mes données" scope="page" />
<c:if test="${sessionScope.lePompierConnecte.getLeStatut().getCode() eq 2}" var="testChef" scope="page">
<c:if test="${sessionScope.lePompierConnecte.getId() ne lePompier.getId()}" var="testAffich" scope="page">
<c:set var="legend" scope="page">
Données du pompier
</c:set>
<c:if test="${sessionScope.lePompier==null}" var="testCreation" scope="page">
<c:set var="legend" scope="page">
Données du pompier à créer
</c:set>
</c:if>
<fieldset class="row mb-10 text-center">
<%@include file= "jspf/formChoixPompier.jspf" %>
</fieldset>
</c:if>
</c:if>
<fieldset class="row mt-1 mb-10">
<legend>
${legend}
</legend>
<%@include file= "jspf/formulairePompier.jspf" %>
</fieldset>
</section>
<%@include file= "jspf/footer.jspf" %>
</div> <!-- /div class container -->
<!-- Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<!-- Code postaux -->
<script src="js/ctrlCodePostal.js"></script>
</body>
</html>

26
web/WEB-INF/web.xml Normal file
View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<filter>
<filter-name>authentifFilter</filter-name>
<filter-class>filter.authentifFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>authentifFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>AuthentifServlet</servlet-name>
<servlet-class>servlet.AuthentifServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AuthentifServlet</servlet-name>
<url-pattern>/authentification</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>