本文整理汇总了PHP中PMA\libraries\Util::showText方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::showText方法的具体用法?PHP Util::showText怎么用?PHP Util::showText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA\libraries\Util
的用法示例。
在下文中一共展示了Util::showText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getTableNavigationButton
/**
* 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>';
}
示例2: _getBreadcrumbs
/**
* Returns the breadcrumbs as HTML
*
* @return string HTML formatted breadcrumbs
*/
private function _getBreadcrumbs()
{
$retval = '';
$tbl_is_view = $GLOBALS['dbi']->getTable($this->_db, $this->_table)->isView();
if (empty($GLOBALS['cfg']['Server']['host'])) {
$GLOBALS['cfg']['Server']['host'] = '';
}
$server_info = !empty($GLOBALS['cfg']['Server']['verbose']) ? $GLOBALS['cfg']['Server']['verbose'] : $GLOBALS['cfg']['Server']['host'];
$server_info .= empty($GLOBALS['cfg']['Server']['port']) ? '' : ':' . $GLOBALS['cfg']['Server']['port'];
$separator = "<span class='separator item'> »</span>";
$item = '<a href="%1$s%2$s" class="item">';
if (Util::showText('TabsMode')) {
$item .= '%4$s: ';
}
$item .= '%3$s</a>';
$retval .= "<div id='floating_menubar'></div>";
$retval .= "<div id='serverinfo'>";
if (Util::showIcons('TabsMode')) {
$retval .= Util::getImage('s_host.png', '', array('class' => 'item'));
}
$retval .= sprintf($item, Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabServer'], 'server'), URL::getCommon(), htmlspecialchars($server_info), __('Server'));
if (strlen($this->_db) > 0) {
$retval .= $separator;
if (Util::showIcons('TabsMode')) {
$retval .= Util::getImage('s_db.png', '', array('class' => 'item'));
}
$retval .= sprintf($item, Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database'), URL::getCommon(array('db' => $this->_db)), htmlspecialchars($this->_db), __('Database'));
// if the table is being dropped, $_REQUEST['purge'] is set to '1'
// so do not display the table name in upper div
if (strlen($this->_table) > 0 && !(isset($_REQUEST['purge']) && $_REQUEST['purge'] == '1')) {
include './libraries/tbl_info.inc.php';
$retval .= $separator;
if (Util::showIcons('TabsMode')) {
$icon = $tbl_is_view ? 'b_views.png' : 's_tbl.png';
$retval .= Util::getImage($icon, '', array('class' => 'item'));
}
$retval .= sprintf($item, Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table'), URL::getCommon(array('db' => $this->_db, 'table' => $this->_table)), str_replace(' ', ' ', htmlspecialchars($this->_table)), $tbl_is_view ? __('View') : __('Table'));
/**
* Displays table comment
*/
if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) {
if (mb_strstr($show_comment, '; InnoDB free')) {
$show_comment = preg_replace('@; InnoDB free:.*?$@', '', $show_comment);
}
$retval .= '<span class="table_comment"';
$retval .= ' id="span_table_comment">"';
$retval .= htmlspecialchars($show_comment);
$retval .= '"</span>';
}
// end if
} else {
// no table selected, display database comment if present
$cfgRelation = PMA_getRelationsParam();
// Get additional information about tables for tooltip is done
// in Util::getDbInfo() only once
if ($cfgRelation['commwork']) {
$comment = PMA_getDbComment($this->_db);
/**
* Displays table comment
*/
if (!empty($comment)) {
$retval .= '<span class="table_comment"' . ' id="span_table_comment">"' . htmlspecialchars($comment) . '"</span>';
}
// end if
}
}
}
$retval .= '<div class="clearfloat"></div>';
$retval .= '</div>';
return $retval;
}