From 8db2174d28e19e0e117d6b60065168a2e889362d Mon Sep 17 00:00:00 2001 From: PREBOST kylian Date: Mon, 8 Jun 2026 14:53:21 +0200 Subject: [PATCH 1/3] modification d erreus --- index.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/index.php b/index.php index 4ac413c..36b2c37 100644 --- a/index.php +++ b/index.php @@ -70,12 +70,6 @@ operations_form_ctrl(); break; -<<<<<<< HEAD - case 'add_operation': - require('controllers/operation_ctrl.php'); - add_operation_write_ctrl(); - break; -======= case 'lecture': require('views/lecture_page.php'); break; @@ -84,7 +78,6 @@ require('controllers/lecture_page_ctrl.php'); break; ->>>>>>> c98d36d6ee22b1cc45aaf2d55c29677ea8c56d65 default: require('views/404_view.php'); break; From 600e7bce8228266b8a5101a46db774ff66d67bce Mon Sep 17 00:00:00 2001 From: PREBOST kylian Date: Mon, 8 Jun 2026 14:58:16 +0200 Subject: [PATCH 2/3] modification du index et du crud,ctrl de operation --- controllers/operation_ctrl.php | 45 ++++++++++++++++++++++++++++++++++ models/operation_crud.php | 24 ++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/controllers/operation_ctrl.php b/controllers/operation_ctrl.php index e69de29..902e681 100644 --- a/controllers/operation_ctrl.php +++ b/controllers/operation_ctrl.php @@ -0,0 +1,45 @@ +Erreur lors de l'enregistrement."; + } + + header('Location: index.php?route=operations'); + exit(); + } +} +?> \ No newline at end of file diff --git a/models/operation_crud.php b/models/operation_crud.php index e69de29..5277277 100644 --- a/models/operation_crud.php +++ b/models/operation_crud.php @@ -0,0 +1,24 @@ +prepare($req); + + $prep->bindValue(':date_debut', $date_debut); + $prep->bindValue(':date_fin', $date_fin); + $prep->bindValue(':lieu', $lieu); + $prep->bindValue(':en_prepa', $en_prepa, PDO::PARAM_INT); + $prep->bindValue(':id_sauveteur', $id_sauveteur, PDO::PARAM_INT); + $prep->bindValue(':id_statut', $id_statut, PDO::PARAM_INT); + $prep->bindValue(':id_utilisateur', $id_utilisateur, PDO::PARAM_INT); + + $resultat = $prep->execute(); + $prep->closeCursor(); + + return $resultat; +} +?> \ No newline at end of file From 986356d5baf421dd1a0a2f150ff948506f272bbf Mon Sep 17 00:00:00 2001 From: Noah Date: Mon, 8 Jun 2026 15:06:32 +0200 Subject: [PATCH 3/3] Refactor contact controller and views for improved functionality and user experience --- controllers/contact_crtl.php | 46 +++++++----------- index.php | 5 ++ models/contact_crud.php | 18 ++----- views/contact_views.php | 92 ++++++++++++++++++------------------ views/operations_view.php | 7 ++- 5 files changed, 77 insertions(+), 91 deletions(-) diff --git a/controllers/contact_crtl.php b/controllers/contact_crtl.php index e5400c6..90f9abf 100644 --- a/controllers/contact_crtl.php +++ b/controllers/contact_crtl.php @@ -1,8 +1,5 @@ prepare($req); +function create_sauveteur(PDO $c, string $nom, string $prenom, string $dep, string $spe, string $date_heure, string $tel): void { + $req = "INSERT INTO Sauveteur (nom, prenom, departement, specialite, DateHeureEngagement, NumTel) + VALUES (:nom, :prenom, :dep, :spe, :date_heure, :tel)"; + $prep = $c->prepare($req); $prep->bindValue(':nom', $nom); $prep->bindValue(':prenom', $prenom); $prep->bindValue(':dep', $dep); $prep->bindValue(':spe', $spe); + $prep->bindValue(':date_heure', $date_heure); $prep->bindValue(':tel', $tel); - $prep->bindValue(':date', $date); - - $prep->execute(); } - - diff --git a/views/contact_views.php b/views/contact_views.php index 3bfae72..87a1ba3 100644 --- a/views/contact_views.php +++ b/views/contact_views.php @@ -1,50 +1,50 @@ - + -

Ajouts de personnes

+

Ajout de personnes

-
-

Nom :

-

Prénom :

- -

Département :

- - + +

+ +

-

- -

-

-

- - -

-

- - -

-

- - -

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
- - - - - - diff --git a/views/operations_view.php b/views/operations_view.php index 067a8db..9ac8fc5 100644 --- a/views/operations_view.php +++ b/views/operations_view.php @@ -1,9 +1,8 @@ -