2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * displays the pma logo, links and db and server selection in left frame
12 if (empty($query_url)) {
13 // avoid putting here $db because it could display a db name
14 // to which the next user does not have access
15 $query_url = PMA_generate_common_url();
18 // display Logo, depending on $GLOBALS['cfg']['LeftDisplayLogo']
19 if ($GLOBALS['cfg']['LeftDisplayLogo']) {
21 if (@file_exists
($GLOBALS['pmaThemeImage'] . 'logo_left.png')) {
22 $logo = '<img src="' . $GLOBALS['pmaThemeImage'] . 'logo_left.png" '
23 .'alt="' . $logo . '" id="imgpmalogo" />';
24 } elseif (@file_exists
($GLOBALS['pmaThemeImage'] . 'pma_logo2.png')) {
25 $logo = '<img src="' . $GLOBALS['pmaThemeImage'] . 'pma_logo2.png" '
26 .'alt="' . $logo . '" id="imgpmalogo" />';
29 echo '<div id="pmalogo">' . "\n"
30 .'<a href="' . $GLOBALS['cfg']['LeftLogoLink'];
31 switch ($GLOBALS['cfg']['LeftLogoLinkWindow']) {
33 echo '" target="_blank"';
36 // do not add our parameters for an external link
37 if (substr(strtolower($GLOBALS['cfg']['LeftLogoLink']), 0, 4) !== 'http') {
38 echo '?' . $query_url . '" target="frame_content"';
43 echo '>' . $logo . '</a>' . "\n"
45 } // end of display logo
47 <div id
="leftframelinks">
49 echo '<a href="main.php?' . $query_url . '"'
50 .' title="' . $strHome . '">'
51 .($GLOBALS['cfg']['MainPageIconic']
52 ?
'<img class="icon" src="' . $pmaThemeImage . 'b_home.png" width="16" '
53 .' height="16" alt="' . $strHome . '" />'
56 // if we have chosen server
58 // Logout for advanced authentication
59 if ($GLOBALS['cfg']['Server']['auth_type'] != 'config') {
60 echo ($GLOBALS['cfg']['MainPageIconic'] ?
'' : ' - ');
61 echo '<a href="index.php?' . $query_url . '&old_usr='
62 .urlencode($PHP_AUTH_USER) . '" target="_parent"'
63 .' title="' . $strLogout . '" >'
64 .($GLOBALS['cfg']['MainPageIconic']
65 ?
'<img class="icon" src="' . $pmaThemeImage . 's_loggoff.png" '
66 .' width="16" height="16" alt="' . $strLogout . '" />'
69 } // end if ($GLOBALS['cfg']['Server']['auth_type'] != 'config'
71 $anchor = 'querywindow.php?' . PMA_generate_common_url($db, $table);
73 if ($GLOBALS['cfg']['MainPageIconic']) {
74 $query_frame_link_text =
75 '<img class="icon" src="' . $pmaThemeImage . 'b_selboard.png"'
76 .' width="16" height="16" alt="' . $strQueryFrame . '" />';
79 $query_frame_link_text = $strQueryFrame;
81 echo '<a href="' . $anchor . '&no_js=true"'
82 .' title="' . $strQueryFrame . '"';
83 echo ' onclick="javascript:if (window.parent.open_querywindow()) return false;"';
84 echo '>' . $query_frame_link_text . '</a>' . "\n";
85 } // end if ($server != 0)
87 if ($GLOBALS['cfg']['MainPageIconic']) {
88 echo ' <a href="Documentation.html" target="documentation"'
89 .' title="' . $strPmaDocumentation . '" >'
90 .'<img class="icon" src="' . $pmaThemeImage . 'b_docs.png" width="16" height="16"'
91 .' alt="' . $strPmaDocumentation . '" /></a>' . "\n";
92 echo ' ' . PMA_showMySQLDocu('', '', TRUE) . "\n";
97 * Displays the MySQL servers choice form
99 if ($GLOBALS['cfg']['LeftDisplayServers'] && (count($GLOBALS['cfg']['Servers']) > 1 ||
$server == 0 && count($GLOBALS['cfg']['Servers']) == 1)) {
100 echo '<div id="serverinfo">';
101 include './libraries/select_server.lib.php';
102 PMA_select_server(true, true);
104 } // end if LeftDisplayServers