noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
menu.php
Go to the documentation of this file.
00001 <?php
00002 //This file is part of NOALYSS and is under GPL 
00003 //see licence.txt
00004 ?><div class="<?php echo $style_menu; ?>">
00005     <?php if ( count($amenu) > 4 && $idx == 0) :
00006         $style ='style= "width:100%"';
00007      elseif ($idx==0):
00008 switch (count($amenu))
00009 {
00010 case 4:
00011 case 3:
00012    $width=count($amenu)*20;
00013    $left=round((100-$width)/2);
00014 $style="style=\"width:$width%;margin-left:$left%\"";
00015 break;
00016 default:
00017 $style="";
00018 }
00019         else:
00020                 $style=" class=\"mtitle\"";
00021 
00022         endif;?>
00023 <table  <?php echo $style?> >
00024 
00025 
00026     <tr>
00027         <?php
00028         global $g_user;
00029         // Display the menu
00030         for($i=0;$i < count($amenu);$i++):
00031             if ( (count($amenu)==1)|| (isset($module[$idx+1]) && $module[$idx+1]==$amenu[$i]['me_code'])):
00032                 $class="selectedcell";
00033 ?>
00034         <td class="<?php echo $class?>">
00035             <a class="mtitle" href="do.php?gDossier=<?php echo Dossier::id()?>&ac=<?php echo $_REQUEST['ac']?>" title="<?php echo h(_($amenu[$i]['me_description']))?>" >
00036             <?php echo _($amenu[$i]['me_menu'])?>
00037             </a>
00038         </td>
00039 <?php 
00040             else:
00041                 $class="mtitle";
00042             $url="";$pt="";
00043                 $js="";
00044             for ($e=0;$e <= $idx;$e++):
00045                         $url.=$pt.$module[$e];
00046                         $pt="/";
00047             endfor;
00048                 if ( $amenu[$i]['me_url']!='')
00049                 {
00050                         $url=$row['me_url'];
00051                 }
00052                 elseif ($amenu[$i]['me_javascript'] != '')
00053                 {
00054                         $url="javascript:void(0)";
00055                         $js=sprintf(' onclick="%s"',$amenu[$i]['me_javascript']);
00056                 }
00057                 else
00058                 {
00059                         $url.=$pt.$amenu[$i]['me_code'];
00060                 }
00061 
00062 ?>      <td class="<?php echo $class?>">
00063             <a class="mtitle" href="do.php?gDossier=<?php echo Dossier::id()?>&ac=<?php echo $url?>" <?php echo $js?> title="<?php echo h(_($amenu[$i]['me_description']))?>">
00064             <?php echo _($amenu[$i]['me_menu'])?>
00065             </a>
00066         </td>
00067 
00068 
00069 <?php 
00070 endif;
00071 
00072         ?>
00073         <?php 
00074             endfor;
00075         ?>
00076     </tr>
00077 
00078 
00079 </table>
00080 </div>
00081 <?php
00082 // if something is selected check if file to include or submen
00083 //
00084  ?>
 All Data Structures Namespaces Files Functions Variables Enumerations