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 ?
'<img class="icon" src="' . $pmaThemeImage . 'b_home.png" width="16" '
60 .' height="16" alt="' . __('Home') . '" />'
63 // if we have chosen server
65 // Logout for advanced authentication
66 if ($GLOBALS['cfg']['Server']['auth_type'] != 'config') {
67 echo ($GLOBALS['cfg']['MainPageIconic'] ?
'' : ' - ');
68 echo '<a href="index.php?' . $query_url . '&old_usr='
69 .urlencode($PHP_AUTH_USER) . '" target="_parent"'
70 .' title="' . __('Log out') . '" >'
71 .($GLOBALS['cfg']['MainPageIconic']
72 ?
'<img class="icon" src="' . $pmaThemeImage . 's_loggoff.png" '
73 .' width="16" height="16" alt="' . __('Log out') . '" />'
76 } // end if ($GLOBALS['cfg']['Server']['auth_type'] != 'config'
78 $anchor = 'querywindow.php?' . PMA_generate_common_url($db, $table);
80 if ($GLOBALS['cfg']['MainPageIconic']) {
81 $query_frame_link_text =
82 '<img class="icon" src="' . $pmaThemeImage . 'b_selboard.png"'
83 .' width="16" height="16" alt="' . __('Query window') . '" />';
86 $query_frame_link_text = __('Query window');
88 echo '<a href="' . $anchor . '&no_js=true"'
89 .' title="' . __('Query window') . '"';
90 echo ' onclick="javascript:if (window.parent.open_querywindow()) return false;"';
91 echo '>' . $query_frame_link_text . '</a>' . "\n";
92 } // end if ($server != 0)
94 echo ' <a href="Documentation.html" target="documentation"'
95 .' title="' . __('phpMyAdmin documentation') . '" >';
97 if ($GLOBALS['cfg']['MainPageIconic']) {
98 echo '<img class="icon" src="' . $pmaThemeImage . 'b_docs.png" width="16" height="16"'
99 .' alt="' . __('phpMyAdmin documentation') . '" />';
102 echo ' ' . PMA_showMySQLDocu('', '', TRUE) . "\n";
104 $params = array('uniqid' => uniqid());
105 if (!empty($GLOBALS['db'])) {
106 $params['db'] = $GLOBALS['db'];
108 echo '<a href="navigation.php?' . PMA_generate_common_url($params) . '" target="frame_navigation">';
109 if ($GLOBALS['cfg']['MainPageIconic']) {
110 echo '<img class="icon" src="'. $GLOBALS['pmaThemeImage'] . 's_reload.png"'
111 . ' title="' . __('Reload navigation frame') . '"'
112 . ' alt="' . __('Reload navigation frame') . '" />';
114 echo '<br />' . __('Reload navigation frame');
118 echo '</div>' . "\n";
121 * Displays the MySQL servers choice form
123 if ($GLOBALS['cfg']['LeftDisplayServers'] && (count($GLOBALS['cfg']['Servers']) > 1 ||
$server == 0 && count($GLOBALS['cfg']['Servers']) == 1)) {
124 echo '<div id="serverinfo">';
125 include './libraries/select_server.lib.php';
126 PMA_select_server(true, true);
128 } // end if LeftDisplayServers