';
if ($GLOBALS['cfg']['NavigationLogoLink']) {
$logo_link = trim(
htmlspecialchars($GLOBALS['cfg']['NavigationLogoLink'])
);
// prevent XSS, see PMASA-2013-9
// if link has protocol, allow only http and https
if (preg_match('/^[a-z]+:/i', $logo_link)
&& ! preg_match('/^https?:/i', $logo_link)
) {
$logo_link = 'index.php';
}
$retval .= '
';
$retval .= '';
$retval .= PMA_Util::getNavigationLink(
'index.php' . PMA_URL_getCommon(),
$showText,
__('Home'),
$showIcon,
'b_home.png'
);
// if we have chosen server
if ($GLOBALS['server'] != 0) {
// Logout for advanced authentication
if ($GLOBALS['cfg']['Server']['auth_type'] != 'config') {
$link = 'index.php' . $GLOBALS['url_query'];
$link .= '&old_usr=' . urlencode($GLOBALS['PHP_AUTH_USER']);
$retval .= PMA_Util::getNavigationLink(
$link,
$showText,
__('Log out'),
$showIcon,
's_loggoff.png',
'',
true
);
}
}
$retval .= PMA_Util::getNavigationLink(
PMA_Util::getDocuLink('index'),
$showText,
__('phpMyAdmin documentation'),
$showIcon,
'b_docs.png',
'',
false,
'documentation'
);
$retval .= PMA_Util::getNavigationLink(
PMA_Util::getMySQLDocuURL('', ''),
$showText,
__('Documentation'),
$showIcon,
'b_sqlhelp.png',
'',
false,
'mysql_doc'
);
$retval .= PMA_Util::getNavigationLink(
'#',
$showText,
__('Reload navigation panel'),
$showIcon,
's_reload.png',
'pma_navigation_reload'
);
$retval .= '
';
$retval .= '';
return $retval;
}
/**
* Displays the MySQL servers choice form
*
* @return string HTML code for the MySQL servers choice
*/
private function _serverChoice()
{
$retval = '';
if ($GLOBALS['cfg']['NavigationDisplayServers']
&& count($GLOBALS['cfg']['Servers']) > 1
) {
include_once './libraries/select_server.lib.php';
$retval .= '';
$retval .= '';
$retval .= PMA_selectServer(true, true);
$retval .= '
';
$retval .= '';
}
return $retval;
}
}
?>