本文整理汇总了PHP中PMA_getTitleForTarget函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_getTitleForTarget函数的具体用法?PHP PMA_getTitleForTarget怎么用?PHP PMA_getTitleForTarget使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_getTitleForTarget函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __
}
// Provide a line with links to the relevant database and table
if (isset($dbname) && empty($dbname_is_wildcard)) {
echo '[ ' . __('Database')
. ' <a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?'
. $GLOBALS['url_query'] . '&db=' . $url_dbname . '&reload=1">'
. htmlspecialchars($dbname) . ': ' . PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabDatabase']) . "</a> ]\n";
if (isset($tablename)) {
echo ' [ ' . __('Table') . ' <a href="'
. $GLOBALS['cfg']['DefaultTabTable'] . '?' . $GLOBALS['url_query']
. '&db=' . $url_dbname . '&table=' . htmlspecialchars(urlencode($tablename))
. '&reload=1">' . htmlspecialchars($tablename) . ': '
. PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabTable'])
. "</a> ]\n";
}
unset($url_dbname);
}
if (! isset($dbname) && ! $user_does_not_exists) {
include_once 'libraries/display_change_password.lib.php';
echo '<form action="server_privileges.php" method="post" onsubmit="return checkPassword(this);">' . "\n"
. PMA_generate_common_hidden_inputs('', '')
. '<input type="hidden" name="old_username" value="' . htmlspecialchars($username) . '" />' . "\n"
. '<input type="hidden" name="old_hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n"
. '<fieldset id="fieldset_change_copy_user">' . "\n"
. ' <legend>' . __('Change Login Information / Copy User') . '</legend>' . "\n";
PMA_displayLoginInformationFields('change');
示例2: PMA_displayTableList
/**
* display unordered list of tables
* calls itself recursively if table in given list
* is a list itself
*
* @uses is_array()
* @uses count()
* @uses urlencode()
* @uses strpos()
* @uses printf()
* @uses htmlspecialchars()
* @uses strlen()
* @uses is_array()
* @uses PMA_displayTableList()
* @uses $_REQUEST['tbl_group']
* @uses $GLOBALS['common_url_query']
* @uses $GLOBALS['table']
* @uses $GLOBALS['pmaThemeImage']
* @uses $GLOBALS['cfg']['LeftFrameTableSeparator']
* @uses $GLOBALS['cfg']['DefaultTabDatabase']
* @uses $GLOBALS['cfg']['DefaultTabTable']
* @uses $GLOBALS['strRows']
* @uses $GLOBALS['strBrowse']
* @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) {
if (isset($table['is' . $sep . 'group'])) {
$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)) {
$link_title = PMA_getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable']);
// quick access icon next to each table name
//.........这里部分代码省略.........
示例3: unset
}
echo ' </select>' . "\n";
}
} else {
unset($res);
}
echo ' <input type="text" id="text_tablename" name="tablename" />' . "\n";
}
echo '</fieldset>' . "\n";
echo '<fieldset class="tblFooters">' . "\n" . ' <input type="submit" value="' . __('Go') . '" />' . '</fieldset>' . "\n" . '</form>' . "\n";
}
// Provide a line with links to the relevant database and table
if (isset($dbname) && empty($dbname_is_wildcard)) {
echo '[ ' . __('Database') . ' <a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . $GLOBALS['url_query'] . '&db=' . $url_dbname . '&reload=1">' . htmlspecialchars($dbname) . ': ' . PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabDatabase']) . "</a> ]\n";
if (isset($tablename)) {
echo ' [ ' . __('Table') . ' <a href="' . $GLOBALS['cfg']['DefaultTabTable'] . '?' . $GLOBALS['url_query'] . '&db=' . $url_dbname . '&table=' . htmlspecialchars(urlencode($tablename)) . '&reload=1">' . htmlspecialchars($tablename) . ': ' . PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']) . "</a> ]\n";
}
unset($url_dbname);
}
if (!isset($dbname) && !$user_does_not_exists) {
include_once './libraries/display_change_password.lib.php';
echo '<form action="server_privileges.php" method="post" onsubmit="return checkPassword(this);">' . "\n" . PMA_generate_common_hidden_inputs('', '') . '<input type="hidden" name="old_username" value="' . htmlspecialchars($username) . '" />' . "\n" . '<input type="hidden" name="old_hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n" . '<fieldset id="fieldset_change_copy_user">' . "\n" . ' <legend>' . __('Change Login Information / Copy User') . '</legend>' . "\n";
PMA_displayLoginInformationFields('change');
echo ' <fieldset>' . "\n" . ' <legend>' . __('Create a new user with the same privileges and ...') . '</legend>' . "\n";
$choices = array('4' => __('... keep the old one.'), '1' => __('... delete the old one from the user tables.'), '2' => __('... revoke all active privileges from the old one and delete it afterwards.'), '3' => __('... delete the old one from the user tables and reload the privileges afterwards.'));
PMA_display_html_radio('mode', $choices, '4', true);
unset($choices);
echo ' </fieldset>' . "\n" . '</fieldset>' . "\n" . '<fieldset id="fieldset_change_copy_user_footer" class="tblFooters">' . "\n" . ' <input type="submit" name="change_copy" value="' . __('Go') . '" />' . "\n" . '</fieldset>' . "\n" . '</form>' . "\n";
}
}
} elseif (isset($_REQUEST['adduser'])) {
示例4: PMA_escapeJsString
?>
';
var text_dir = '<?php
echo PMA_escapeJsString($GLOBALS['text_dir']);
?>
';
var pma_absolute_uri = '<?php
echo PMA_escapeJsString($GLOBALS['cfg']['PmaAbsoluteUri']);
?>
';
var pma_text_default_tab = '<?php
echo PMA_escapeJsString(PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']));
?>
';
var pma_text_left_default_tab = '<?php
echo PMA_escapeJsString(PMA_getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable']));
?>
';
// for content and navigation frames
var frame_content = 0;
var frame_navigation = 0;
function getFrames() {
<?php
if ($GLOBALS['text_dir'] === 'ltr') {
?>
frame_content = window.frames[1];
frame_navigation = window.frames[0];
<?php
} else {
示例5: PMA_escapeJsString
// definitions used in common.js
var common_query = '<?php echo PMA_escapeJsString(PMA_generate_common_url('', '', '&'));?>';
var opendb_url = '<?php echo PMA_escapeJsString($GLOBALS['cfg']['DefaultTabDatabase']); ?>';
var safari_browser = <?php echo PMA_USR_BROWSER_AGENT == 'SAFARI' ? 'true' : 'false' ?>;
var querywindow_height = <?php echo PMA_escapeJsString($GLOBALS['cfg']['QueryWindowHeight']); ?>;
var querywindow_width = <?php echo PMA_escapeJsString($GLOBALS['cfg']['QueryWindowWidth']); ?>;
var collation_connection = '<?php echo PMA_escapeJsString($GLOBALS['collation_connection']); ?>';
var lang = '<?php echo PMA_escapeJsString($GLOBALS['lang']); ?>';
var server = '<?php echo PMA_escapeJsString($GLOBALS['server']); ?>';
var table = '<?php echo PMA_escapeJsString($GLOBALS['table']); ?>';
var db = '<?php echo PMA_escapeJsString($GLOBALS['db']); ?>';
var token = '<?php echo PMA_escapeJsString($_SESSION[' PMA_token ']); ?>';
var text_dir = '<?php echo PMA_escapeJsString($GLOBALS['text_dir']); ?>';
var pma_absolute_uri = '<?php echo PMA_escapeJsString($GLOBALS['cfg']['PmaAbsoluteUri']); ?>';
var pma_text_default_tab = '<?php echo PMA_escapeJsString(PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabTable'])); ?>';
var pma_text_left_default_tab = '<?php echo PMA_escapeJsString(PMA_getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable'])); ?>';
// for content and navigation frames
var frame_content = 0;
var frame_navigation = 0;
function getFrames() {
<?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
frame_content = window.frames[1];
frame_navigation = window.frames[0];
<?php } else { ?>
frame_content = window.frames[0];
frame_navigation = window.frames[1];
<?php } ?>
}
var onloadCnt = 0;
示例6: 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);
}
//.........这里部分代码省略.........
示例7: 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));
示例8: testGetTitleForTarget
/**
* @dataProvider dataProvider
* @return void
*/
function testGetTitleForTarget($target, $result)
{
$this->assertEquals($result, PMA_getTitleForTarget($target));
}