From cf9acadc65eef7eabd1a0ddc7889f4ea0c52d615 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Fri, 6 May 2005 19:54:28 +0000 Subject: [PATCH] =?UTF-8?q?BUG=2012985=20Pas=20de=20mise=20=C3=A0=20jour?= =?UTF-8?q?=20Pay=C3=A9=20/=20pas=20pay=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/modify_op.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/html/modify_op.php b/html/modify_op.php index c0bd4c5aa..f2ca22148 100644 --- a/html/modify_op.php +++ b/html/modify_op.php @@ -102,16 +102,16 @@ if ( isset($_POST['update_record']) ) { } // NO UPDATE except rapt & comment && upload pj + StartSql($cn); + UpdateComment($cn,$_POST['jr_id'],$_POST['comment']); InsertRapt($cn,$_POST['jr_id'],$_POST['rapt']); if ( isset ($_FILES)) { - StartSql($cn); - save_upload_document($cn,$_POST['jr_grpt_id']); - Commit($cn); - } - if ( isset ($_POST['is_paid'] )) - StartSql($cn); + save_upload_document($cn,$_POST['jr_grpt_id']); + } + if ( isset ($_POST['is_paid'] )) $Res=ExecSql($cn,"update jrn set jr_rapt='paid' where jr_id=".$_POST['jr_id']); + if ( isset ($_POST['to_remove'] )) { // Remove old document $ret=ExecSql($cn,"select jr_pj from jrn where jr_id=".$_POST['jr_id']); @@ -122,10 +122,12 @@ if ( isset($_POST['update_record']) ) { pg_lo_unlink($cn,$old_oid); ExecSql($cn,"update jrn set jr_pj=null, jr_pj_name=null, ". "jr_pj_type=null where jr_id=".$_POST['jr_id']); - Commit($cn); } - } + + + Commit($cn); + echo '