/** * returns html selectbox for font sizes * * @uses $_SESSION['PMA_Config'] * @uses PMA_Config::get() * @uses PMA_Config::getFontsizeOptions() * @uses $GLOBALS['strFontSize'] * @static * @param string $current_size currently slected font size with unit * @return string html selectbox */ function getFontsizeSelection() { $current_size = $_SESSION['PMA_Config']->get('fontsize'); $options = PMA_Config::getFontsizeOptions($current_size); $return = '<label for="select_fontsize">' . $GLOBALS['strFontSize'] . ':</label>' . "\n"; $return .= '<select name="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; }
/** * returns html selectbox for font sizes * * @static * * @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 = PMA_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; }
/** * returns html selectbox for font sizes * * @uses $_SESSION['PMA_Config'] * @uses PMA_Config::get() * @uses PMA_Config::getFontsizeOptions() * @uses $GLOBALS['strFontSize'] * @static * @param string $current_size currently slected font size with unit * @return string html selectbox */ function getFontsizeSelection() { $current_size = $_SESSION['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">' . $GLOBALS['strFontSize'] . ':</label>' . "\n"; $return .= '<select name="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; }