From 6856c81c9d38c52a76ca7529645465ac5d4744c1 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 26 May 2003 14:54:51 +0000 Subject: [PATCH] =?UTF-8?q?Mise=20=E0=20jour=20prod=E9dure=20de=20suppress?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/boutique/livre/fiche.php | 52 +++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/htdocs/boutique/livre/fiche.php b/htdocs/boutique/livre/fiche.php index 84f7f2fe5fd..9310ace6ebf 100644 --- a/htdocs/boutique/livre/fiche.php +++ b/htdocs/boutique/livre/fiche.php @@ -22,11 +22,10 @@ require("./pre.inc.php"); -llxHeader(); - $db = new Db(); -if ($action == 'add') { +if ($action == 'add') +{ $livre = new Livre($db); $livre->titre = $titre; @@ -45,6 +44,15 @@ if ($action == 'addga') $livre->linkga($id, $coauteurid); } +if ($HTTP_POST_VARS["action"] == 'confirm_delete' && $HTTP_POST_VARS["confirm"] == "yes") +{ + $livre = new Livre($db); + $livre->fetch($id); + $livre->delete(); + Header("Location: index.php"); +} + + if ($action == 'linkcat') { $livre = new Livre($db); @@ -76,7 +84,8 @@ if ($action == "status") } } -if ($action == 'update' && !$cancel) { +if ($action == 'update' && !$cancel) +{ $livre = new Livre($db); $livre->titre = $titre; @@ -97,7 +106,8 @@ if ($action == 'update' && !$cancel) { } } -if ($action == 'updateosc') { +if ($action == 'updateosc') +{ $livre = new Livre($db); $result = $livre->fetch($id); @@ -108,6 +118,9 @@ if ($action == 'updateosc') { * * */ + +llxHeader(); + if ($action == 'create') { @@ -159,6 +172,33 @@ else $htmls = new Form($db); $auteurs = $livre->liste_auteur(); + + /* + * Confirmation de la suppression de l'adhérent + * + */ + + if ($action == 'delete') + { + + print '
'; + print ''; + print ''; + + print ''; + print '\n"; + print ''; + print '
Supprimer le livre
Etes-vous sur de vouloir supprimer cet ouvrage ?'; + $htmls = new Form($db); + + $htmls->selectyesno("confirm","no"); + + print "
'; + print "
\n"; + } + + + if ($action == 'edit') { print '
Edition de la fiche Livre : '.$livre->titre.'

'; @@ -318,7 +358,7 @@ print '-'; //print '[Update Osc]'; print '-'; print '-'; -print '-'; +print '[Supprimer]'; print '
'; $db->close();