Compare commits
No commits in common. "239a3b33e7c6ea2d05494a3eab9233b50c1cd3ac" and "8841819f19ba92c5d56e863382f375f17926ce30" have entirely different histories.
239a3b33e7
...
8841819f19
@ -1,5 +1,4 @@
|
||||
package bdd;
|
||||
|
||||
/*
|
||||
Connexion.java
|
||||
Classe permettant d'établir une connexion avec une base de données mySQL
|
||||
@ -8,12 +7,10 @@ import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
|
||||
public class Connexion {
|
||||
|
||||
private static Connection connect; // Variable de connexion
|
||||
|
||||
/**
|
||||
* Constructeur
|
||||
*
|
||||
* @param serveur nom du serveur, localhost si local
|
||||
* @param bdd nom de la base de données
|
||||
* @param nomUtil nom utilisateur
|
||||
@ -47,9 +44,7 @@ public class Connexion {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne la connection établie (Création d'une connection si elle
|
||||
* n'existe pas)
|
||||
*
|
||||
* Retourne la connection établie (Création d'une connection si elle n'existe pas)
|
||||
* @param serveur nom du serveur, localhost si local
|
||||
* @param bdd nom de la base de données
|
||||
* @param nomUtil nom utilisateur
|
||||
|
@ -23,7 +23,8 @@ public class PompierMysql {
|
||||
private Connection theConnection;
|
||||
private Pompier unPompier;
|
||||
|
||||
public PompierMysql() {
|
||||
public PompierMysql()
|
||||
{
|
||||
theConnection = Connexion.getConnect("localhost", "sdis29", "admin", "minda");
|
||||
}
|
||||
|
||||
@ -67,9 +68,8 @@ public class PompierMysql {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creation du client passé en paramètre dans la table client Requête non
|
||||
* préparée
|
||||
*
|
||||
* Creation du client passé en paramètre dans la table client
|
||||
* Requête non préparée
|
||||
* @param c objet de type Client (sans identifiant)
|
||||
* @return int : id du client créé
|
||||
*/
|
||||
@ -111,9 +111,8 @@ public class PompierMysql {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creation du client passé en paramètre dans la table client Requête
|
||||
* préparée
|
||||
*
|
||||
* Creation du client passé en paramètre dans la table client
|
||||
* Requête préparée
|
||||
* @param c objet de type Client (sans identifiant)
|
||||
* @return int : id du client créé
|
||||
*/
|
||||
@ -141,6 +140,7 @@ public class PompierMysql {
|
||||
System.out.println("Requête : " + stmt.toString());
|
||||
int status = stmt.executeUpdate();
|
||||
|
||||
|
||||
// Recherche de l'identifiant du client créé
|
||||
if (status > 0) {
|
||||
ResultSet result = stmt.getGeneratedKeys();
|
||||
|
@ -12,7 +12,6 @@ import java.util.Objects;
|
||||
* @author thomas.millot
|
||||
*/
|
||||
public class Pompier {
|
||||
|
||||
private int id;
|
||||
private int idCaserne;
|
||||
private String nom;
|
||||
@ -303,4 +302,5 @@ public class Pompier {
|
||||
return "Pompier{" + "id=" + id + ", idCaserne=" + idCaserne + ", nom=" + nom + ", prenom=" + prenom + ", Statut=" + Statut + ", typePers=" + typePers + ", mail=" + mail + ", login=" + login + ", mdp=" + mdp + ", adresse=" + adresse + ", cp=" + cp + ", ville=" + ville + ", bip=" + bip + ", nbGardes=" + nbGardes + ", grade=" + grade + ", commentaire=" + commentaire + ", dateEnreg=" + dateEnreg + ", dateModif=" + dateModif + '}';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -6,13 +6,11 @@
|
||||
package com.test.beans;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author thomas.millot
|
||||
*/
|
||||
public class User {
|
||||
|
||||
private String pseudo;
|
||||
private String mdp;
|
||||
|
||||
|
@ -39,4 +39,5 @@ public class AuthentifForm {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -7,8 +7,6 @@
|
||||
<div id="contenu">
|
||||
<h2>Merci de vous identifier pour acceder aux dossiers</h2>
|
||||
<form name="frmIdentification" method="POST" action="">
|
||||
<c:choose>
|
||||
<c:when test="${empty param.ztPseudo}">
|
||||
<fieldset><legend>Identification utilisateur</legend>
|
||||
<br /><br />
|
||||
<label for="nom">Nom du compte</label>
|
||||
@ -22,15 +20,8 @@
|
||||
<input type="reset" name="annuler" value="Annuler">
|
||||
</p>
|
||||
</fieldset>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<!-- Si l'utilisateur s'est authentifié,
|
||||
Affichage du message contenu dans l'objet controlForm de type AuthentifForm -->
|
||||
|
||||
<p>${controlForm.getResultat()}</p>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</form>
|
||||
<br /><br />
|
||||
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user