Merge origin/master

Conflicts:
	src/java/bdd/PompierMySql.java
	src/java/com/test/servlets/authentifServlet.java
	web/WEB-INF/CreaPompier.jsp
This commit is contained in:
funcha.ahamadi 2021-10-21 17:51:15 +02:00
parent 7b3fd1e8e3
commit b78f08f25e
8 changed files with 92 additions and 11 deletions

View File

@ -162,8 +162,8 @@ public class PompierMySql {
resultQ.getInt("bip"),
resultQ.getInt("nbGardes"),
resultQ.getInt("grade"),
resultQ.getString("commentaire"),
resultQ.getInt("idEmployeur")
resultQ.getString("commentaire")
);
@ -179,6 +179,25 @@ public class PompierMySql {
return resultat;
}
public int update(HttpServletRequest request){
Statement stmt = theConnection.createStatement();
ResultSet resultQ = null;
resultQ = stmt.executeQuery(sql);
resultat = (resultQ.next());
if (resultat) {
}
}
private void setResultat(String pompier) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

View File

@ -69,6 +69,26 @@ public class Pompier {
this.idEmployeur = idEmployeur;
}
public Pompier(int id, int idCaserne, String nom, String prenom, int statut, int typePers, String mail, String login, String mdp, String adresse, String cp, String ville, int bip, int nbGardes, int grade, String commentaire) {
this.id = id;
this.idCaserne = idCaserne;
this.nom = nom;
this.prenom = prenom;
this.statut = statut;
this.typePers = typePers;
this.mail = mail;
this.login = login;
this.mdp = mdp;
this.adresse = adresse;
this.cp = cp;
this.ville = ville;
this.bip = bip;
this.nbGardes = nbGardes;
this.grade = grade;
this.commentaire = commentaire;
}
public int getId() {
return id;
}

View File

@ -0,0 +1,34 @@
/*
* 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.
*/
package com.test.forms;
import bdd.PompierMySql;
import jakarta.servlet.http.HttpServletRequest;
/**
*
* @author funcha.ahamadi
*/
public class ModifPompierForm {
private String resultat;
public String getResultat() {
return resultat;
}
public void setResultat(String resultat) {
this.resultat = resultat;
}
public int Modif(HttpServletRequest request) {
PompierMySql p = new PompierMySql();
boolean resul = p.Update(request);
}
}

View File

@ -95,6 +95,9 @@ public class authentifServlet extends HttpServlet {
.forward(request, response);
}
}
/**

View File

@ -26,22 +26,27 @@
<label for="nStatut">Numéro de statut : </label>
<input type="number" name="nStatut" value="${unPompier.getStatut()}"/><br /><br/>
<label for="eMail">Mail : </label>
<input type="email" name="eMail" value="${unPompier.getAdrmail()}"/> <br /><br/>
<input type="email" name="eMail" value="${unPompier.getMail()}"/> <br /><br/>
<label for="ztLogin">Login : </label>
<input type="text" name="ztLogin" placeholder="Login" value="${unPompier.getLogin()}"/><br /><br/>
<label for="ztMDP">Mot de passe : </label>
<input type="password" name="ztMDP" placeholder="Mot de passe" value="${unPompier.getMdp()}"/><br /><br />
<label for="nAdrNo">Numéro de rue : </label>
<input type="number" name="nAdrNo"<br <c:out value="${unPompier.getAdrNo()}"/> <br/>
<label for="ztAdrRue">Nom de la rue : </label>
<input type="text" name="ztAdrRue" placeholder="Rue" value="${unPompier.getAdrRue()}"/><br /><br/>
<label for="ztAdresse">Adresse : </label>
<input type="text" name="ztAdresse" value="${unPompier.getAdresse()}"/><br /><br/>
<label for="ztAdrCP">Code postal : </label>
<input type="text" name="ztAdrCP" placeholder="Code postal" value="${unPompier.getAdrCP()}"/><br /><br/>
<input type="text" name="ztAdrCP" placeholder="Code postal" value="${unPompier.getCp()}"/><br /><br/>
<label for="ztAdrVille">Ville : </label>
<input type="text" name="ztAdrVille" placeholder="Ville" value="${unPompier.getAdrVille()}"/><br /><br/>
<input type="text" name="ztAdrVille" placeholder="Ville" value="${unPompier.getVille()}"/><br /><br/>
<label for="nBip">Numéro de bip : </label>
<input type="number" name="nBip" value="${unPompier.getBip()}"/><br /><br/>
<label for="nbGardes">Nombre de gardes : </label>
<input type="number" name="nbGardes" value="${unPompier.getNbGardes()}"/><br /><br/>
<label for="nGrade">Numéro de grade : </label>
<input type="number" name="nGrade" value="${unPomier.getGrade()}"/><br /><br/>
<input type="number" name="nGrade" value="${unPompier.getGrade()}"/><br /><br/>
<label for="commentaire">Commentaire : </label>
<input type="text" name="commentaire" placeholder="Commentaire" value="${unPompier.getCommentaire()}"/><br /><br/>
<input type="submit" value="Valider" />
</form>
</fieldset>

View File

@ -1,4 +1,4 @@
<%-- any content can be specified here e.g.: --%>
<%@ page pageEncoding="UTF-8" %>
<h2></h2>
<p align="center"><img src="image/SDIS-29.png" alt="SDIS 29" /></p>
<p align="center"><img src="image/SDIS-29(1).png" alt="SDIS 29" width="100" height="100"/></p>

BIN
web/image/SDIS-29(1).png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB