noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
module.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 id="top">
00005       <div id="dossier">
00006         <?php echo h(dossier::name())?>
00007         </div>
00008     <div style="clear:both;"></div>
00009     <div class="name">
00010 
00011 <?php
00012 
00013 if ( $cn->get_value("select count(*) from profile join profile_user using (p_id)
00014                 where user_name=$1 and with_calc=true",array($_SESSION['g_user'])) ==1):
00015   echo '<div id="calc">';
00016         echo IButton::show_calc();
00017 echo '</div>';
00018 endif;
00019 
00020 if ( $cn->get_value("select count(*) from profile join profile_user using (p_id)
00021                 where user_name=$1 and with_direct_form=true",array($_SESSION['g_user'])) ==1):
00022 ?>
00023         <div id="direct">
00024         <form method="get">
00025                 <?php echo HtmlInput::default_value('ac', '', $_REQUEST)?>
00026                 <?php echo Dossier::hidden()?>
00027                 <?php 
00028 
00029                         $direct=new IText('ac');
00030                         $direct->style='class="input_text"';
00031                         $direct->value='';
00032                         $direct->size=20;
00033                         echo $direct->input();
00034                         $gDossier=dossier::id();
00035                         ?>
00036                 <div id="ac_choices" class="autocomplete" style="width:150"></div>
00037                 <?php 
00038                         echo HtmlInput::submit('go','aller');
00039                         ?>
00040 
00041         </form>
00042         <script charset="utf-8" language="javascript">
00043 
00044                 try {
00045                         new Ajax.Autocompleter("ac","ac_choices","direct.php?gDossier=<?php echo $gDossier?>",
00046                             {paramName:"acs",minChars:1,indicator:null,
00047                             callback:null,
00048                              afterUpdateElement:null});} catch (e){$('info_div').innerHTML=e.message;};
00049                 </script>
00050         </div>
00051 <?php 
00052 endif;?>
00053         
00054     </div>
00055 
00056     <div id="module">
00057         <table>
00058             <tr>
00059                 <?php
00060                 foreach ($amodule as $row):
00061                         $js="";
00062                     $style="";
00063                     if ( $row['me_code']=='new_line')
00064                     {
00065                         echo "</tr><tr>";
00066                         continue;
00067                     }
00068                     $style="tool";
00069                     if ($row['me_code']==$selected)
00070                     {
00071                         $style='toolselected';
00072                     }
00073                     if ( $row['me_url']!='')
00074                     {
00075                         $url=$row['me_url'];
00076                     }
00077                     elseif ($row['me_javascript'] != '')
00078                         {
00079                                 $url="javascript:void(0)";
00080                                 $js_dossier=str_replace('<DOSSIER>', Dossier::id(), $row['me_javascript']);
00081                                 $js=sprintf(' onclick="%s"',$js_dossier);
00082                         }
00083                         else
00084                     {
00085                                 $url="do.php?gDossier=".Dossier::id()."&ac=".$row['me_code'];
00086                     }
00087                     ?>
00088                 <td class="<?php echo $style?>">
00089                         <a class="mtitle" href="<?php echo $url?>" title="<?php echo _($row['me_description'])?>" <?php echo $js?> ><?php echo _($row['me_menu'])?></a></td>
00090                 <?php 
00091                     endforeach;
00092                 ?>
00093             </tr>
00094         </table>
00095 
00096     </div>
00097   
00098 </div>
00099 <div style="clear:both;"></div>
 All Data Structures Namespaces Files Functions Variables Enumerations