2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * displays the pma logo, links and db and server selection in left frame
9 if (! defined('PHPMYADMIN')) {
16 if (empty($query_url)) {
17 // avoid putting here $db because it could display a db name
18 // to which the next user does not have access
19 $query_url = PMA_generate_common_url();
22 // display Logo, depending on $GLOBALS['cfg']['LeftDisplayLogo']
23 if ($GLOBALS['cfg']['LeftDisplayLogo']) {
25 if (@file_exists
($GLOBALS['pmaThemeImage'] . 'logo_left.png')) {
26 $logo = '<img src="' . $GLOBALS['pmaThemeImage'] . 'logo_left.png" '
27 .'alt="' . $logo . '" id="imgpmalogo" />';
28 } elseif (@file_exists
($GLOBALS['pmaThemeImage'] . 'pma_logo2.png')) {
29 $logo = '<img src="' . $GLOBALS['pmaThemeImage'] . 'pma_logo2.png" '
30 .'alt="' . $logo . '" id="imgpmalogo" />';
33 echo '<div id="pmalogo">' . "\n"
34 .'<a href="' . $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) !== 'http') {
42 echo '?' . $query_url . '" target="frame_content"';
47 echo '>' . $logo . '</a>' . "\n"
49 } // end of display logo
51 <div id
="leftframelinks">
53 echo '<a href="main.php?' . $query_url . '"'
54 .' title="' . $strHome . '">'
55 .($GLOBALS['cfg']['MainPageIconic']
56 ?
'<img class="icon" src="' . $pmaThemeImage . 'b_home.png" width="16" '
57 .' height="16" alt="' . $strHome . '" />'
60 // if we have chosen server
62 // Logout for advanced authentication
63 if ($GLOBALS['cfg']['Server']['auth_type'] != 'config') {
64 echo ($GLOBALS['cfg']['MainPageIconic'] ?
'' : ' - ');
65 echo '<a href="index.php?' . $query_url . '&old_usr='
66 .urlencode($PHP_AUTH_USER) . '" target="_parent"'
67 .' title="' . $strLogout . '" >'
68 .($GLOBALS['cfg']['MainPageIconic']
69 ?
'<img class="icon" src="' . $pmaThemeImage . 's_loggoff.png" '
70 .' width="16" height="16" alt="' . $strLogout . '" />'
73 } // end if ($GLOBALS['cfg']['Server']['auth_type'] != 'config'
75 $anchor = 'querywindow.php?' . PMA_generate_common_url($db, $table);
77 if ($GLOBALS['cfg']['MainPageIconic']) {
78 $query_frame_link_text =
79 '<img class="icon" src="' . $pmaThemeImage . 'b_selboard.png"'
80 .' width="16" height="16" alt="' . $strQueryFrame . '" />';
83 $query_frame_link_text = $strQueryFrame;
85 echo '<a href="' . $anchor . '&no_js=true"'
86 .' title="' . $strQueryFrame . '"';
87 echo ' onclick="javascript:if (window.parent.open_querywindow()) return false;"';
88 echo '>' . $query_frame_link_text . '</a>' . "\n";
89 } // end if ($server != 0)
91 if ($GLOBALS['cfg']['MainPageIconic']) {
92 echo ' <a href="Documentation.html" target="documentation"'
93 .' title="' . $strPmaDocumentation . '" >'
94 .'<img class="icon" src="' . $pmaThemeImage . 'b_docs.png" width="16" height="16"'
95 .' alt="' . $strPmaDocumentation . '" /></a>' . "\n";
96 echo ' ' . PMA_showMySQLDocu('', '', TRUE) . "\n";
101 * Displays the MySQL servers choice form
103 if ($GLOBALS['cfg']['LeftDisplayServers'] && (count($GLOBALS['cfg']['Servers']) > 1 ||
$server == 0 && count($GLOBALS['cfg']['Servers']) == 1)) {
104 echo '<div id="serverinfo">';
105 include './libraries/select_server.lib.php';
106 PMA_select_server(true, true);
108 } // end if LeftDisplayServers