diff --git a/src/java/bdd/PompierMySql.java b/src/java/bdd/PompierMySql.java index bf610bd..a582f3c 100644 --- a/src/java/bdd/PompierMySql.java +++ b/src/java/bdd/PompierMySql.java @@ -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") + ); @@ -178,6 +178,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. diff --git a/src/java/com/test/beans/Pompier.java b/src/java/com/test/beans/Pompier.java index 6fc0b9d..d8f84c8 100644 --- a/src/java/com/test/beans/Pompier.java +++ b/src/java/com/test/beans/Pompier.java @@ -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; } diff --git a/src/java/com/test/forms/ModifPompierForm.java b/src/java/com/test/forms/ModifPompierForm.java new file mode 100644 index 0000000..b163387 --- /dev/null +++ b/src/java/com/test/forms/ModifPompierForm.java @@ -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); + + + } +} diff --git a/src/java/com/test/servlets/authentifServlet.java b/src/java/com/test/servlets/authentifServlet.java index 6c97caa..ec724ed 100644 --- a/src/java/com/test/servlets/authentifServlet.java +++ b/src/java/com/test/servlets/authentifServlet.java @@ -94,6 +94,9 @@ public class authentifServlet extends HttpServlet { getServletContext().getRequestDispatcher("/WEB-INF/accueilJSP.jsp") .forward(request, response); } + + + } diff --git a/web/WEB-INF/ModifPompier.jsp b/web/WEB-INF/ModifPompier.jsp index 5a33108..93b2bcf 100644 --- a/web/WEB-INF/ModifPompier.jsp +++ b/web/WEB-INF/ModifPompier.jsp @@ -26,22 +26,27 @@

-

+





- -
- -

+ +

-

+

-

+

+ +

+ +

-

+

+ +

+ diff --git a/web/WEB-INF/jspf/enteteJSPF.jspf b/web/WEB-INF/jspf/enteteJSPF.jspf index ada0472..5a2b244 100644 --- a/web/WEB-INF/jspf/enteteJSPF.jspf +++ b/web/WEB-INF/jspf/enteteJSPF.jspf @@ -1,4 +1,4 @@ <%-- any content can be specified here e.g.: --%> <%@ page pageEncoding="UTF-8" %>

-

SDIS 29

+

SDIS 29

diff --git a/web/image/SDIS-29(1).png b/web/image/SDIS-29(1).png new file mode 100644 index 0000000..ed67b08 Binary files /dev/null and b/web/image/SDIS-29(1).png differ diff --git a/web/image/SDIS-29.png b/web/image/SDIS-29.png deleted file mode 100644 index fc44c44..0000000 Binary files a/web/image/SDIS-29.png and /dev/null differ