Example #1
0
 /**
  * returns html selectbox for font sizes
  *
  * @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 = htmlspecialchars($_COOKIE['pma_fontsize']);
         } else {
             $current_size = '82%';
         }
     }
     $options = Config::getFontsizeOptions($current_size);
     $return = '<label for="select_fontsize">' . __('Font size') . ':</label>' . "\n" . '<select name="set_fontsize" id="select_fontsize"' . ' class="autosubmit">' . "\n";
     foreach ($options as $option) {
         $return .= '<option value="' . $option . '"';
         if ($option == $current_size) {
             $return .= ' selected="selected"';
         }
         $return .= '>' . $option . '</option>' . "\n";
     }
     $return .= '</select>';
     return $return;
 }