From a71b69eae101c68dd5e33a2de066bfa993deeb33 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Thu, 3 Nov 2005 18:22:19 +0000 Subject: [PATCH] Code cleaning : form_input has been removed, inputtype is replaced by the object widget --- html/annulation.php | 24 ++++++++++++++---------- include/jrn.php | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/html/annulation.php b/html/annulation.php index 7a4ef7c7a..ea6a78340 100644 --- a/html/annulation.php +++ b/html/annulation.php @@ -23,21 +23,22 @@ include_once ("poste.php"); include_once("preference.php"); include_once("central_inc.php"); include_once("user_common.php"); -include_once("form_input.php"); include_once("check_priv.php"); include_once ("postgres.php"); include_once("jrn.php"); +require_once("class_widget.php"); /* Admin. Dossier */ -$rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); -$User->Check(); -html_page_start($User->theme,"onLoad='window.focus();'"); if ( ! isset ( $_SESSION['g_dossier'] ) ) { echo "You must choose a Dossier "; exit -2; } +$cn=DbConnect($_SESSION['g_dossier']); +$User=new cl_user($cn); +$User->Check(); + +html_page_start($User->theme,"onLoad='window.focus();'"); if ( isset( $_GET['p_jrn'] )) { $p_jrn=$_GET['p_jrn']; @@ -52,7 +53,6 @@ if ( isset( $_GET['p_jrn'] )) { } -$cn=DbConnect($_SESSION['g_dossier']); list ($l_array,$max_deb,$max_cred)=GetData($cn,$_GET['jrn_op']); foreach ($l_array as $key=>$element) { @@ -213,12 +213,16 @@ echo '
Op
'; -$a=InputType("Date","text", "op_date",$e_op_date,false); +$a=new widget("text"); +// $a=InputType("Date","text", "op_date",$e_op_date,false); //echo 'Date : '.$e_op_date; -echo $a; +$a->SetReadOnly(false); +echo $a->IOValue("op_date",$e_op_date,"Date"); + echo '
'; -$a=InputType("Description:","text_big","comment",$e_comment,false); -echo $a; +//$a=InputType("Description:","text_big","comment",$e_comment,false); +$a->size=80; +echo $a->IOValue("comment",$e_comment,"Description"); echo '
'; if ( isset ($e_ech) ) { diff --git a/include/jrn.php b/include/jrn.php index d4304dca2..ccf011dd7 100644 --- a/include/jrn.php +++ b/include/jrn.php @@ -849,7 +849,7 @@ function VerifData($p_cn,$p_array,$p_user) return BADDATE; } // userPref contient la periode par default - $userPref=GetUserPeriode($p_cn,$p_user); + $userPref=$p_user->GetPeriode(); list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$userPref); // Date dans la periode active