phpcompta-dev
[Top][All Lists]
Advanced

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

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


From: phpcompta-dev
Subject: [Phpcompta-dev] r4248 - phpcompta/branches/rel600-dynamic-menu/include
Date: Fri, 28 Oct 2011 22:00:44 +0200 (CEST)

Author: danydb
Date: 2011-10-28 22:00:42 +0200 (Fri, 28 Oct 2011)
New Revision: 4248

Modified:
   phpcompta/branches/rel600-dynamic-menu/include/anc_imp.inc.php
   phpcompta/branches/rel600-dynamic-menu/include/anc_od.inc.php
   phpcompta/branches/rel600-dynamic-menu/include/anc_pa.inc.php
   phpcompta/branches/rel600-dynamic-menu/include/class_anc_print.php
   phpcompta/branches/rel600-dynamic-menu/include/pref.inc.php
Log:
#241 : modularity : pr?\195?\169f?\195?\169rence

Modified: phpcompta/branches/rel600-dynamic-menu/include/anc_imp.inc.php
===================================================================
--- phpcompta/branches/rel600-dynamic-menu/include/anc_imp.inc.php      
2011-10-28 18:04:01 UTC (rev 4247)
+++ phpcompta/branches/rel600-dynamic-menu/include/anc_imp.inc.php      
2011-10-28 20:00:42 UTC (rev 4248)
@@ -31,15 +31,16 @@
 require_once('class_anc_operation.php');
 require_once('class_anc_plan.php');
 require_once('ac_common.php');
+$str_dossier=Dossier::get();
 
 //-- the menu
-$menu=array(array("?p_action=ca_imp&sub=listing&$str_dossier",_("Historique"),_("Historique
 des opérations"),"listing"),
-            array("?p_action=ca_imp&sub=ancgl&$str_dossier",_("grand 
livre"),_("Grand livre d' plan analytique"),"ancgl"),
-            array("?p_action=ca_imp&sub=bs&$str_dossier",_("Balance 
simple"),_("Balance simple d'un plan analytique"),"bs"),
-            array("?p_action=ca_imp&sub=bc2&$str_dossier",_("Balance 
croisée"),_("Balance croisée de 2 plans analytiques"),"bc2"),
-           
array("?p_action=ca_imp&sub=tab&$str_dossier",_("Tableau"),_("Tableau lié à la 
comptabilité"),'tab'),
-           array("?p_action=ca_imp&sub=lico&$str_dossier",_("Balance 
comptabilité"),_("Lien entre comptabilité et Comptabilité analytique"),'lico'),
-           
array("?p_action=ca_imp&sub=group&$str_dossier",_("Groupe"),_("Balance par 
groupe"),'group'),
+$menu=array(array("?ac=".$_REQUEST['ac']."&sub=listing&$str_dossier",_("Historique"),_("Historique
 des opérations"),"listing"),
+            array("?ac=".$_REQUEST['ac']."&sub=ancgl&$str_dossier",_("grand 
livre"),_("Grand livre d' plan analytique"),"ancgl"),
+            array("?ac=".$_REQUEST['ac']."&sub=bs&$str_dossier",_("Balance 
simple"),_("Balance simple d'un plan analytique"),"bs"),
+            array("?ac=".$_REQUEST['ac']."&sub=bc2&$str_dossier",_("Balance 
croisée"),_("Balance croisée de 2 plans analytiques"),"bc2"),
+           
array("?ac=".$_REQUEST['ac']."&sub=tab&$str_dossier",_("Tableau"),_("Tableau 
lié à la comptabilité"),'tab'),
+           array("?ac=".$_REQUEST['ac']."&sub=lico&$str_dossier",_("Balance 
comptabilité"),_("Lien entre comptabilité et Comptabilité analytique"),'lico'),
+           
array("?ac=".$_REQUEST['ac']."&sub=group&$str_dossier",_("Groupe"),_("Balance 
par groupe"),'group'),
 
            );
 $sub=(isset($_GET['sub']))?$_GET['sub']:'no';
@@ -170,7 +171,7 @@
 //---------------------------------------------------------------------------
 // Balance by group
 //---------------------------------------------------------------------------
-if ( $sub == 'group') 
+if ( $sub == 'group')
   {
     require_once('class_anc_group.php');
     $gr=new Anc_Group($cn);
@@ -182,7 +183,7 @@
     if ( isset($_GET['result']))
     {
       echo $gr->show_button($str_hidden);
-      
+
       echo $gr->display_html();
     }
   }

Modified: phpcompta/branches/rel600-dynamic-menu/include/anc_od.inc.php
===================================================================
--- phpcompta/branches/rel600-dynamic-menu/include/anc_od.inc.php       
2011-10-28 18:04:01 UTC (rev 4247)
+++ phpcompta/branches/rel600-dynamic-menu/include/anc_od.inc.php       
2011-10-28 20:00:42 UTC (rev 4248)
@@ -32,8 +32,9 @@
 require_once ("class_anc_operation.php");
 require_once ("class_anc_plan.php");
 require_once ("class_anc_group_operation.php");
+global $g_user;
 
-
+$str_dossier=Dossier::get();
 $pa=new Anc_Plan($cn);
 $m=$pa->get_list();
 if ( ! $m )
@@ -54,10 +55,10 @@
 <table>
 <tr>
 <td  class="mtitle" >
-<A class="mtitle" HREF="?p_action=ca_od&new&'.$str_dossier.'"> 
'._('Nouveau').' </A>
+<A class="mtitle" HREF="?ac='.$_REQUEST['ac'].'&new&'.$str_dossier.'"> 
'._('Nouveau').' </A>
 </td>
 <td  class="mtitle" >
-<A class="mtitle" HREF="?p_action=ca_od&see&'.$str_dossier.'">'._('Liste 
opérations').' </A
+<A class="mtitle" 
HREF="?ac='.$_REQUEST['ac'].'&see&'.$str_dossier.'">'._('Liste opérations').' 
</A
 </td>
 </tr>
 </table>
@@ -86,8 +87,8 @@
     echo dossier::hidden();
     $hid=new IHidden();
 
-    $hid->name="p_action";
-    $hid->value="ca_od";
+    $hid->name="ac";
+    $hid->value=$_REQUEST['ac'];
     echo $hid->input();
 
     $hid->name="see";
@@ -97,11 +98,11 @@
     $w=new ISelect();
     $w->name="p_periode";
 // filter on the current year
-    $filter_year=" where p_exercice='".$User->get_exercice()."'";
+    $filter_year=" where p_exercice='".$g_user->get_exercice()."'";
 
     $periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') 
from parm_periode $filter_year order by  p_start,p_end",1);
-    $User=new User($cn);
-    
$current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode();
+    $g_user=new User($cn);
+    
$current=(isset($_GET['p_periode']))?$_GET['p_periode']:$g_user->get_periode();
     $w->value=$periode_start;
     $w->selected=$current;
     echo $w->input();

Modified: phpcompta/branches/rel600-dynamic-menu/include/anc_pa.inc.php
===================================================================
--- phpcompta/branches/rel600-dynamic-menu/include/anc_pa.inc.php       
2011-10-28 18:04:01 UTC (rev 4247)
+++ phpcompta/branches/rel600-dynamic-menu/include/anc_pa.inc.php       
2011-10-28 20:00:42 UTC (rev 4248)
@@ -28,7 +28,7 @@
 require_once("class_anc_plan.php");
 require_once("class_anc_account.php");
 $ret="";
-
+$str_dossier=Dossier::get();
 //---------------------------------------------------------------------------
 // action
 // Compute the u_redcontent div
@@ -49,8 +49,6 @@
             $ret.=dossier::hidden();
             $ret.= $new->form();
             $ret.= HtmlInput::hidden("sa","pa_write");
-            $ret.=HtmlInput::hidden("p_action","ca_pa");
-            ;
             $ret.=HtmlInput::submit("submit","Enregistre");
             $ret.= '</form>';
             $ret.= '</div>';
@@ -87,7 +85,6 @@
     if ( $sa == "pa_detail" )
     {
         $new=new Anc_Plan($cn,$_GET['pa_id']);
-        $wAction=HtmlInput::hidden("p_action","ca_pa");
         $wSa=HtmlInput::hidden("sa","pa_update");
 
         $new->get();
@@ -99,13 +96,8 @@
 
         $ret.= $new->form();
         $ret.= $wSa;
-        $ret.= $wAction;
         $ret.=HtmlInput::submit("submit","Enregistre");
-        /*             $ret.=sprintf('<A class="button" HREF="%s" 
onclick="return confirm(\'Effacer ?\')">'.
-                                                 '<input type="button" 
value="Efface"></A>',
-                                                 
"?p_action=ca_pa&pa_id=".$_GET['pa_id']."&sa=pa_delete&$str_dossier");
-        */
-        
$ret.=HtmlInput::button_anchor('Efface',"?p_action=ca_pa&pa_id=".$_GET['pa_id']."&sa=pa_delete&$str_dossier",'Efface','onclick="return
 confirm(\'Effacer ?\')"');
+        
$ret.=HtmlInput::button_anchor('Efface',"?ac=".$_REQUEST['ac']."&pa_id=".$_GET['pa_id']."&sa=pa_delete&$str_dossier",'Efface','onclick="return
 confirm(\'Effacer ?\')"');
         $ret.= '</form>';
         $ret.= '</div>';
 
@@ -166,7 +158,7 @@
         $ret.=$po->form();
         $ret.=HtmlInput::hidden('sa','po_update');
         $ret.=HtmlInput::submit('Correction','Correction');
-        $ret.=sprintf('<A class="mtitle" 
HREF="?p_action=ca_pa&sa=po_delete&po_id=%s&pa_id=%s&'.$str_dossier.'">'.
+        $ret.=sprintf('<A class="mtitle" 
HREF="?ac='.$_REQUEST['ac'].'&sa=po_delete&po_id=%s&pa_id=%s&'.$str_dossier.'">'.
                       '<input type="button" value="Efface" onClick="return 
confirm(\' Voulez-vous vraiment effacer cette activité\');"></A>',
                       $po->id,
                       $_REQUEST['pa_id']
@@ -216,7 +208,7 @@
 
             $ret.="<TR class=\"$class\">";
             $ret.="<TD >".
-                  '<a style="text-decoration:underline;" 
href="?p_action=ca_pa&sa=po_detail&po_id='.$obj->id.'&pa_id='.$_REQUEST['pa_id'].'&'.
+                  '<a style="text-decoration:underline;" 
href="?ac='.$_REQUEST['ac'].'&sa=po_detail&po_id='.$obj->id.'&pa_id='.$_REQUEST['pa_id'].'&'.
                   $str_dossier.'">'.
                   h($obj->name).
                   '</a>';
@@ -230,7 +222,7 @@
 
         }
         $ret.="</table>";
-        
$ret.=HtmlInput::button_anchor('Ajout',"?p_action=ca_pa&sa=po_add&pa_id=".$_GET['pa_id']."&".$str_dossier);
+        
$ret.=HtmlInput::button_anchor('Ajout',"?ac=".$_REQUEST['ac']."&sa=po_add&pa_id=".$_GET['pa_id']."&".$str_dossier);
         $ret.='</div>';
 
     }
@@ -253,7 +245,7 @@
     echo '<div class="lmenu">';
     echo '<TABLE>';
     echo '<TR><TD class="mtitle">';
-    echo '<a class="mtitle" 
href="?p_action=ca_pa&sa=add_pa&'.$str_dossier.'">Ajout d\'un plan 
comptable</a>';
+    echo '<a class="mtitle" 
href="?ac='.$_REQUEST['ac'].'&sa=add_pa&'.$str_dossier.'">Ajout d\'un plan 
comptable</a>';
     echo '</TD></TR>';
     echo '</TABLE>';
 
@@ -273,11 +265,11 @@
     {
         echo '<TR>';
         echo '<TD >'.
-        '<a class="mtitle" 
href="?p_action=ca_pa&sa=pa_detail&pa_id='.$line['id'].'&'.$str_dossier.'">'.
+        '<a class="mtitle" 
href="?ac='.$_REQUEST['ac'].'&sa=pa_detail&pa_id='.$line['id'].'&'.$str_dossier.'">'.
         h($line['name']).
         '</TD>';
         echo '<td class="mtitle">'.
-        '<a class="mtitle" 
href="?p_action=ca_pa&sa=list&pa_id='.$line['id'].'&'.$str_dossier.'">'.
+        '<a class="mtitle" 
href="?ac='.$_REQUEST['ac'].'&sa=list&pa_id='.$line['id'].'&'.$str_dossier.'">'.
         "Activités".
         "</a>";
 
@@ -288,7 +280,7 @@
     {
         echo '<TABLE>';
         echo '<TR><TD class="mtitle">';
-        echo '<a class="mtitle" 
href="?p_action=ca_pa&sa=add_pa&'.$str_dossier.'">Ajout d\'un plan 
comptable</a>';
+        echo '<a class="mtitle" 
href="?ac='.$_REQUEST['ac'].'&sa=add_pa&'.$str_dossier.'">Ajout d\'un plan 
comptable</a>';
         echo '</TD></TR>';
         echo '</TABLE>';
     }

Modified: phpcompta/branches/rel600-dynamic-menu/include/class_anc_print.php
===================================================================
--- phpcompta/branches/rel600-dynamic-menu/include/class_anc_print.php  
2011-10-28 18:04:01 UTC (rev 4247)
+++ phpcompta/branches/rel600-dynamic-menu/include/class_anc_print.php  
2011-10-28 20:00:42 UTC (rev 4248)
@@ -118,6 +118,7 @@
         $r.= '<span class="notice">'._('Les dates sont en format 
DD.MM.YYYY').'</span>';
 
         $r.=$p_hidden;
+       $r.=HtmlInput::hidden('ac',$_REQUEST['ac']);
         $r.='<span style="padding:5px;margin:5px;display:block;">';
         $plan=new Anc_Plan($this->db);
         $plan_id=new ISelect("pa_id");
@@ -166,17 +167,17 @@
     }
   function check()
   {
-    
+
     /*
      * check date
      */
     if (($this->from != '' && isDate ($this->from) == 0)
-       || 
+       ||
        ($this->to != '' && isDate ($this->to) == 0))
       return -1;
 
     return 0;
-  }  
+  }
 
 
 }

Modified: phpcompta/branches/rel600-dynamic-menu/include/pref.inc.php
===================================================================
--- phpcompta/branches/rel600-dynamic-menu/include/pref.inc.php 2011-10-28 
18:04:01 UTC (rev 4247)
+++ phpcompta/branches/rel600-dynamic-menu/include/pref.inc.php 2011-10-28 
20:00:42 UTC (rev 4248)
@@ -15,13 +15,13 @@
  *   You should have received a copy of the GNU General Public License
  *   along with PhpCompta; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+ */
 /* $Revision$ */
 // Copyright Author Dany De Bontridder address@hidden
-/*!\file
+/* !\file
  * \brief this file is always included and then executed
  *        it permits to change the user preferences
- *\see user_pref.php
+ * \see user_pref.php
  */
 
 require_once('class_user.php');
@@ -32,214 +32,213 @@
 echo '<DIV class="content">';
 //----------------------------------------------------------------------
 // Change password
-
-if ( isset($_POST['pass_1'])
-        && strlen(trim($_POST['pass_1'])) != 0 )
+if ( isset ($_POST['val']))
 {
-    if ($_POST['pass_1'] != $_POST['pass_2'] )
+    /*
+     * @todo save the preference
+     */
+    var_dump($_POST);
+}
+if (isset($_POST['pass_1'])
+       && strlen(trim($_POST['pass_1'])) != 0)
+{
+    if ($_POST['pass_1'] != $_POST['pass_2'])
     {
-        alert(_("Les mots de passe ne correspondent pas. Mot de passe 
inchangé"));
+       alert(_("Les mots de passe ne correspondent pas. Mot de passe 
inchangé"));
     }
     else
     {
-        $Rep=new Database();
-        $l_pass=md5($_POST['pass_1']);
-        $Res=$Rep->exec_sql("update ac_users set use_pass='$l_pass' where 
use_login='".$_SESSION['g_user']."'");
-        $pass=$_POST['pass_1'];
-        $_SESSION['g_pass']=$_POST['pass_1'];
-        $g_pass=$_POST['pass_1'];
-        echo "<i>"._('Mot de passe est modifiée')."</i>";
+       $Rep = new Database();
+       $l_pass = md5($_POST['pass_1']);
+       $Res = $Rep->exec_sql("update ac_users set use_pass='$l_pass' where 
use_login='" . $_SESSION['g_user'] . "'");
+       $pass = $_POST['pass_1'];
+       $_SESSION['g_pass'] = $_POST['pass_1'];
+       $g_pass = $_POST['pass_1'];
+       echo "<i>" . _('Mot de passe est modifiée') . "</i>";
     }
 }
 
-$url=$_SERVER['REQUEST_URI'];
-if ( ! isset ($_REQUEST['gDossier']) )
+if (!isset($_REQUEST['gDossier']))
 {
-    echo HtmlInput::button_anchor(_('Retour'),'user_login.php?');
+    echo HtmlInput::button_anchor(_('Retour'), 'user_login.php?');
 }
 else
 {
-    echo '<h2 class="info2">'._('Changez vos préférences').'</h2>';
+    echo '<h2 class="info2">' . _('Changez vos préférences') . '</h2>';
 }
-
 ?>
 
 <div class="content">
 
-                       <FORM ACTION="<?php   echo $url;?>" METHOD="POST">
-                                    <fieldset><legend><?php echo _('Options 
Générales')?></legend>
-                                    <table>
-                                    <tr><td>
-                                    Mot de passe :
-                                    <td><input type="password" value="" 
class="input_type" name="pass_1">
-                                                                         
<input type="password" value="" class="input_type" name="pass_2">
-                                                                               
                                    </td>
-                                                                               
                                    </tr>
-                                                                               
                                    <?php
-                                                                               
                                    $Rep=new Database();
+    <FORM  METHOD="POST">
+       <fieldset><legend><?php echo _('Options Générales')?></legend>
+           <table>
+               <tr><td>
+                       Mot de passe :
+                   </td>
+                   <td><input type="password" value="" class="input_type" 
name="pass_1" nohistory>
+                       <input type="password" value="" class="input_type" 
name="pass_2" nohistory>
+                   </td>
+               </tr>
+<?php
+               $Rep = new Database();
 // charge tous les styles
-$res=$Rep->exec_sql("select the_name from theme
+               $res = $Rep->exec_sql("select the_name from theme
                     order by the_name");
-for ($i=0;$i < Database::num_row($res);$i++)
-{
-    $st=Database::fetch_array($res,$i);
-    $style[]=$st['the_name'];
-}
+               $astyle = array();
+               for ($i = 0; $i < Database::num_row($res); $i++)
+               {
+                   $st = Database::fetch_array($res, $i);
+                   $astyle[] = $st['the_name'];
+               }
 // Formatte le display
-$disp_style="<SELECT NAME=\"style_user\" >";
-foreach ($style as $st)
-{
-    if ( $st == $_SESSION['g_theme'] )
-    {
-        $disp_style.='<OPTION VALUE="'.$st.'" SELECTED>'.$st;
-    }
-    else
-    {
-        $disp_style.='<OPTION VALUE="'.$st.'">'.$st;
-    }
-}
-$disp_style.="</SELECT>";
-?>
-<p>
-<tr>
-<td>
-<?php echo _('Thème');
-?>
-</td>
-<td>
-<?php   print $disp_style;
-?>
-</td>
-</tr>
+               $disp_style = "<SELECT NAME=\"style_user\" >";
+               foreach ($astyle as $st)
+               {
+                   if ($st == $_SESSION['g_theme'])
+                   {
+                       $disp_style.='<OPTION VALUE="' . $st . '" SELECTED>' . 
$st;
+                   }
+                   else
+                   {
+                       $disp_style.='<OPTION VALUE="' . $st . '">' . $st;
+                   }
+               }
+               $disp_style.="</SELECT>";
+               ?>
+               <p>
+               <tr>
+                   <td>
+                       <?php echo _('Thème');
+                       ?>
+                   </td>
+                   <td>
+                       <?php print $disp_style;
+                       ?>
+                   </td>
+               </tr>
 
-<?php
-$inside_dossier=false;
+               <?php
+               global $g_user;
+               $inside_dossier = false;
 // Si utilise un dossier alors propose de changer
 // la periode par defaut
-if (  isset ($_REQUEST['gDossier']))
-{
-    $inside_dossier=true;
-    $msg="";
-    $cn=new Database($_REQUEST['gDossier']);
-    $User->cn=$cn;
+               if (isset($_REQUEST['gDossier']))
+               {
+                   $inside_dossier = true;
+                   $msg = "";
+                   $cn = new Database($_REQUEST['gDossier']);
+                   $g_user->cn = $cn;
 
-    if ( isset ($_POST['period']))
-    {
-        $periode=$_POST["period"];
-        $User->set_periode($periode);
-    }
+                   if (isset($_POST['period']))
+                   {
+                       $periode = $_POST["period"];
+                       $g_user->set_periode($periode);
+                   }
 
-    $l_user_per=$User->get_periode();
-    if ( $l_user_per=="")
-        $l_user_per=$cn->get_value("select min(p_id) from parm_periode where 
p_closed='f'");
+                   $l_user_per = $g_user->get_periode();
+                   if ($l_user_per == "")
+                       $l_user_per = $cn->get_value("select min(p_id) from 
parm_periode where p_closed='f'");
 
-    // if periode is closed then warns the users
-    $period=new Periode($cn,$l_user_per);
+                   // if periode is closed then warns the users
+                   $period = new Periode($cn, $l_user_per);
 
-    $period->p_id=$l_user_per;
-    $period->jrn_def_id=0;
-    if ( $period->is_closed($l_user_per)==1)
-    {
-        $msg=_('Attention cette période est fermée, vous ne pourrez rien 
modifier dans le module comptable');
-        $msg= '<h2 class="notice">'.$msg.'</h2>';
-    }
+                   $period->p_id = $l_user_per;
+                   $period->jrn_def_id = 0;
+                   if ($period->is_closed($l_user_per) == 1)
+                   {
+                       $msg = _('Attention cette période est fermée, vous ne 
pourrez rien modifier dans le module comptable');
+                       $msg = '<h2 class="notice">' . $msg . '</h2>';
+                   }
 
 
-    $period=new IPeriod("period");
-    $period->user=$User;
-    $period->cn=$cn;
-    $period->filter_year=false;
-    $period->value=$l_user_per;
-    $period->type=ALL;
-    $l_form_per=$period->input();
+                   $period = new IPeriod("period");
+                   $period->user = $g_user;
+                   $period->cn = $cn;
+                   $period->filter_year = false;
+                   $period->value = $l_user_per;
+                   $period->type = ALL;
+                   $l_form_per = $period->input();
+                   ?>
+               <tr><td><?php echo _('Période');
+                   ?></td>
+                   <td>
+                   <?php printf(' %s ', $l_form_per);?>
+                   </td>
+                   <td>  <?php echo $msg;?></td>
+                           <?php
+                       }
+                       ?>
 
-
-
-    ?>
-    <tr><td><?php echo _('Période');
-    ?></td>
-    <td>
-    <?php      printf(' %s ',$l_form_per);
-    ?>
-    </td>
-    <td>  <?php   echo $msg;
-    ?></td>
-    <?php
-
-}
-?>
-
-<tr>
-<td><? echo _('Taille des pages');
-?></td>
-<td>
-<SELECT NAME="p_size">
-             <option value="15">15
-                           <option value="25">25
-                                         <option value="50">50
-                                                       <option value="100">100
-                                                                     <option 
value="150">150
-                                                                               
    <option value="200">200
-                                                                               
                  <option value="-1"><?php echo _('Illimité');
-?>
+               <tr>
+                   <td><? echo _('Taille des pages');
+                       ?></td>
+                   <td>
+                       <SELECT NAME="p_size">
+                           <option value="15">15
+                           <option value="25">25
+                           <option value="50">50
+                           <option value="100">100
+                           <option value="150">150
+                           <option value="200">200
+                           <option value="-1"><?php echo _('Illimité');?>
 <?php
-$label=($_SESSION['g_pagesize'] == -1)?_('Illimité'):$_SESSION['g_pagesize'];
-echo '<option value="'.$_SESSION['g_pagesize'].'" selected>'.$label;
+$label = ($_SESSION['g_pagesize'] == -1) ? _('Illimité') : 
$_SESSION['g_pagesize'];
+echo '<option value="' . $_SESSION['g_pagesize'] . '" selected>' . $label;
 ?>
-</SELECT>
+                       </SELECT>
 
-</td>
-</tr>
-</table>
-</fieldset>
+                   </td>
+               </tr>
+           </table>
+       </fieldset>
 <?php
-if ( $inside_dossier )
+if ($inside_dossier)
 {
     /* Pref for welcome page */
     echo '<fieldset>';
-    echo '<legend>'._('Options pour la page d\'accueil').'</legend>';
+    echo '<legend>' . _('Options pour la page d\'accueil') . '</legend>';
     echo _('Mini-Rapport : ');
-    $rapport=new Acc_Report($cn);
-    $aRapport=$rapport->make_array();
-    $aRapport[]=array("value"=>0,"label"=>_('Aucun mini rapport'));
-    $wRapport=new ISelect();
-    $wRapport->name="minirap";
-    $wRapport->selected=$User->get_mini_report();
-    $wRapport->value=$aRapport;
+    $rapport = new Acc_Report($cn);
+    $aRapport = $rapport->make_array();
+    $aRapport[] = array("value" => 0, "label" => _('Aucun mini rapport'));
+    $wRapport = new ISelect();
+    $wRapport->name = "minirap";
+    $wRapport->selected = $g_user->get_mini_report();
+    $wRapport->value = $aRapport;
     echo $wRapport->input();
-    echo '<span class="notice">'._('Le mini rapport est un rapport qui 
s\'affiche  sur votre page d\'accueil').'</span>';
+    echo '<span class="notice">' . _('Le mini rapport est un rapport qui 
s\'affiche  sur votre page d\'accueil') . '</span>';
     echo '</fieldset>';
 }
 
 echo '<fieldset>';
-echo '<legend>'._('Langue').'</legend>';
+echo '<legend>' . _('Langue') . '</legend>';
 echo _('Selectionnez votre langue');
-$aLang=array(array(_('Français'),'fr_FR.utf8'),
-             array(_('Anglais'),'en_US.utf8'),
-             array(_('Néerlandais'),'nl_NL.utf8'),
-            );
+$aLang = array(array(_('Français'), 'fr_FR.utf8'),
+               array(_('Anglais'), 'en_US.utf8'),
+               array(_('Néerlandais'), 'nl_NL.utf8'),
+               );
 echo '<select name="lang" id="l">';
-for ($i =0;$i < count($aLang);$i++)
+for ($i = 0; $i < count($aLang); $i++)
 {
-    $sel="";
-    if ( $aLang[$i][1]==$_SESSION['g_lang']) $sel=" selected ";
-    printf('<option value="%s" %s>%s</option>',
-           $aLang[$i][1],$sel,$aLang[$i][0]);
-
+$sel = "";
+if ($aLang[$i][1] == $_SESSION['g_lang'])
+    $sel = " selected ";
+printf('<option value="%s" %s>%s</option>', $aLang[$i][1], $sel, 
$aLang[$i][0]);
 }
 echo '</select>';
 echo '</fieldset>';
 
 
-echo HtmlInput::submit("val",_("Valider"));
+echo HtmlInput::submit("val", _("Valider"));
 echo '</form>';
 
 
 
 
-if ( ! $inside_dossier )
+if (!$inside_dossier)
 {
-    echo HtmlInput::button_anchor(_('Retour'),'user_login.php?');
+echo HtmlInput::button_anchor(_('Retour'), 'user_login.php?');
 }
 
 




reply via email to

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