From 03e0464b932a364769ed2952faf3cee1f8b4213a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 28 Oct 2011 21:33:16 +0000 Subject: [PATCH] problem with merging with rel600-dynamic-menu --- html/ajax_misc.php | 4 ++-- html/do.php | 2 +- html/extension.php | 4 ++-- include/action.common.inc.php | 33 +++++++++++++++++++-------------- include/adm_card.inc.php | 7 ++++--- include/class_action.php | 10 +++++----- include/class_fiche.php | 4 ++-- include/client_card.inc.php | 5 +++-- include/suivi_adm.inc.php | 9 ++++----- include/suivi_client.inc.php | 9 ++++----- include/suivi_supplier.inc.php | 3 +-- include/supplier_card.inc.php | 8 ++++---- 12 files changed, 51 insertions(+), 47 deletions(-) diff --git a/html/ajax_misc.php b/html/ajax_misc.php index 6c7b4ec61..eddbb9471 100644 --- a/html/ajax_misc.php +++ b/html/ajax_misc.php @@ -21,7 +21,7 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /*!\file - * \brief this file respond to an ajax request + * \brief this file respond to an ajax request * The parameters are * - gDossier * - $op operation the file has to execute @@ -286,7 +286,7 @@ case 'dl': $r.='
'; // needed hidden var $r.=dossier::hidden(); - if ( isset($_REQUEST['p_action'])) $r.=HtmlInput::hidden('p_action',$_REQUEST['p_action']); + if ( isset($_REQUEST['ac'])) $r.=HtmlInput::hidden('ac',$_REQUEST['ac']); if ( isset($_REQUEST['sa'])) $r.=HtmlInput::hidden('sa',$_REQUEST['sa']); if ( isset($_REQUEST['acc'])) $r.=HtmlInput::hidden('acc',$_REQUEST['acc']); $r.=HtmlInput::hidden('j_id',$j_id); diff --git a/html/do.php b/html/do.php index 0666a2dea..ade422526 100644 --- a/html/do.php +++ b/html/do.php @@ -24,7 +24,7 @@ /* !\file * \brief Main file */ - +require_once 'class_database.php'; require_once ('class_dossier.php'); require_once('user_common.php'); require_once('ac_common.php'); diff --git a/html/extension.php b/html/extension.php index 958be1eab..4408bba44 100644 --- a/html/extension.php +++ b/html/extension.php @@ -55,7 +55,7 @@ if ( $only_plugin != 'P' ) $hidden=dossier::hidden(); echo '
-
'. + '. $hidden; echo HtmlInput::button_anchor(_('Préférence'),'user_pref.php'); @@ -72,7 +72,7 @@ else $msg=_('Retour accueil'); ?>
- + '; // Add hidden tag - echo ''; + echo ''; echo dossier::hidden(); $act->ag_comment=""; if (isset($_REQUEST['qcode_dest'])) $act->qcode_dest=$_REQUEST['qcode_dest']; echo $act->Display('NEW',false,$base,$retour); - echo ''; + echo ''; echo ''; echo ''; echo '

'; @@ -143,12 +143,11 @@ if ( $sub_action=='detail' ) $act->ag_id=$ag_id; echo $act->get(); $act->ag_comment=Decode($act->ag_comment); - echo ''; + echo ''; echo $supl_hidden; - echo HtmlInput::hidden('p_action',$_REQUEST['p_action']); + echo HtmlInput::hidden('ac',$_REQUEST['ac']); echo dossier::hidden(); echo $act->Display('UPD',false,$base,$retour); - echo ''; echo ''; echo HtmlInput::submit("save","Sauve"); echo HtmlInput::submit("add_action_here",_("Ajoute une action à celle-ci")); @@ -191,7 +190,7 @@ if ( $sub_action == "add_action" ) $act->d_id=0; echo '
'; // Add hidden tag - echo ''; + echo ''; echo $supl_hidden; echo dossier::hidden(); @@ -200,7 +199,7 @@ if ( $sub_action == "add_action" ) if (isset($_REQUEST['qcode'])) $act->qcode_dest=$_REQUEST['qcode']; echo $act->Display('NEW',false,$base,$retour); - echo ''; + echo ''; echo ''; echo ''; echo ''; @@ -224,7 +223,7 @@ if ( $sub_action == "save_action_st2" ) echo $act->save(); $url="?$base&sa=detail&ag_id=".$act->ag_id.'&'.dossier::get(); echo '

'.hb('Action Sauvée : '.$act->ag_ref).'

'; - + ShowActionList($cn,$base); $url="?$base&sa=detail&ag_id=".$act->ag_id.'&'.dossier::get(); @@ -240,7 +239,7 @@ function ShowActionList($cn,$p_base) - + name='qcode'; @@ -284,7 +284,10 @@ function ShowActionList($cn,$p_base) $see_all=new ICheckBox('see_all'); $my_action=new ICheckBox('all_action'); - if ( $_REQUEST ['p_action'] != 'suivi_courrier') +/** + * @todo + * if ( $_REQUEST ['p_action'] != 'suivi_courrier') + * { $see_all->selected=true; $my_action->selected= true; @@ -294,13 +297,15 @@ function ShowActionList($cn,$p_base) $see_all->selected=(isset($_REQUEST ['see_all']))?true:false; $my_action->selected= (isset($_REQUEST ['all_action']))?true:false; } + * + */ echo _('les actions fermées aussi:').$see_all->input().'
'; echo _('affecté à d\'autre:').$my_action->input().'
'; ?> - + @@ -309,11 +314,11 @@ function ShowActionList($cn,$p_base)
-
+ "> - + diff --git a/include/adm_card.inc.php b/include/adm_card.inc.php index 82ba60897..ca666d341 100644 --- a/include/adm_card.inc.php +++ b/include/adm_card.inc.php @@ -28,14 +28,15 @@ */ require_once('class_contact.php'); require_once('class_ipopup.php'); +$str_dossier=Dossier::get(); /* $sub_action = sb = detail */ /* $cn database conx */ $return=new IAction(); $return->name='retour'; $return->label='Retour'; -$return->value='?p_action=adm&'.$str_dossier; -$root="?p_action=adm&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier; +$return->value='?ac='.$_REQUEST['ac'].'&'.$str_dossier; +$root='?ac='.$_REQUEST['ac']."&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier; $ss_action=( isset ($_REQUEST['sc'] ))? $_REQUEST['sc']: ''; switch ($ss_action) { @@ -70,7 +71,7 @@ echo ShowItem(array( array($root.'&sc=op',_('Opérations'),_('Toutes les opérations'),4), array($root.'&sc=bal',_('Balance'),_('Balance du fournisseur'),7), array($root.'&sc=let',_('Lettrage'),_('Opérations & Lettrages'),6), - array('?p_action=adm&'.dossier::get(),_('Retour liste'),_('Retour à la liste des administration'),5) + array('?ac='.$_REQUEST['ac']."&".dossier::get(),_('Retour liste'),_('Retour à la liste des administration'),5) ), 'H',"mtitle","mtitle",$def,' '); echo '
'; diff --git a/include/class_action.php b/include/class_action.php index 7a759b00d..f08b3be1f 100644 --- a/include/class_action.php +++ b/include/class_action.php @@ -95,7 +95,7 @@ class Action * * \param $p_view if set to true the form will be in readonly mode (value: true or false) * \param $p_gen true we show the tag for generating a doc (value : true or false) - *\param $p_base is the p_action parameter + *\param $p_base is the ac parameter *\param $retour is the html code for the return button * \note update the reference number or the document type is not allowed * @@ -296,7 +296,7 @@ class Action if( isset($_REQUEST['sb'])) $supl_hidden.='&sb='.$_REQUEST['sb']; - $lag_ref_ag_id=''. $this->db->get_value("select ag_ref from action_gestion where ag_id=$1",array($this->ag_ref_ag_id)). ""; @@ -643,7 +643,7 @@ class Action } /*! myList($p_filter="") * \brief Show list of action by default if sorted on date - *\param $p_base base url with p_action... + *\param $p_base base url with ac... * \param $p_filter filters on the document_type * \param $p_search must a valid sql command ( ex 'and ag_title like upper('%hjkh%')) * \return string containing html code @@ -821,7 +821,7 @@ class Action //show the sub_action foreach ($a_row as $row ) { - $href=''; + $href=''; $i++; $tr=($i%2==0)?'even':'odd'; if ($row['ag_priority'] < 2) $tr='priority1'; @@ -857,7 +857,7 @@ class Action { foreach ($retSql as $line) { - $ref.=''. + $ref.=''. $line['ag_ref'].""; } } diff --git a/include/class_fiche.php b/include/class_fiche.php index a5f930476..10f138d6c 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -1573,8 +1573,8 @@ class Fiche if ( $p_amount && $amount['debit']==0 && $amount['credit'] == 0 && $amount['solde'] == 0 ) continue; $r.=""; - $e=sprintf(' ', - $script,$p_action,$tiers->id,$str_dossier); + $e=sprintf(' ', + $script,$_REQUEST['ac'],$tiers->id,$str_dossier); $r.=" $e".$tiers->strAttribut(ATTR_DEF_QUICKCODE).""; $r.="".h($tiers->strAttribut(ATTR_DEF_NAME)).""; diff --git a/include/client_card.inc.php b/include/client_card.inc.php index 133853380..7ccee1b4d 100644 --- a/include/client_card.inc.php +++ b/include/client_card.inc.php @@ -32,8 +32,9 @@ require_once('class_ipopup.php'); /* $sub_action = sb = detail */ /* $cn database conx */ +$str_dossier=Dossier::get(); $return= HtmlInput::button_anchor('Retour','?p_action=client&'.$str_dossier); -$root="?p_action=client&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier; +$root="?p_action=client&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier."&ac=".$_REQUEST["ac"]; $ss_action=( isset ($_REQUEST['sc'] ))? $_REQUEST['sc']: ''; switch ($ss_action) { @@ -68,7 +69,7 @@ echo ShowItem(array( array($root.'&sc=op',_('Opérations'),_('Toutes les opérations'),4), array($root.'&sc=bal',_('Balance'),_('Balance du client'),7), array($root.'&sc=let',_('Lettrage'),_('Opérations & Lettrages'),6), - array('?p_action=client&'.dossier::get(),_('Retour liste'),_('Retour à la liste des clients'),5) + array('?ac='.$_REQUEST['ac'].'&'.dossier::get(),_('Retour liste'),_('Retour à la liste des clients'),5) ), 'H',"mtitle","mtitle",$def,''); echo '
'; diff --git a/include/suivi_adm.inc.php b/include/suivi_adm.inc.php index bab1f4185..c41292e74 100644 --- a/include/suivi_adm.inc.php +++ b/include/suivi_adm.inc.php @@ -22,11 +22,10 @@ /*!\file * \brief this file is used for the follow up of the customer (mail, meeting...) - * - p_action = adm - * - sb = detail + * - sb = detail * - sc = sv * - sd = this parameter is used here - * - $cn = database connection + * - $cn = database connection */ require_once('class_action.php'); $g_user->can_request(GECOUR); @@ -38,8 +37,8 @@ $g_user->can_request(GECOUR); */ $sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"list"; $ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0; -$p_action=$_REQUEST['p_action']; -$base="p_action=$p_action&sc=sv&sb=detail&f_id=".$_REQUEST['f_id']; +$ac=$_REQUEST['ac']; +$base="ac=ac&sc=sv&sb=detail&f_id=".$_REQUEST['f_id']; $retour=HtmlInput::button_anchor('Retour','?'.dossier::get().'&'.$base); $fiche=new Fiche($cn,$_REQUEST['f_id']); diff --git a/include/suivi_client.inc.php b/include/suivi_client.inc.php index e2aeb54d6..771061f8c 100644 --- a/include/suivi_client.inc.php +++ b/include/suivi_client.inc.php @@ -23,13 +23,12 @@ /*!\file * \brief this file is used for the follow up of the customer (mail, meeting...) * - p_action = client - * - sb = detail + * - sb = detail * - sc = sv * - sd = this parameter is used here - * - $cn = database connection + * - $cn = database connection */ require_once('class_action.php'); -$User->can_request(GECOUR); load_all_script(); /** @@ -39,8 +38,8 @@ load_all_script(); */ $sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"list"; $ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0; -$p_action=$_REQUEST['p_action']; -$base="p_action=$p_action&sc=sv&sb=detail&f_id=".$_REQUEST['f_id']; +//$p_action=$_REQUEST['p_action']; +$base="ac=".$_REQUEST['ac']."&sc=sv&sb=detail&f_id=".$_REQUEST['f_id']; $retour=HtmlInput::button_anchor('Retour','?'.dossier::get().'&'.$base); $fiche=new Fiche($cn,$_REQUEST['f_id']); diff --git a/include/suivi_supplier.inc.php b/include/suivi_supplier.inc.php index 5b70a1922..40ca08022 100644 --- a/include/suivi_supplier.inc.php +++ b/include/suivi_supplier.inc.php @@ -38,8 +38,7 @@ $g_user->can_request(GECOUR); */ $sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"list"; $ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0; -$p_action=$_REQUEST['p_action']; -$base="p_action=$p_action&sc=sv&sb=detail&f_id=".$_REQUEST['f_id']; +$base="ac=".$_REQUEST['ac']."&sc=sv&sb=detail&f_id=".$_REQUEST['f_id']; $retour=HtmlInput::button_anchor('Retour','?'.dossier::get().'&'.$base); $fiche=new Fiche($cn,$_REQUEST['f_id']); diff --git a/include/supplier_card.inc.php b/include/supplier_card.inc.php index 9849eb209..33afb0b79 100644 --- a/include/supplier_card.inc.php +++ b/include/supplier_card.inc.php @@ -28,14 +28,14 @@ */ require_once('class_contact.php'); - +$str_dossier=Dossier::get(); /* $sub_action = sb = detail */ /* $cn database conx */ $return=new IAction(); $return->name='retour'; $return->label='Retour'; -$return->value='?p_action=supplier&'.$str_dossier; -$root="?p_action=supplier&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier; +$return->value='?ac='.$_REQUEST['ac'].'&'.$str_dossier; +$root='?ac='.$_REQUEST['ac']."&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier; $ss_action=( isset ($_REQUEST['sc'] ))? $_REQUEST['sc']: ''; switch ($ss_action) { @@ -71,7 +71,7 @@ echo ShowItem(array( array($root.'&sc=op',_('Opérations'),_('Toutes les opérations'),4), array($root.'&sc=bal',_('Balance'),_('Balance du fournisseur'),7), array($root.'&sc=let',_('Lettrage'),_('Opérations & Lettrages'),6), - array('?p_action=supplier&'.dossier::get(),_('Retour liste'),_('Retour à la liste des fournisseurs'),5) + array('?ac='.$_REQUEST['ac'].'&'.dossier::get(),_('Retour liste'),_('Retour à la liste des fournisseurs'),5) ), 'H',"mtitle","mtitle",$def,' '); echo '
';