Exemplo n.º 1
0
 /**
  * returns html selectbox for font sizes
  *
  * @uses    $GLOBALS['PMA_Config']
  * @uses    PMA_Config::get()
  * @uses    PMA_Config::_getFontsizeOptions()
  * @static
  * @param   string  $current_size   currently slected font size with unit
  * @return  string  html selectbox
  */
 protected static function _getFontsizeSelection()
 {
     $current_size = $GLOBALS['PMA_Config']->get('fontsize');
     // for the case when there is no config file (this is supported)
     if (empty($current_size)) {
         if (isset($_COOKIE['pma_fontsize'])) {
             $current_size = $_COOKIE['pma_fontsize'];
         } else {
             $current_size = '82%';
         }
     }
     $options = PMA_Config::_getFontsizeOptions($current_size);
     $return = '<label for="select_fontsize">' . __('Font size') . ':</label>' . "\n";
     $return .= '<select name="set_fontsize" id="select_fontsize" onchange="this.form.submit();">' . "\n";
     foreach ($options as $option) {
         $return .= '<option value="' . $option . '"';
         if ($option == $current_size) {
             $return .= ' selected="selected"';
         }
         $return .= '>' . $option . '</option>' . "\n";
     }
     $return .= '</select>';
     return $return;
 }