2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * displays the pma logo, links and db and server selection in left frame
8 if (! defined('PHPMYADMIN')) {
15 if (empty($query_url)) {
16 // avoid putting here $db because it could display a db name
17 // to which the next user does not have access
18 $query_url = PMA_generate_common_url();
21 // display Logo, depending on $GLOBALS['cfg']['LeftDisplayLogo']
22 if ($GLOBALS['cfg']['LeftDisplayLogo']) {
24 if (@file_exists
($GLOBALS['pmaThemeImage'] . 'logo_left.png')) {
25 $logo = '<img src="' . $GLOBALS['pmaThemeImage'] . 'logo_left.png" '
26 .'alt="' . $logo . '" id="imgpmalogo" />';
27 } elseif (@file_exists
($GLOBALS['pmaThemeImage'] . 'pma_logo2.png')) {
28 $logo = '<img src="' . $GLOBALS['pmaThemeImage'] . 'pma_logo2.png" '
29 .'alt="' . $logo . '" id="imgpmalogo" />';
32 echo '<div id="pmalogo">' . "\n";
33 if ($GLOBALS['cfg']['LeftLogoLink']) {
34 echo '<a href="' . htmlspecialchars($GLOBALS['cfg']['LeftLogoLink']);
35 switch ($GLOBALS['cfg']['LeftLogoLinkWindow']) {
37 echo '" target="_blank"';
40 // do not add our parameters for an external link
41 if (substr(strtolower($GLOBALS['cfg']['LeftLogoLink']), 0, 4) !== '://') {
42 echo '?' . $query_url . '" target="frame_content"';
44 echo '" target="_blank"';
47 echo '>' . $logo . '</a>' . "\n";
52 } // end of display logo
54 <div id
="leftframelinks">
56 echo '<a href="main.php?' . $query_url . '"'
57 .' title="' . __('Home') . '">'
58 .($GLOBALS['cfg']['MainPageIconic']
59 ?
PMA_getImage('b_home.png', __('Home'))
62 // if we have chosen server
64 // Logout for advanced authentication
65 if ($GLOBALS['cfg']['Server']['auth_type'] != 'config') {
66 echo ($GLOBALS['cfg']['MainPageIconic'] ?
'' : ' - ');
67 echo '<a href="index.php?' . $query_url . '&old_usr='
68 .urlencode($PHP_AUTH_USER) . '" target="_parent"'
69 .' title="' . __('Log out') . '" >'
70 .($GLOBALS['cfg']['MainPageIconic']
71 ?
PMA_getImage('s_loggoff.png', __('Log out'))
74 } // end if ($GLOBALS['cfg']['Server']['auth_type'] != 'config'
76 $anchor = 'querywindow.php?' . PMA_generate_common_url($db, $table);
78 if ($GLOBALS['cfg']['MainPageIconic']) {
79 $query_frame_link_text = PMA_getImage('b_selboard.png', __('Query window'));
82 $query_frame_link_text = __('Query window');
84 echo '<a href="' . $anchor . '&no_js=true"'
85 .' title="' . __('Query window') . '"';
86 echo ' onclick="if (window.parent.open_querywindow()) return false;"';
87 echo '>' . $query_frame_link_text . '</a>' . "\n";
88 } // end if ($server != 0)
90 echo ' <a href="Documentation.html" target="documentation"'
91 .' title="' . __('phpMyAdmin documentation') . '" >';
93 if ($GLOBALS['cfg']['MainPageIconic']) {
94 echo PMA_getImage('b_docs.png', __('phpMyAdmin documentation'));
96 echo '<br />' . __('phpMyAdmin documentation');
100 $documentation_link = PMA_showMySQLDocu('', '', true);
101 if ($GLOBALS['cfg']['MainPageIconic']) {
102 echo $documentation_link . "\n";
104 preg_match('/<a[^>]*>/', $documentation_link, $matches);
106 echo substr($link, 0, strlen($link) - 1) . ' title="' . __('Documentation') . '" >'
107 . '<br />' . __('Documentation') . '</a>';
110 $params = array('uniqid' => uniqid());
111 if (!empty($GLOBALS['db'])) {
112 $params['db'] = $GLOBALS['db'];
114 echo '<a href="navigation.php?' . PMA_generate_common_url($params)
115 . '" title="' . __('Reload navigation frame') . '" target="frame_navigation">';
116 if ($GLOBALS['cfg']['MainPageIconic']) {
117 echo PMA_getImage('s_reload', __('Reload navigation frame'));
119 echo '<br />' . __('Reload navigation frame');
123 echo '</div>' . "\n";
126 * Displays the MySQL servers choice form
128 if ($GLOBALS['cfg']['LeftDisplayServers'] && (count($GLOBALS['cfg']['Servers']) > 1 ||
$server == 0 && count($GLOBALS['cfg']['Servers']) == 1)) {
129 echo '<div id="serverinfo">';
130 include './libraries/select_server.lib.php';
131 PMA_select_server(true, true);
133 } // end if LeftDisplayServers