public static function showText($value) { return in_array($GLOBALS['cfg'][$value], array('text', 'both')); }
/** * Get a navigation button * * @param string $caption iconic caption for button * @param string $title text for button * @param integer $pos position for next query * @param string $html_sql_query query ready for display * @param boolean $back whether 'begin' or 'previous' * @param string $onsubmit optional onsubmit clause * @param string $input_for_real_end optional hidden field for special treatment * @param string $onclick optional onclick clause * * @return string html content * * @access private * * @see _getMoveBackwardButtonsForTableNavigation(), * _getMoveForwardButtonsForTableNavigation() */ private function _getTableNavigationButton($caption, $title, $pos, $html_sql_query, $back, $onsubmit = '', $input_for_real_end = '', $onclick = '') { $caption_output = ''; if ($back) { if (Util::showIcons('TableNavigationLinksMode')) { $caption_output .= $caption; } if (Util::showText('TableNavigationLinksMode')) { $caption_output .= ' ' . $title; } } else { if (Util::showText('TableNavigationLinksMode')) { $caption_output .= $title; } if (Util::showIcons('TableNavigationLinksMode')) { $caption_output .= ' ' . $caption; } } $title_output = ' title="' . $title . '"'; return '<td>' . '<form action="sql.php" method="post" ' . $onsubmit . '>' . PMA_URL_getHiddenInputs($this->__get('db'), $this->__get('table')) . '<input type="hidden" name="sql_query" value="' . $html_sql_query . '" />' . '<input type="hidden" name="pos" value="' . $pos . '" />' . '<input type="hidden" name="is_browse_distinct" value="' . $this->__get('is_browse_distinct') . '" />' . '<input type="hidden" name="goto" value="' . $this->__get('goto') . '" />' . $input_for_real_end . '<input type="submit" name="navig"' . ' class="ajax" ' . 'value="' . $caption_output . '" ' . $title_output . $onclick . ' />' . '</form>' . '</td>'; }