This commit is contained in:
clement.bouillot
2021-10-20 11:18:27 +02:00
commit e5a82f84f2
44 changed files with 3357 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/SDIS29"/>

View File

@@ -0,0 +1,80 @@
<%@include file = "jspf/enteteJSPF.jspf" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="com.test.forms.AuthentifForm" %>
<!-- Message de bienvenue personnalis<69> -->
<p>Bienvenue <c:out value="${param.ztPseudo}" /> sur la nouvelle application de gestion des pompiers : </p>
${empty param.ztPseudo ? "Veuillez vous authentifier" : "Authentification r<>ussie"}
<!-- Affichage du formulaire si l'utilisateur ne s'est pas encore authentifi<66> -->
<c:choose>
<c:when test="${empty param.ztPseudo}">
<fieldset class="legend1">
<legend>Authentification</legend>
<form method="POST" action="Accueil">
<input type="text" name="ztPseudo" placeholder="Pseudo" /><br /><!-- comment -->
<input type="password" name="ztMDP" placeholder="Mot de passe" /><br /><br />
<input type="submit" value="Valider" />
</form>
</fieldset>
</c:when>
<c:otherwise>
<!-- Si l'utilisateur s'est authentifi<66>,
Affichage du message contenu dans l'objet controlForm de type AuthentifForm -->
<p>${controlForm.getResultat()}</p>
</c:otherwise>
</c:choose>
<br />
<!-- Affichage des 3 liens htpertexte -->
<%@include file="jspf/menuJSPF.jspf" %>
<!-- Test EL Expression Langage -->
<!-- Test avec formule de calcul -->
<!--
<h2>Tests divers </h2>F test
${ 10 / 4} <br />
<p>Test avec EL et JSTL </p>
<p>ztPseudo : ${param.ztPseudo}</p>
<p>isAdmin : ${isAdmin}</p>
<p>Message re<72>u : ${controlForm.getResultat()}</p>
<c:out value="Test jstl : ${controlForm.getResultat()}" />
<c:out value="${controlForm.getResultat()}">
Je ne sais pas encore si vous <20>tes administrateur
</c:out>
<c:set var="message" value="Hello" scope="request" />
<p>Voici le message : ${message} </p>
<p> Test sur controlForm :
${empty controlForm.getResultat() ? "" : controlForm.getResultat()}
</p>
<c:out value="${empty param.ztPseudo ? 'none' : param.ztPseudo += ' enabled'}" />
<c:set var="langue" scope="request">
<c:out value="${param.lang}" default="fran<61>ais" />
</c:set>
<p>Langue : ${langue} </p>
<c:if test="${12 > 7}" var="resultatTest" scope="page" >
Test positif
</c:if>
<p> R<>sultat du test : ${resultatTest}</p>
<c:forEach var="i" begin="0" end="5" step="1" >
Instructions <20> r<>p<EFBFBD>ter (html, ou jstl)- ${i} <br />
</c:forEach>
Voici les controles : <br />
<c:forEach items="${lesControles}" var="unControle" >
${unControle.toString()} <br />
</c:forEach>
-->
</body>
</html>

View File

@@ -0,0 +1,17 @@
<%-- any content can be specified here e.g.: --%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%--
Document : newjsp
Created on : 18 sept. 2021, 15:34:04
Author : ClémentB
--%>
<link href="css/defaultCSS.css" rel="stylesheet" type="text/css"/>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Gestion des pompiers</title>
</head>
<body class="textWhiteLED">
<img src="images/logo-sdis.png" alt="" class="right"/>
<h1 class="textDegradRed">Gestion des pompiers</h1>

View File

@@ -0,0 +1,7 @@
<%-- any content can be specified here e.g.: --%>
<%@ page pageEncoding="UTF-8" %>
<nav>
<a class="textOrange" href ="Accueil">Accueil</a>
<a class="textOrange" href="NouveauClient">Création d'un nouveau client</a>
<a class="textOrange" href="ListeClients">Liste des clients</a>
</nav>

View File

@@ -0,0 +1,60 @@
<%@include file = "jspf/enteteJSPF.jspf" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="java.util.ArrayList" %>
<h2>Liste des clients</h2><!-- comment -->
<!-- <p>Page en cours de construction</p>
<img src="images/pageEnConstruction.jpg" alt="Page en construction"/>-->
<table border="1" cellspacing="3" cellpadding="1">
<thead>
<tr>
<th>ID</th>
<th>IdCaserne</th>
<th>Nom</th>
<th>Pr<50>nom</th>
<th>Statut</th>
<th>Type Personne</th>
<th>Mail</th>
<th>Login</th>
<th>Adresse</th>
<th>CP</th>
<th>Ville</th>
<th>Bip</th>
<th>Nb garde</th>
<th>Grade</th>
<th>Commentaire</th>
<th>Date cr<63>ation</th>
<th>N Equipe</th>
</tr>
</thead>
<tbody>
<c:forEach items="${lesPompiers}" var="unPompier">
<tr>
<td><c:out value="${unPompier.getId()}"/></td>
<td><c:out value="${unPompier.getIdCaserne()}"/></td>
<td><c:out value="${unPompier.getNom()}"/></td>
<td><c:out value="${unPompier.getPrenom()}"/></td>
<td><c:out value="${unPompier.getStatut()}"/></td>
<td><c:out value="${unPompier.getTypePers()}"/></td>
<td><c:out value="${unPompier.getMail()}"/></td>
<td><c:out value="${unPompier.getLogin()}"/></td>
<td><c:out value="${unPompier.getAdresse()}"/></td>
<td><c:out value="${unPompier.getCp()}"/></td>
<td><c:out value="${unPompier.getVille()}"/></td>
<td><c:out value="${unPompier.getBip()}"/></td>
<td><c:out value="${unPompier.getNbGardes()}"/></td>
<td><c:out value="${unPompier.getGrade()}"/></td>
<td><c:out value="${unPompier.getCommentaire()}"/></td>
<td><c:out value="${unPompier.getDateEnreg()}"/></td>
<td><c:out value="${unPompier.getIdEquipe()}"/></td>
</tr>
</c:forEach>
</tbody>
</table>
<br />
<%@include file="jspf/menuJSPF.jspf" %>
</body>
</html>

View File

@@ -0,0 +1,70 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@include file = "jspf/enteteJSPF.jspf" %>
<h2>Cr<43>ation d'un nouveau Pompier</h2><!-- comment -->
<!-- <p>Page en cours de construction</p><!-- comment -->
<img src="images/pageEnConstruction.jpg" alt="Page en construction"/>
<fieldset>
<legend>Fiche Pompier</legend>
<form name="fPompier" action="NouveauPompier" method="POST">
<label for="ztPrenom"> Pr<50>nom </label>
<input type="text" name="ztPrenom" id="ztPrenom" value="" />
<label for="ztNom">Nom </label>
<input type="text" name="ztNom" id="ztNom" value="" />
<label for="ztPwd">Mot de passe </label>
<input type="password" name="ztPwd" id="ztPwd" value="" />
<label for="ztLogin">Login </label>
<input type="text" name="ztLogin" id="ztLogin" value="" /><br><br>
Adresse postale :
<input type="text" name="ztAdresse" value="" placeholder="Adresse"/>
<input type="text" name="ztCP" value="" placeholder="Code postal"/>
<input type="text" name="ztVille" value="" placeholder="Ville"/><br><br>
<label for="ztMail">Adresse mail </label>
<input type="email" name="ztMail" id="ztMail" value="" />
<label for="ztTel">T<>l<EFBFBD>phone </label>
<input type="text" name="ztTel" id="ztTel" value="" />
<label for="ztDateNais">Date de naissance </label>
<input type="date" min="1921-01-01" name="ztDateNais" id="ztDateNais" value="" />
<br><br><!-- comment -->
Information Pompier:
<input type="text" name="ztStatut" value="" placeholder="Statut"/>
<input type="text" name="ztTypePersonne" value="" placeholder="Type personne"/>
<input type="text" name="ztGrade" value="" placeholder="Grade"/>
<input type="text" name="ztIdEquipe" value="" placeholder="Equipe"/><br>
<label for="ztNbGarde"> Nombre de garde</label>
<form oninput="result.value=parseInt(NbGarde.value)">
<input type="range" name="NbGarde" value="50" />
<output name="result">60</output>
</form>
<output ><br><br>
<input type="submit" value="Valider" />
</form>
</fieldset>
<br>
<p>
<c:choose>
<c:when test="${idPompier >= 0}">
Le Pompier no ${id} a <20>t<EFBFBD> cr<63><72> avec succ<63>s
</c:when>
<c:when test="${idClient == -1}">
E R R E U R : ${message}
</c:when>
<c:otherwise>
Cliquez sur <em>"Valider"</em> apr<70>s avoir renseign<67> les informations demand<6E>es
</c:otherwise>
</c:choose>
</p>
<%@include file="jspf/menuJSPF.jspf" %>
<article>
<h3>Liste des num<75>ros des clients r<>cement cr<63><72>s : </h3>
<c:forEach items="${sessionScope.lesNvxClients}" var="unPompier">
${unClient} -
</c:forEach>
</article>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<?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>AuthentifFiltrer</filter-name>
<filter-class>com.test.filter.AuthentifFiltrer</filter-class>
</filter>
<filter-mapping>
<filter-name>AuthentifFiltrer</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>AccueilServlet</servlet-name>
<servlet-class>com.test.servlets.AccueilServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>NouveauServlet</servlet-name>
<servlet-class>com.test.servlets.NouveauServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>AuthentificationServlet</servlet-name>
<servlet-class>com.test.servlets.AuthentificationServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AccueilServlet</servlet-name>
<url-pattern>/Accueil</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>NouveauServlet</servlet-name>
<url-pattern>/NouveauClient</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AuthentificationServlet</servlet-name>
<url-pattern>/Authentification</url-pattern>
</servlet-mapping>
</web-app>

View File

@@ -0,0 +1,84 @@
/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/*
Created on : 18 oct. 2021, 14:23:00
Author : nathan.balducci
*/
.right { float:right; margin:0 10px 0 20px; }
.backgroundGrey {background: #333333;}
.textRedLED {font-family: Tahoma;text-shadow:0 0 3px #db0005, 0 0 10px #db0005, 0 0 20px #db0005;color:#db0005; background-color:#333333;}
h1 {font-family: Tahoma;text-shadow:#ffe69a 0 -1px 0,#db0005 2px 2px 0,#db0005 3px 3px 0,#db0005 4px 4px 0,#db0005 5px 5px 10px;color:#ececec;}
.textDegradOrange {font-family: Tahoma;text-shadow:#ffe69a 0 -1px 0,#ff6e18 2px 2px 0,#ff6e18 3px 3px 0,#ff6e18 4px 4px 0,#ff6e18 5px 5px 10px;color:#ececec;}
.textBeige {font-family: Tahoma;color:#ffe69a;}
a {font-family: Tahoma;color:#ff6e18;text-shadow:0;}
html {font-family: Tahoma;text-shadow:1; padding: 30px;color:#fff;background-color:#333333;}
fieldset
{
border:3px solid #db0005;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
border-style: inset;
}
input {
background: #ff6e18;
color: #fff;
border: 1px solid #eee;
border-radius: 5px;
border-style: outset;
text-shadow:none;
}
input:hover {
background: #db0005;
color: #fff;
border: 1px solid #eee;
border-radius: 5px;
border-style: inset;
text-shadow:none;
}
table {
table-layout: inherit;
width: 100%;
border-collapse: collapse;
border: 3px #db0005;
}
thead, tfoot {
color: white;
text-shadow: 1px 1px 1px black;
}
thead th, tfoot th, tfoot td {
background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.5));
border: 3px #db0005;
width: 30%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 KiB

16
SDIS29/web/index.html Normal file
View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>Gestion des clients</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div>TODO write content</div>
</body>
</html>

41
SDIS29/web/welcomeJSF.jsp Normal file
View File

@@ -0,0 +1,41 @@
<%--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%--
This file is an entry point for JavaServer Faces application.
--%>
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>JSP Page</title>
</head>
<body>
<h1><h:outputText value="JavaServer Faces"/></h1>
</body>
</html>
</f:view>