phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r4234 - phpcompta/branches/rel600-dynamic-menu/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4234 - phpcompta/branches/rel600-dynamic-menu/include
Date: Wed, 26 Oct 2011 01:09:03 +0200 (CEST)

Author: danydb
Date: 2011-10-26 01:09:02 +0200 (Wed, 26 Oct 2011)
New Revision: 4234

Modified:
   phpcompta/branches/rel600-dynamic-menu/include/class_fiche.php
   phpcompta/branches/rel600-dynamic-menu/include/class_fiche_def.php
   phpcompta/branches/rel600-dynamic-menu/include/fiche.inc.php
   phpcompta/branches/rel600-dynamic-menu/include/user_menu.php
Log:
#241 : modularity for CARD ledger + alphanum prob


Modified: phpcompta/branches/rel600-dynamic-menu/include/class_fiche.php
===================================================================
--- phpcompta/branches/rel600-dynamic-menu/include/class_fiche.php      
2011-10-25 22:17:49 UTC (rev 4233)
+++ phpcompta/branches/rel600-dynamic-menu/include/class_fiche.php      
2011-10-25 23:09:02 UTC (rev 4234)
@@ -764,7 +764,7 @@
                         {
                             $parameter=array($this->id,null);
                         }
-                        $this->cn->exec_sql("select 
account_insert($1,$2)",$parameter);
+                        $v=$this->cn->get_value("select 
account_insert($1,$2)",$parameter);
                     }
                     catch (Exception $e)
                     {

Modified: phpcompta/branches/rel600-dynamic-menu/include/class_fiche_def.php
===================================================================
--- phpcompta/branches/rel600-dynamic-menu/include/class_fiche_def.php  
2011-10-25 22:17:49 UTC (rev 4233)
+++ phpcompta/branches/rel600-dynamic-menu/include/class_fiche_def.php  
2011-10-25 23:09:02 UTC (rev 4234)
@@ -66,7 +66,7 @@
 
     /*!
      *  \brief  Get attribut of a fiche_def
-     *        
+     *
      * \return string value of the attribute
      */
     function getAttribut()
@@ -95,7 +95,7 @@
 
     /*!
     * \brief  Get attribut of the fiche_def
-    *        
+    *
     */
     function Get()
     {
@@ -118,8 +118,8 @@
     /*!
      **************************************************
      * \brief  Get all the fiche_def
-     *        
-     * \return an array of fiche_def object 
+     *
+     * \return an array of fiche_def object
      */
     function GetAll()
     {
@@ -141,10 +141,10 @@
     }
     /*!
      **************************************************
-     * \brief  Check in vw_fiche_def if a fiche has 
+     * \brief  Check in vw_fiche_def if a fiche has
      *           a attribut X
-     *        
-     *  
+     *
+     *
      * \param  $p_attr attribut to check
      * \return  true or false
      */
@@ -156,8 +156,8 @@
     /*!
      **************************************************
      * \brief  Display a fiche_def object into a table
-     *        
-     * \return HTML row 
+     *
+     * \return HTML row
      */
     function Display()
     {
@@ -173,7 +173,7 @@
      * table : insert into fiche_def
      *         insert into attr_def
      *
-     * \param $array array 
+     * \param $array array
      *        index FICHE_REF
      *              nom_mod
      *              class_base
@@ -384,6 +384,7 @@
 
 
         echo '<FORM METHOD="POST" 
action="?p_action=fiche&action=vue'.$str.'">';
+       echo HtmlInput::hidden('ac',$_REQUEST['ac']);
         echo dossier::hidden();
         echo HtmlInput::hidden("fiche",$this->id);
         echo HtmlInput::submit('add','Ajout fiche');
@@ -398,13 +399,17 @@
             else
                 echo '<TR class="even">';
 
-            $span_mod='<TD><A 
href="?p_action=fiche&'.$str_dossier.'&action=detail&fiche_id='.$l_line['f_id'].$str.'&fiche='.$_GET['fiche'].'">'.$l_line['quick_code'].'</A></TD>';
+            $span_mod='<TD><A href="?p_action=fiche&'.$str_dossier.
+                   '&action=detail&fiche_id='.$l_line['f_id'].$str.'&fiche='.
+                   
$_GET['fiche'].'&ac='.$_REQUEST['ac'].'">'.$l_line['quick_code']
+                   .'</A></TD>';
 
             echo $span_mod.'<TD>'.h($l_line['vw_name'])."</TD>";
             echo '</tr>';
         }
         echo '</table>';
         echo '<FORM METHOD="POST" 
action="?p_action=fiche&action=vue'.$str.'">';
+       echo HtmlInput::hidden('ac',$_REQUEST['ac']);
         echo dossier::hidden();
         echo HtmlInput::hidden("fiche",$this->id);
         echo HtmlInput::submit('add','Ajout fiche');
@@ -414,7 +419,7 @@
     }
     /*!\brief show input for the basic attribute : label, class_base, 
create_account
      * use only when we want to update
-     * 
+     *
      *\return HTML string with the form
      */
     function input_base()
@@ -440,7 +445,7 @@
         return $r;
     }
     /*!\brief Display all the attribut of the fiche_def
-     *\param $str give the action possible values are remove, empty 
+     *\param $str give the action possible values are remove, empty
      */
     function DisplayAttribut($str="")
     {
@@ -674,8 +679,8 @@
     }
     /*!
      * \brief  retrieve the mandatory field of the card model
-     *        
-     * \param $p_fiche_def_ref 
+     *
+     * \param $p_fiche_def_ref
      * \return array of ad_id  (attr_min.ad_id) and  labels (attr_def.ad_text)
      */
     function get_attr_min($p_fiche_def_ref)

Modified: phpcompta/branches/rel600-dynamic-menu/include/fiche.inc.php
===================================================================
--- phpcompta/branches/rel600-dynamic-menu/include/fiche.inc.php        
2011-10-25 22:17:49 UTC (rev 4233)
+++ phpcompta/branches/rel600-dynamic-menu/include/fiche.inc.php        
2011-10-25 23:09:02 UTC (rev 4234)
@@ -32,9 +32,8 @@
 echo IPoste::ipopup('ipop_account');
 echo ICard::ipopup('ipop_card');
 
-$gDossier=dossier::id();
 $str_dossier=dossier::get();
-global $g_user;
+global $g_user,$cn;
 
 $pop_tva=new IPopup('popup_tva');
 $pop_tva->title=_('Choix TVA');
@@ -42,7 +41,6 @@
 echo $pop_tva->input();
 
 
-$cn=new Database($gDossier);
 // Security check
 $write=$g_user->check_action(FICADD);
 if ($write == 0 )
@@ -55,6 +53,7 @@
 {
     echo '<form method="GET" action="?">';
     echo dossier::hidden();
+      echo HtmlInput::hidden('ac',$_REQUEST['ac']);
     $w=new IText();
     $search_text=(isset($_REQUEST['search_text']))?$_REQUEST['search_text']:"";
     $h=new IHidden();
@@ -94,6 +93,7 @@
 
     /* show the values label class_base and create account */
     $r.='<form method="post">';
+    $r.= HtmlInput::hidden('ac',$_REQUEST['ac']);
     $r.=dossier::hidden();
     $r.=HtmlInput::hidden("fd_id",$p_fiche_def->id);
     $r.=HtmlInput::hidden("ac",$_REQUEST['ac']);
@@ -108,6 +108,7 @@
 
     $r.= '<FORM action="do.php" method="POST">';
     $r.=dossier::hidden();
+    $r.= HtmlInput::hidden('ac',$_REQUEST['ac']);
     $r.=HtmlInput::hidden("fd_id",$p_fiche_def->id);
     $r.=HtmlInput::hidden("ac",$_REQUEST['ac']);
     $r.= $p_fiche_def->DisplayAttribut("remove");
@@ -230,12 +231,12 @@
     }
     $r.= '</DIV>';
     $recherche=false;
-    ShowMenuFiche($gDossier);
+    ShowMenuFiche(Dossier::id());
     echo $r;
     exit();
 }
 
-ShowMenuFiche($gDossier);
+ShowMenuFiche(Dossier::id());
 echo $r;
 
 
//------------------------------------------------------------------------------
@@ -297,6 +298,7 @@
             echo '<form method="post" 
action="?p_action=fiche&action=vue&fiche='.$_GET['fiche'].$str.'">';
         echo dossier::hidden();
         echo $fiche->Display($t);
+       echo HtmlInput::hidden('ac',$_REQUEST['ac']);
         echo HtmlInput::hidden("f_id",$_GET['fiche_id']);
         if ( $write != 0 )
         {
@@ -310,7 +312,8 @@
             echo $iselect->input();
         }
         $str="";
-        echo 
HtmlInput::button_anchor(_('Retour'),'?p_action=fiche&action=vue&'.$str_dossier.'&fiche='.$fiche->fiche_def.$str);
+        echo 
HtmlInput::button_anchor(_('Retour'),'?p_action=fiche&action=vue&'.$str_dossier.'&fiche='.$fiche->fiche_def.$str.
+               "&ac=".$_REQUEST['ac']);
 
         if ( $write != 0 ) echo '</form>';
         echo '</DIV>';
@@ -324,6 +327,7 @@
         $g_user->can_request(FICCAT);
         echo '<DIV class="u_redcontent" style="width:auto">';
         echo '<form method="post">';
+       echo HtmlInput::hidden('ac',$_REQUEST['ac']);
         $oFiche_Def=new Fiche_Def($cn);
         echo HtmlInput::hidden("p_action","fiche");
         echo dossier::hidden();
@@ -367,7 +371,7 @@
             {
                 $fiche=new Fiche($cn,$f_id['f_id']);
                 echo '<A  
href="?p_action=fiche&'.$str_dossier.'&action=detail&fiche_id='.$f_id['f_id'].
-                '&fiche='.$f_id['fd_id'].'">'.
+                '&fiche='.$f_id['fd_id']."&ac=".$_REQUEST['ac'].'">'.
                 $fiche->getName().'</A>';
             }
         }
@@ -401,6 +405,7 @@
 
         echo '<form method="post" 
action="'.$url.'&fiche='.$_POST['fiche'].'">';
         echo dossier::hidden();
+       echo HtmlInput::hidden('ac',$_REQUEST['ac']);
         echo $fiche->blank($_POST['fiche']);
         echo HtmlInput::submit("add_fiche","Ajout");
         echo 
HtmlInput::button_anchor(_('Annuler'),$url.'&fiche='.$_POST['fiche'].'&'.$str_dossier);

Modified: phpcompta/branches/rel600-dynamic-menu/include/user_menu.php
===================================================================
--- phpcompta/branches/rel600-dynamic-menu/include/user_menu.php        
2011-10-25 22:17:49 UTC (rev 4233)
+++ phpcompta/branches/rel600-dynamic-menu/include/user_menu.php        
2011-10-25 23:09:02 UTC (rev 4234)
@@ -257,7 +257,8 @@
 function ShowMenuFiche($p_dossier)
 {
     $cn=new Database($p_dossier);
-    $str_dossier=dossier::get();
+    $mod="&ac=".$_REQUEST['ac'];
+    $str_dossier=dossier::get().$mod;
     echo '<div class="lmenu">';
     echo '<TABLE>';
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]