From 968fd858ed1c22b97f7046e8da2b5fee858960a4 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Thu, 31 Mar 2005 20:05:12 +0000 Subject: [PATCH] Fix bug when deleting a "poste" --- html/pcmn_update.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/html/pcmn_update.php b/html/pcmn_update.php index 63e7ef4c5..ee71b14e3 100644 --- a/html/pcmn_update.php +++ b/html/pcmn_update.php @@ -63,21 +63,21 @@ echo ''; echo '
'; /* Analyse ce qui est demandé */ /* Effacement d'une ligne */ -if (isset ($action)) { - if ( $action=="del" ) { - if ( isset ($l) ) { +if (isset ($_GET['action'])) { + if ( $_GET['action']=="del" ) { + if ( isset ($_GET['l']) ) { /* Ligne a enfant*/ - $R=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val_parent=$l"); + $R=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val_parent=".$_GET['l']); if ( pg_NumRows($R) != 0 ) { echo ""; } else { /* Vérifier que le poste n'est pas utilisé qq part dans les journaux */ - $Res=ExecSql($cn,"select * from jrnx where j_poste=$l"); + $Res=ExecSql($cn,"select * from jrnx where j_poste=".$_GET['l']); if ( pg_NumRows($R) != 0 ) { echo ""; } else { - $Del=ExecSql($cn,"delete from tmp_pcmn where pcm_val=$l"); + $Del=ExecSql($cn,"delete from tmp_pcmn where pcm_val=".$_GET['l']); } // if pg_NumRows } // if pg_NumRows } // isset ($l)