From 39db6f9ac57abb7e992f455ae3696fb5ec42846d Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sun, 3 Aug 2003 10:57:55 +0000 Subject: [PATCH] Gestion de la suppression --- htdocs/comm/projet/fiche.php3 | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/projet/fiche.php3 b/htdocs/comm/projet/fiche.php3 index 5389e8ca239..2c90bea208b 100644 --- a/htdocs/comm/projet/fiche.php3 +++ b/htdocs/comm/projet/fiche.php3 @@ -21,7 +21,7 @@ */ require("./pre.inc.php3"); require("./project.class.php3"); -require("../propal.class.php3"); +require("../../propal.class.php3"); $db = new Db(); @@ -34,8 +34,37 @@ if ($HTTP_POST_VARS["action"] == 'update') $projet->update(); } +if ($HTTP_POST_VARS["action"] == 'confirm_delete' && $HTTP_POST_VARS["confirm"] == yes) +{ + $projet = new Project($db); + $projet->id = $id; + $projet->delete(); + Header("Location: index.php"); +} + llxHeader("","../"); +if ($action == 'delete') +{ + + print '
'; + print ''; + print ''; + + print ''; + + print '\n"; + print ''; + print '
Supprimer le projet
Etes-vous sur de vouloir supprimer ce projet ?'; + $htmls = new Form($db); + + $htmls->selectyesno("confirm","no"); + + print "
'; + print "
\n"; + } + + if ($action == 'create') { @@ -156,8 +185,8 @@ if ($action == 'create') print "-"; - print "-"; - + print "Supprimer"; + print "";