Example #1
0
 public static function tableau_reglages_Suhosin()
 {
   $tab_tr = array();
   $tab_tr[0] = '<tr><th>Suhosin <img alt="" src="./_img/bulle_aide.png" width="16" height="16" title="'.InfoServeur::commentaire('suhosin').'" /></th>';
   if(version_compare(PHP_VERSION,5.4,'>='))
   {
     $tab_tr[1] = '<tr><td class="hc">---</td></tr>';
   }
   else
   {
     $tab_lignes   = array(1=>'get','post','request');
     $tab_colonnes = array(1=>'max_name_length','max_totalname_length','max_value_length','max_vars');
     $tab_suhosin_options = (version_compare(PHP_VERSION,5.3,'<')) ? @ini_get_all( 'suhosin' ) : @ini_get_all( 'suhosin' , FALSE /*details*/ ) ; // http://fr.php.net/ini_get_all
     foreach($tab_lignes as $i_ligne => $categorie)
     {
       $tab_tr[$i_ligne] = '<tr><td class="hc">'.$categorie.'</td>';
       foreach($tab_colonnes as $i_colonne => $option)
       {
         $tab_tr[0] .= ($i_ligne==1) ? '<td class="hc">'.str_replace('_',' ',$option).'</td>' : '' ;
         $option_nom = ( ($categorie!='request') || ($option!='max_name_length') ) ? 'suhosin'.'.'.$categorie.'.'.$option : 'suhosin.request.max_varname_length' ;
         $option_val = (isset($tab_suhosin_options[$option_nom])) ? $tab_suhosin_options[$option_nom] : '---' ;
         $tab_tr[$i_ligne] .= '<td class="hc">'.$option_val.'</td>' ;
       }
       $tab_tr[$i_ligne] .= '</tr>';
     }
   }
   $tab_tr[0] .= '</tr>';
   return'<table class="p"><tbody>'.implode('',$tab_tr).'</tbody></table>';
 }