本文整理汇总了PHP中PMA_getImage函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_getImage函数的具体用法?PHP PMA_getImage怎么用?PHP PMA_getImage使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_getImage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_getImage
} else {
$num_rows = 0;
}
if (empty($_REQUEST['dontlimitchars'])) {
$dontlimitchars = false;
} else {
$dontlimitchars = true;
$url_params['dontlimitchars'] = 1;
}
/**
* Displays the sub-page heading
*/
echo '<h2>' . "\n"
. PMA_getImage('s_tbl.png')
. ' ' . __('Binary log') . "\n"
. '</h2>' . "\n";
/**
* Display log selector.
*/
if (count($binary_logs) > 1) {
echo '<form action="server_binlog.php" method="get">';
echo PMA_generate_common_hidden_inputs($url_params);
echo '<fieldset><legend>';
echo __('Select binary log to view');
echo '</legend><select name="log">';
$full_size = 0;
foreach ($binary_logs as $each_log) {
echo '<option value="' . $each_log['Log_name'] . '"';
示例2: elseif
} elseif (!isset($cfg['Export']['method'])) {
$cfg['Export']['method'] = 'quick';
}
// The export method (quick, custom or custom-no-form)
echo '<input type="hidden" name="export_method" value="' . htmlspecialchars($cfg['Export']['method']) . '" />';
if (isset($_GET['sql_query'])) {
echo '<input type="hidden" name="sql_query" value="' . htmlspecialchars($_GET['sql_query']) . '" />' . "\n";
} elseif (!empty($sql_query)) {
echo '<input type="hidden" name="sql_query" value="' . htmlspecialchars($sql_query) . '" />' . "\n";
}
?>
<div class="exportoptions" id="header">
<h2>
<?php
echo PMA_getImage('b_export.png', __('Export'));
?>
<?php
if ($export_type == 'server') {
echo __('Exporting databases from the current server');
} elseif ($export_type == 'database') {
printf(__('Exporting tables from "%s" database'), htmlspecialchars($db));
} else {
printf(__('Exporting rows from "%s" table'), htmlspecialchars($table));
}
?>
</h2>
</div>
<div class="exportoptions" id="quick_or_custom">
<h3><?php
示例3: printMonitor
function printMonitor()
{
global $server_status, $server_db_isLocal;
?>
<div class="tabLinks" style="display:none;">
<a href="#pauseCharts">
<?php
echo PMA_getImage('play.png');
?>
<?php
echo __('Start Monitor');
?>
</a>
<a href="#settingsPopup" rel="popupLink" style="display:none;">
<?php
echo PMA_getImage('s_cog.png');
?>
<?php
echo __('Settings');
?>
</a>
<?php
if (!PMA_DRIZZLE) {
?>
<a href="#monitorInstructionsDialog">
<?php
echo PMA_getImage('b_help.png');
?>
<?php
echo __('Instructions/Setup');
?>
</a>
<?php
}
?>
<a href="#endChartEditMode" style="display:none;">
<?php
echo PMA_getImage('s_okay.png');
?>
<?php
echo __('Done rearranging/editing charts');
?>
</a>
</div>
<div class="popupContent settingsPopup">
<a href="#addNewChart">
<?php
echo PMA_getImage('b_chart.png');
?>
<?php
echo __('Add chart');
?>
</a>
<a href="#rearrangeCharts"><?php
echo PMA_getImage('b_tblops.png');
echo __('Rearrange/edit charts');
?>
</a>
<div class="clearfloat paddingtop"></div>
<div class="floatleft">
<?php
echo __('Refresh rate') . '<br />';
refreshList('gridChartRefresh', 5, array(2, 3, 4, 5, 10, 20, 40, 60, 120, 300, 600, 1200));
?>
<br />
</div>
<div class="floatleft">
<?php
echo __('Chart columns');
?>
<br />
<select name="chartColumns">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
</select>
</div>
<div class="clearfloat paddingtop">
<b><?php
echo __('Chart arrangement');
?>
</b> <?php
echo PMA_showHint(__('The arrangement of the charts is stored to the browsers local storage. You may want to export it if you have a complicated set up.'));
?>
<br/>
<a href="#importMonitorConfig"><?php
echo __('Import');
?>
</a> <a href="#exportMonitorConfig"><?php
echo __('Export');
?>
//.........这里部分代码省略.........
示例4: json_encode
json_encode(
array(
'success' => false,
'error' => __('Setting variable failed')
)
)
);
break;
}
}
}
/**
* Displays the sub-page heading
*/
echo '<h2>' . PMA_getImage('s_vars.png')
. '' . __('Server variables and settings') . "\n"
. PMA_showMySQLDocu('server_system_variables', 'server_system_variables')
. '</h2>' . "\n";
/**
* Sends the queries and buffers the results
*/
$serverVarsSession = PMA_DBI_fetch_result('SHOW SESSION VARIABLES;', 0, 1);
$serverVars = PMA_DBI_fetch_result('SHOW GLOBAL VARIABLES;', 0, 1);
/**
* Displays the page
*/
?>
示例5: __
</td><td>
<input type="submit" class="submit" name="add_field" value="<?php
echo __('Add a value');
?>
" />
</td></tr>
</table>
</div>
<hr class='enum_editor_no_js' />
<div id="enum_editor_output">
<h3><?php
echo __('Output');
?>
</h3>
<p><?php
echo PMA_getImage('s_info.png') . __('Copy and paste the joined values into the "Length/Values" field');
?>
</p>
<?php
// Escape quotes and slashes for usage with MySQL
foreach ($values as $key => $value) {
$values[$key] = "'";
$values[$key] .= str_replace(array("'", "\\", "'", "\"), array("''", '\\\\', "''", '\\\\'), $value);
$values[$key] .= "'";
}
// Print out the values as a string
?>
<textarea id="joined_values" cols="95" rows="5"><?php
echo join(",", $values);
?>
</textarea>
示例6: PMA_generate_common_hidden_inputs
" />
<?php
if ($import_type == 'server') {
echo PMA_generate_common_hidden_inputs('', '', 1);
} elseif ($import_type == 'database') {
echo PMA_generate_common_hidden_inputs($db, '', 1);
} else {
echo PMA_generate_common_hidden_inputs($db, $table, 1);
}
echo ' <input type="hidden" name="import_type" value="' . $import_type . '" />' . "\n";
?>
<div class="exportoptions" id="header">
<h2>
<?php
echo PMA_getImage('b_import.png', __('Import'));
?>
<?php
if ($import_type == 'server') {
echo __('Importing into the current server');
} elseif ($import_type == 'database') {
printf(__('Importing into the database "%s"'), htmlspecialchars($db));
} else {
printf(__('Importing into the table "%s"'), htmlspecialchars($table));
}
?>
</h2>
</div>
<div class="importoptions">
<h3><?php
示例7: PMA_getImage
}
/**
*
*/
require_once './libraries/check_user_privileges.lib.php';
$is_create_table_priv = true;
?>
<form id="create_table_form_minimal" method="post" action="tbl_create.php"<?php
echo $GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : '';
?>
>
<fieldset>
<legend>
<?php
if ($GLOBALS['cfg']['PropertiesIconic']) {
echo PMA_getImage('b_newtbl.png');
}
echo __('Create table');
?>
</legend>
<?php
echo PMA_generate_common_hidden_inputs($db);
?>
<div class="formelement">
<?php
echo __('Name');
?>
:
<input type="text" name="table" maxlength="64" size="30" />
</div>
<div class="formelement">
示例8: __
<th><?php
echo __('Action');
?>
</th>
<th><?php
echo __('Show');
?>
</th>
</tr>
</thead>
<tbody>
<?php
// Print out information about versions
$drop_image_or_text = '';
if (true == $GLOBALS['cfg']['PropertiesIconic']) {
$drop_image_or_text .= PMA_getImage('b_drop.png', __('Delete tracking data for this table'));
}
if ('both' === $GLOBALS['cfg']['PropertiesIconic'] || false === $GLOBALS['cfg']['PropertiesIconic']) {
$drop_image_or_text .= __('Drop');
}
$style = 'odd';
while ($one_result = PMA_DBI_fetch_array($all_tables_result)) {
list($table_name, $version_number) = $one_result;
$table_query = ' SELECT * FROM ' . PMA_backquote($GLOBALS['cfg']['Server']['pmadb']) . '.' . PMA_backquote($GLOBALS['cfg']['Server']['tracking']) . ' WHERE `db_name` = \'' . PMA_sqlAddSlashes($_REQUEST['db']) . '\' AND `table_name` = \'' . PMA_sqlAddSlashes($table_name) . '\' AND `version` = \'' . $version_number . '\'';
$table_result = PMA_query_as_controluser($table_query);
$version_data = PMA_DBI_fetch_array($table_result);
if ($version_data['tracking_active'] == 1) {
$version_status = __('active');
} else {
$version_status = __('not active');
}
示例9: __
$str1 = '<select name="logtype">' .
'<option value="schema"' . ($selection_schema ? ' selected="selected"' : '') . '>' . __('Structure only') . '</option>' .
'<option value="data"' . ($selection_data ? ' selected="selected"' : ''). '>' . __('Data only') . '</option>' .
'<option value="schema_and_data"' . ($selection_both ? ' selected="selected"' : '') . '>' . __('Structure and data') . '</option>' .
'</select>';
$str2 = '<input type="text" name="date_from" value="' . htmlspecialchars($_REQUEST['date_from']) . '" size="19" />';
$str3 = '<input type="text" name="date_to" value="' . htmlspecialchars($_REQUEST['date_to']) . '" size="19" />';
$str4 = '<input type="text" name="users" value="' . htmlspecialchars($_REQUEST['users']) . '" />';
$str5 = '<input type="submit" name="list_report" value="' . __('Go') . '" />';
printf(__('Show %1$s with dates from %2$s to %3$s by user %4$s %5$s'), $str1, $str2, $str3, $str4, $str5);
// Prepare delete link content here
$drop_image_or_text = '';
if (true == $GLOBALS['cfg']['PropertiesIconic']) {
$drop_image_or_text .= PMA_getImage('b_drop.png', __('Delete tracking data row from report'));
}
if ('both' === $GLOBALS['cfg']['PropertiesIconic'] || false === $GLOBALS['cfg']['PropertiesIconic']) {
$drop_image_or_text .= __('Delete');
}
/*
* First, list tracked data definition statements
*/
$i = 1;
if (count($data['ddlog']) == 0 && count($data['dmlog']) == 0) {
$msg = PMA_Message::notice(__('No data'));
$msg->display();
}
if ($selection_schema || $selection_both && count($data['ddlog']) > 0) {
示例10: PMA_displayTableList
/**
* display unordered list of tables
* calls itself recursively if table in given list
* is a list itself
*
* @global integer the element counter
* @global string html code for '-' image
* @global string html code for '+' image
* @global string html code for self link
* @param array $tables array of tables/tablegroups
* @param boolean $visible whether the list is visible or not
* @param string $tab_group_full full tab group name
* @param string $table_db db of this table
*/
function PMA_displayTableList($tables, $visible = false, $tab_group_full = '', $table_db = '')
{
if (!is_array($tables) || count($tables) === 0) {
return;
}
global $element_counter, $img_minus, $img_plus, $href_left;
$sep = $GLOBALS['cfg']['LeftFrameTableSeparator'];
if ($visible) {
echo '<ul id="subel' . $element_counter . '">';
} else {
echo '<ul id="subel' . $element_counter . '" style="display: none">';
}
foreach ($tables as $group => $table) {
// only allow grouping if the group has more than 1 table
if (isset($table['is' . $sep . 'group']) && $table['tab' . $sep . 'count'] > 1) {
$common_url_query = $GLOBALS['common_url_query'] . '&tbl_group=' . urlencode($tab_group_full . $group);
$element_counter++;
echo '<li>' . "\n";
if ($visible && (isset($_REQUEST['tbl_group']) && (strpos($_REQUEST['tbl_group'], $group) === 0 || strpos($_REQUEST['tbl_group'], $sep . $group) !== false) || strpos($GLOBALS['table'], $group) === 0)) {
printf($href_left, $element_counter, $GLOBALS['common_url_query'] . '&tbl_group=' . $tab_group_full);
printf($img_minus, $element_counter);
} else {
printf($href_left, $element_counter, $common_url_query);
printf($img_plus, $element_counter);
}
echo '</a>';
?>
<a href="index.php?<?php
echo $common_url_query;
?>
"
target="_parent"
onclick="
if (! toggle('<?php
echo $element_counter;
?>
', true))
window.parent.goTo('./navigation.php?<?php
echo $common_url_query;
?>
');
window.parent.goTo('./<?php
echo $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . $common_url_query;
?>
', 'main');
return false;">
<?php
if ($GLOBALS['text_dir'] === 'rtl') {
echo ' <bdo dir="ltr">(' . $table['tab' . $sep . 'count'] . ')</bdo> ';
}
echo htmlspecialchars(substr($group, 0, strlen($group) - strlen($sep)));
if ($GLOBALS['text_dir'] === 'ltr') {
echo ' <bdo dir="ltr">(' . $table['tab' . $sep . 'count'] . ')</bdo> ';
}
?>
</a>
<?php
unset($table['is' . $sep . 'group']);
unset($table['tab' . $sep . 'group']);
unset($table['tab' . $sep . 'count']);
if ($visible && (isset($_REQUEST['tbl_group']) && (strpos($_REQUEST['tbl_group'], $group) === 0 || strpos($_REQUEST['tbl_group'], $sep . $group) !== false) || strpos($GLOBALS['table'], $group) === 0)) {
PMA_displayTableList($table, true, $tab_group_full . $group, $table_db);
} else {
PMA_displayTableList($table, false, '', $table_db);
}
echo '</li>' . "\n";
} elseif (is_array($table)) {
// the table was not grouped because it is the only one with its prefix
while (isset($table['is' . $sep . 'group'])) {
// get the array with the actual table information
foreach ($table as $value) {
if (is_array($value)) {
$table = $value;
}
}
}
$link_title = PMA_getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable']);
// quick access icon next to each table name
echo '<li>' . "\n";
echo '<a class="tableicon" title="' . htmlspecialchars($link_title) . ': ' . htmlspecialchars($table['Comment']) . ' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . __('Rows') . ')"' . ' id="quick_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"' . ' href="' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '?' . $GLOBALS['common_url_query'] . '&table=' . urlencode($table['Name']) . '&goto=' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '" >';
$attr = array('id' => 'icon_' . htmlspecialchars($table_db . '.' . $table['Name']));
if (PMA_Table::isView($table_db, $table['Name'])) {
echo PMA_getImage('s_views.png', htmlspecialchars($link_title), $attr);
} else {
echo PMA_getImage('b_browse.png', htmlspecialchars($link_title), $attr);
}
//.........这里部分代码省略.........
示例11: PMA_getImage
/**
* requirements
*/
require_once 'libraries/common.inc.php';
/**
* Does the common work
*/
require 'libraries/server_common.inc.php';
/**
* Displays the sub-page heading
*/
echo '<h2>' . "\n"
. ' ' . PMA_getImage('s_asci.png')
. '' . __('Character Sets and Collations') . "\n"
. '</h2>' . "\n";
/**
* Includes the required charset library
*/
require_once 'libraries/mysql_charsets.lib.php';
/**
* Outputs the result
*/
echo '<div id="div_mysql_charset_collations">' . "\n"
. '<table class="data noclick">' . "\n"
. '<tr><th>' . __('Collation') . '</th>' . "\n"
示例12: PMA_generate_common_url
/**
* DB search optimisation
*
* @package PhpMyAdmin
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/common.lib.php';
$db = $_GET['db'];
$table_term = $_GET['table'];
$common_url_query = PMA_generate_common_url($GLOBALS['db']);
$tables_full = PMA_getTableList($db);
$tables_response = array();
foreach ($tables_full as $key => $table) {
if (strpos($key, $table_term) !== false) {
$link = '<li class="ajax_table"><a class="tableicon" title="' . htmlspecialchars($link_title) . ': ' . htmlspecialchars($table['Comment']) . ' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . __('Rows') . ')"' . ' id="quick_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"' . ' href="' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '?' . $common_url_query . '&table=' . urlencode($table['Name']) . '&goto=' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '" >';
$attr = array('id' => 'icon_' . htmlspecialchars($table_db . '.' . $table['Name']));
if (PMA_Table::isView($table_db, $table['Name'])) {
$link .= PMA_getImage('s_views.png', htmlspecialchars($link_title), $attr);
} else {
$link .= PMA_getImage('b_browse.png', htmlspecialchars($link_title), $attr);
}
$link .= '</a>';
// link for the table name itself
$href = $GLOBALS['cfg']['DefaultTabTable'] . '?' . $common_url_query . '&table=' . urlencode($table['Name']) . '&pos=0';
$link .= '<a href="' . $href . '" title="' . htmlspecialchars(PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']) . ': ' . $table['Comment'] . ' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . __('Rows') . ')') . '" id="' . htmlspecialchars($table_db . '.' . $table['Name']) . '">' . str_replace(' ', ' ', htmlspecialchars($table['disp_name'])) . '</a>';
$link .= '</li>' . "\n";
$table['line'] = $link;
$tables_response[] = $table;
}
}
PMA_ajaxResponse('', true, array('tables' => $tables_response));
示例13: PMA_generate_common_url
$_url_params['sort_by'] = 'SCHEMA_NAME';
$_url_params['sort_order'] = $sort_by == 'SCHEMA_NAME' && $sort_order == 'asc' ? 'desc' : 'asc';
echo '<table id="tabledatabases" class="data">' . "\n" . '<thead>' . "\n" . '<tr>' . "\n" . ($is_superuser || $cfg['AllowUserDropDatabase'] ? ' <th></th>' . "\n" : '') . ' <th><a href="./server_databases.php' . PMA_generate_common_url($_url_params) . '">' . "\n" . ' ' . __('Database') . "\n" . ($sort_by == 'SCHEMA_NAME' ? ' ' . PMA_getImage('s_' . $sort_order . '.png', $sort_order == 'asc' ? __('Ascending') : __('Descending')) . "\n" : '') . ' </a></th>' . "\n";
$table_columns = 3;
foreach ($column_order as $stat_name => $stat) {
if (array_key_exists($stat_name, $first_database)) {
if ($stat['format'] === 'byte') {
$table_columns += 2;
$colspan = ' colspan="2"';
} else {
$table_columns++;
$colspan = '';
}
$_url_params['sort_by'] = $stat_name;
$_url_params['sort_order'] = $sort_by == $stat_name && $sort_order == 'desc' ? 'asc' : 'desc';
echo ' <th' . $colspan . '>' . '<a href="./server_databases.php' . PMA_generate_common_url($_url_params) . '">' . "\n" . ' ' . $stat['disp_name'] . "\n" . ($sort_by == $stat_name ? ' ' . PMA_getImage('s_' . $sort_order . '.png', $sort_order == 'asc' ? __('Ascending') : __('Descending')) . "\n" : '') . ' </a></th>' . "\n";
}
}
foreach ($replication_types as $type) {
if ($type == "master") {
$name = __('Master replication');
} elseif ($type == "slave") {
$name = __('Slave replication');
}
if (${"server_{$type}_status"}) {
echo ' <th>' . $name . '</th>' . "\n";
}
}
if ($is_superuser && !PMA_DRIZZLE) {
echo ' <th>' . ($cfg['PropertiesIconic'] ? '' : __('Action')) . "\n" . ' </th>' . "\n";
}
示例14: PMA_displayTableHeaders
//.........这里部分代码省略.........
// on id or on count(id).
// Another query to test this:
// SELECT p.*, FROM_UNIXTIME(p.temps) FROM mytable AS p
// (and try clicking on each column's header twice)
if (!empty($sort_tbl) && strpos($sort_expression_nodirection, $sort_tbl) === false && strpos($sort_expression_nodirection, '(') === false) {
$sort_expression_nodirection = $sort_tbl . $sort_expression_nodirection;
}
$is_in_sort = str_replace('`', '', $sort_tbl) . $name_to_use_in_sort == str_replace('`', '', $sort_expression_nodirection) ? true : false;
}
// 2.1.3 Check the field name for a bracket.
// If it contains one, it's probably a function column
// like 'COUNT(`field`)'
// It still might be a column name of a view. See bug #3383711
// Check is_orgname.
if (strpos($name_to_use_in_sort, '(') !== false && !$is_orgname) {
$sort_order = "\n" . 'ORDER BY ' . $name_to_use_in_sort . ' ';
} else {
$sort_order = "\n" . 'ORDER BY ' . $sort_tbl . PMA_backquote($name_to_use_in_sort) . ' ';
}
unset($name_to_use_in_sort);
unset($is_orgname);
// 2.1.4 Do define the sorting URL
if (!$is_in_sort) {
// patch #455484 ("Smart" order)
$GLOBALS['cfg']['Order'] = strtoupper($GLOBALS['cfg']['Order']);
if ($GLOBALS['cfg']['Order'] === 'SMART') {
$sort_order .= preg_match('@time|date@i', $fields_meta[$i]->type) ? 'DESC' : 'ASC';
} else {
$sort_order .= $GLOBALS['cfg']['Order'];
}
$order_img = '';
} elseif ('DESC' == $sort_direction) {
$sort_order .= ' ASC';
$order_img = ' ' . PMA_getImage('s_desc.png', __('Descending'), array('class' => "soimg{$i}", 'title' => ''));
$order_img .= ' ' . PMA_getImage('s_asc.png', __('Ascending'), array('class' => "soimg{$i} hide", 'title' => ''));
} else {
$sort_order .= ' DESC';
$order_img = ' ' . PMA_getImage('s_asc.png', __('Ascending'), array('class' => "soimg{$i}", 'title' => ''));
$order_img .= ' ' . PMA_getImage('s_desc.png', __('Descending'), array('class' => "soimg{$i} hide", 'title' => ''));
}
if (preg_match('@(.*)([[:space:]](LIMIT (.*)|PROCEDURE (.*)|FOR UPDATE|LOCK IN SHARE MODE))@is', $unsorted_sql_query, $regs3)) {
$sorted_sql_query = $regs3[1] . $sort_order . $regs3[2];
} else {
$sorted_sql_query = $unsorted_sql_query . $sort_order;
}
$_url_params = array('db' => $db, 'table' => $table, 'sql_query' => $sorted_sql_query, 'session_max_rows' => $session_max_rows);
$order_url = 'sql.php' . PMA_generate_common_url($_url_params);
// 2.1.5 Displays the sorting URL
// enable sort order swapping for image
$order_link_params = array();
if (isset($order_img) && $order_img != '') {
if (strstr($order_img, 'asc')) {
$order_link_params['onmouseover'] = "\$('.soimg{$i}').toggle()";
$order_link_params['onmouseout'] = "\$('.soimg{$i}').toggle()";
} elseif (strstr($order_img, 'desc')) {
$order_link_params['onmouseover'] = "\$('.soimg{$i}').toggle()";
$order_link_params['onmouseout'] = "\$('.soimg{$i}').toggle()";
}
}
if ($GLOBALS['cfg']['HeaderFlipType'] == 'auto') {
if (PMA_USR_BROWSER_AGENT == 'IE') {
$GLOBALS['cfg']['HeaderFlipType'] = 'css';
} else {
$GLOBALS['cfg']['HeaderFlipType'] = 'fake';
}
}
示例15: _getBreadcrumbs
/**
* Returns the breadcrumbs as HTML
*
* @return string HTML formatted breadcrumbs
*/
private function _getBreadcrumbs()
{
$retval = '';
$tbl_is_view = PMA_Table::isView($this->_db, $this->_table);
$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 ($GLOBALS['cfg']['NavigationBarIconic'] !== true) {
$item .= '%4$s: ';
}
$item .= '%3$s</a>';
$retval .= "<div id='floating_menubar'></div>";
$retval .= "<div id='serverinfo'>";
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$retval .= PMA_getImage('s_host.png', '', array('class' => 'item'));
}
$retval .= sprintf($item, $GLOBALS['cfg']['DefaultTabServer'], PMA_generate_common_url(), htmlspecialchars($server_info), __('Server'));
if (strlen($this->_db)) {
$retval .= $separator;
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$retval .= PMA_getImage('s_db.png', '', array('class' => 'item'));
}
$retval .= sprintf($item, $GLOBALS['cfg']['DefaultTabDatabase'], PMA_generate_common_url($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) && !(isset($_REQUEST['purge']) && $_REQUEST['purge'] == '1')) {
include_once './libraries/tbl_info.inc.php';
$retval .= $separator;
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$icon = $tbl_is_view ? 'b_views.png' : 's_tbl.png';
$retval .= PMA_getImage($icon, '', array('class' => 'item'));
}
$retval .= sprintf($item, $GLOBALS['cfg']['DefaultTabTable'], PMA_generate_common_url($this->_db, $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 (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
/**
* Settings for relations stuff
*/
include_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();
// Get additional information about tables for tooltip is done
// in libraries/db_info.inc.php 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;
}