noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
user_menu.php
Go to the documentation of this file.
00001 <?php
00002 /*
00003  *   This file is part of NOALYSS.
00004  *
00005  *   NOALYSS is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   NOALYSS is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with NOALYSS; if not, write to the Free Software
00017  *   Foundation, Inshowc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 /*!\file
00020  * \brief Nearly all the menu are here, some of them returns a HTML string, others echo
00021  * directly the result.
00022  */
00023 
00024 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00025 
00026 require_once("class_idate.php");
00027 require_once("class_icard.php");
00028 require_once("class_ispan.php");
00029 
00030 
00031 
00032 
00033 /*!
00034  * \brief  Show the menu for the card management
00035  *
00036  * \param $p_dossier dossier 1
00037  *
00038  *
00039  *
00040  * \return nothing
00041  */
00042 function ShowMenuFiche($p_dossier)
00043 {
00044     $cn=new Database($p_dossier);
00045     $mod="&ac=".$_REQUEST['ac'];
00046     $str_dossier=dossier::get().$mod;
00047     echo '<div class="lmenu">';
00048     echo '<TABLE>';
00049 
00050     echo '<TR><TD colspan="1" class="mtitle"  style="width:auto" >
00051     <A class="mtitle" HREF="?p_action=fiche&action=add_modele&fiche=modele&'.$str_dossier.'">'._('Création').'</A></TD>
00052     <TD><A class="mtitle" HREF="?p_action=fiche&'.$str_dossier.'">'._('Recherche').'</A></TD>
00053     </TR>';
00054     $Res=$cn->exec_sql("select fd_id,fd_label from fiche_def order by fd_label");
00055     $Max=Database::num_row($Res);
00056     for ( $i=0; $i < $Max;$i++)
00057     {
00058         $l_line=Database::fetch_array($Res,$i);
00059         printf('<TR><TD class="cell">
00060                <A class="mtitle" HREF="?p_action=fiche&action=modifier&fiche=%d&%s">%s</A></TD>
00061                <TD class="mshort">
00062                <A class="mtitle" HREF="?p_action=fiche&action=vue&fiche=%d&%s">Liste</A>
00063                </TD>
00064                </TR>',
00065                $l_line['fd_id'],
00066                $str_dossier,
00067                $l_line['fd_label'],
00068                $l_line['fd_id'],
00069                $str_dossier
00070 
00071               );
00072     }
00073     echo "</TABLE>";
00074     echo '</div>';
00075 }
00076 /*!   MenuAdmin */
00077 /* \brief show the menu for user/database management
00078 /*
00079 /* \return HTML code with the menu
00080 */
00081 
00082 function MenuAdmin()
00083 {
00084     $def=-1;
00085     if (isset($_REQUEST['UID']))
00086         $def=0;
00087     if ( isset ($_REQUEST['action']))
00088     {
00089         switch ($_REQUEST['action'])
00090         {
00091         case 'user_mgt':
00092             $def=0;
00093             break;
00094         case 'dossier_mgt':
00095             $def=1;
00096             break;
00097         case 'modele_mgt':
00098             $def=2;
00099             break;
00100         case 'audit_log':
00101           $def=4;
00102           break;
00103         case 'restore';
00104             $def=3;
00105             break;
00106         }
00107     }
00108         if (!defined("MULTI")||(defined("MULTI")&&MULTI==1))
00109         {
00110                 $item=array (array("admin_repo.php?action=user_mgt",_("Utilisateurs"),_('Gestion des utilisateurs'),0),
00111                  array("admin_repo.php?action=dossier_mgt",_("Dossiers"),_('Gestion des dossiers'),1),
00112                  array("admin_repo.php?action=modele_mgt",_("Modèles"),_('Gestion des modèles'),2),
00113                  array("admin_repo.php?action=restore",_("Restaure"),_("Restaure une base de données"),3),
00114                  array("admin_repo.php?action=audit_log",_("Audit"),_("Utilisateurs qui se sont connectés"),4),
00115                  array("login.php",_("Accueil"))
00116                 );
00117         }
00118         else
00119         {
00120                 $item=array (array("admin_repo.php?action=user_mgt",_("Utilisateurs"),_('Gestion des utilisateurs'),0),
00121                  array("admin_repo.php?action=audit_log",_("Audit"),_("Utilisateurs qui se sont connectés"),4),
00122                  array("login.php",_("Accueil"))
00123                 );
00124 
00125         }
00126     $menu=ShowItem($item,'H',"mtitle","mtitle",$def,' style="width:80%;margin-left:10%" ');
00127     return $menu;
00128 }
00129 
00130 /*!
00131  * \brief  Show the menu from the pcmn page
00132  *
00133  * \param $p_start class start default=1
00134  *
00135  *
00136  *
00137  * \return nothing
00138  *
00139  *
00140  */
00141 
00142 function menu_acc_plan($p_start=1)
00143 {
00144     $base="?ac=".$_REQUEST['ac'];
00145     $str_dossier="&".dossier::get();
00146     echo '<TABLE>';
00147     echo '<TR><TD class="mtitle"><A class="mtitle"  HREF="'.$base.'&p_start=0'.$str_dossier.'">0 '._(' Hors Bilan').' </A></TD></TR>';
00148     echo '<TR><TD class="mtitle"><A class="mtitle"  HREF="'.$base.'&p_start=1'.$str_dossier.'">1 '._(' Immobilisé').' </A></TD></TR>';
00149     echo '<TR><TD class="mtitle"><A class="mtitle"  HREF="'.$base.'&p_start=2'.$str_dossier.'">2 '._('Actif a un an au plus').'</A></TD></TR>';
00150     echo '<TR><TD class="mtitle"><A class="mtitle"  HREF="'.$base.'&p_start=3'.$str_dossier.'">3 '._('Stock et commande').'</A></TD></TR>';
00151     echo '<TR><TD class="mtitle"><A class="mtitle"  HREF="'.$base.'&p_start=4'.$str_dossier.'">4 '._('Compte tiers').'</A></TD></TR>';
00152     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="'.$base.'&p_start=5'.$str_dossier.'">5 '._('Financier').'</A></TD></TR>';
00153     echo '<TR><TD class="mtitle"><A class="mtitle"  HREF="'.$base.'&p_start=6'.$str_dossier.'">6 '._('Charges').'</A></TD></TR>';
00154     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="'.$base.'&p_start=7'.$str_dossier.'">7 '._('Produits').'</A></TD></TR>';
00155     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="'.$base.'&p_start=8'.$str_dossier.'">8 '._('Hors Comptabilité').'</A></TD></TR>';
00156     echo '<TR><TD class="mtitle"><A class="mtitle" HREF="'.$base.'&p_start=9'.$str_dossier.'">9 '._('Hors Comptabilité').'</A></TD></TR>';
00157     echo "</TABLE>";
00158 }
00159 
 All Data Structures Namespaces Files Functions Variables Enumerations