From 5a46aa7ecac5aa1f110012571195cd1b1528a49d Mon Sep 17 00:00:00 2001 From: sparkyx Date: Thu, 18 Oct 2007 11:13:36 +0000 Subject: [PATCH] Fix cosmetic --- include/bank.inc.php | 12 ++++++------ include/user_action_fin.php | 15 +++++++++------ include/user_menu.php | 29 +++++++++++++++-------------- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/include/bank.inc.php b/include/bank.inc.php index 8e4028b42..21c602569 100644 --- a/include/bank.inc.php +++ b/include/bank.inc.php @@ -89,7 +89,7 @@ if ( $sub_action == "solde" ) or pcm_val like '".$caisse->p_value."%' order by pcm_val::text"; $ResAccount=ExecSql($cn,$accountSql); - echo '
'; + echo '
'; echo ""; // Filter the saldo @@ -134,7 +134,7 @@ if ( $sub_action == "list") ''); echo ''; - echo '
'; + echo '
'; echo '
'; @@ -234,7 +234,7 @@ if ( $sub_action=="use_opd" ) { ''; $form=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$p_post,false,$p_post['nb_item']); - echo '
'; + echo '
'; echo $form; echo '
'; exit(); @@ -261,7 +261,7 @@ if ( isset ($_POST['add_item']) || isset ($_POST['correct']) ) $form=FormFin($cn,$p_jrn,$User->GetPeriode(),$submit,$_POST,false, $nb_item); //$form=FormFin($cn,$p_jrn,$User->GetPeriode(),$submit,$_POST,false, $nb_number); - echo '
'; + echo '
'; echo $form; echo JS_CALC_LINE; echo '
'; @@ -285,7 +285,7 @@ if ( isset($_POST['save'])) $form=FormFin($cn,$p_jrn,$User->GetPeriode(),$submit,$_POST,true,$nb_number,true); - echo '
'; + echo '
'; echo $form; echo '
'; echo ''; @@ -342,7 +342,7 @@ if ( $p_jrn != -1 ) '; // Show an empty form of invoice $form=FormFin($cn,$p_jrn,$User->GetPeriode(),$submit,null,false,$jrn->GetDefLine('deb')); - echo '
'; + echo '
'; echo $form; echo '
'; $op=new Pre_operation($cn); diff --git a/include/user_action_fin.php b/include/user_action_fin.php index 0aff0b6ce..ad56419a8 100644 --- a/include/user_action_fin.php +++ b/include/user_action_fin.php @@ -23,7 +23,6 @@ */ echo_debug('user_action_fin.php',__LINE__,"include user_action_fin.php"); -// include_once("form_input.php"); require_once("user_form_fin.php"); include_once("class_widget.php"); require_once("class_parm_code.php"); @@ -37,8 +36,12 @@ if ( ! isset ($_GET['action']) && ! isset ($_POST["action"]) ) { } include_once ("preference.php"); include_once ("user_common.php"); +if ( ! isset($_REQUEST['action'])) { + echo "Aucune Action demandée"; + exit(); + } -$action=(isset($_GET['action']))?$_GET['action']:$_POST['action']; +$action=$_REQUEST['action']; //-------------------------------------------------------------------------------- // use a predefined operation //-------------------------------------------------------------------------------- @@ -52,7 +55,7 @@ if ( $action=="use_opd" ) { ''; $form=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$p_post,false,$p_post['nb_item']); - echo '
'; + echo '
'; echo $form; echo '
'; exit(); @@ -78,7 +81,7 @@ if ( $action == 'new' ) { $jrn=new Acc_Ledger($cn, $p_jrn); $r=FormFin($cn,$p_jrn,$User->GetPeriode(),$submit,null,false,$jrn->GetDefLine()); - echo '
'; + echo '
'; echo $r; echo "
"; //-------------------- @@ -118,7 +121,7 @@ if ( $action == 'new' ) { '; $r=FormFin($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,$_POST,false, $nb_number); - echo '
'; + echo '
'; echo $r; echo "

On-line calculator

".JS_CALC_LINE."
"; @@ -196,7 +199,7 @@ if ( $action == 'voir_jrn' ) { exit -1; } ?> -
+
diff --git a/include/user_menu.php b/include/user_menu.php index dc5e567ce..5abf93ac4 100644 --- a/include/user_menu.php +++ b/include/user_menu.php @@ -341,30 +341,31 @@ function ShowMenuJrnUser($p_dossier,$p_type,$p_jrn,$p_extra="") function ShowMenuJrn($p_cn,$p_jrn_type,$p_jrn) { - $Res=ExecSql($p_cn,"select ja_name,ja_url,ja_action,ja_desc from jrn_action where ja_jrn_type='$p_jrn_type' + $Res=ExecSql($p_cn,"select ja_name,ja_url,ja_action,ja_desc from jrn_action ". + " where ja_jrn_type='$p_jrn_type' order by ja_id"); $num=pg_NumRows($Res); if ($num==0) return ""; + + // Retrieve in the database the menu - $ret="
Solde
"; + $access_key_list = array(); + $array_item=array(); for ($i=0;$i<$num;$i++) { $action=pg_fetch_array($Res,$i); $access_key=get_quick_key($action['ja_name'],$access_key_list); $lib=str_replace($access_key,''.$access_key.'',$action['ja_name']); - - $ret.=sprintf('', - $access_key, - $action['ja_desc'], - $action['ja_url'], - $action['ja_action'], - $p_jrn, - $_REQUEST['jrn_type'], - $lib); - + $str_url=sprintf('?%s&p_jrn=%s&jrn_type=%s&'.dossier::get(), + $action['ja_action'], + $p_jrn, + $_REQUEST['jrn_type']); + + $str_lib=$action['ja_name']; + $array_item[]=array($str_url,$str_lib); } - $ret.='
%s
'; + $dir=($p_jrn_type=='FIN')?'H':'V'; + $ret=ShowItem($array_item,$dir); return $ret; }