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 .'<a href="' . $GLOBALS['cfg']['LeftLogoLink'];
34 switch ($GLOBALS['cfg']['LeftLogoLinkWindow']) {
36 echo '" target="_blank"';
39 // do not add our parameters for an external link
40 if (substr(strtolower($GLOBALS['cfg']['LeftLogoLink']), 0, 4) !== 'http') {
41 echo '?' . $query_url . '" target="frame_content"';
46 echo '>' . $logo . '</a>' . "\n"
48 } // end of display logo
50 <div id
="leftframelinks">
52 echo '<a href="main.php?' . $query_url . '"'
53 .' title="' . $strHome . '">'
54 .($GLOBALS['cfg']['MainPageIconic']
55 ?
'<img class="icon" src="' . $pmaThemeImage . 'b_home.png" width="16" '
56 .' height="16" alt="' . $strHome . '" />'
59 // if we have chosen server
61 // Logout for advanced authentication
62 if ($GLOBALS['cfg']['Server']['auth_type'] != 'config') {
63 echo ($GLOBALS['cfg']['MainPageIconic'] ?
'' : ' - ');
64 echo '<a href="index.php?' . $query_url . '&old_usr='
65 .urlencode($PHP_AUTH_USER) . '" target="_parent"'
66 .' title="' . $strLogout . '" >'
67 .($GLOBALS['cfg']['MainPageIconic']
68 ?
'<img class="icon" src="' . $pmaThemeImage . 's_loggoff.png" '
69 .' width="16" height="16" alt="' . $strLogout . '" />'
72 } // end if ($GLOBALS['cfg']['Server']['auth_type'] != 'config'
74 $anchor = 'querywindow.php?' . PMA_generate_common_url($db, $table);
76 if ($GLOBALS['cfg']['MainPageIconic']) {
77 $query_frame_link_text =
78 '<img class="icon" src="' . $pmaThemeImage . 'b_selboard.png"'
79 .' width="16" height="16" alt="' . $strQueryFrame . '" />';
82 $query_frame_link_text = $strQueryFrame;
84 echo '<a href="' . $anchor . '&no_js=true"'
85 .' title="' . $strQueryFrame . '"';
86 echo ' onclick="javascript:if (window.parent.open_querywindow()) return false;"';
87 echo '>' . $query_frame_link_text . '</a>' . "\n";
88 } // end if ($server != 0)
90 if ($GLOBALS['cfg']['MainPageIconic']) {
91 echo ' <a href="Documentation.html" target="documentation"'
92 .' title="' . $strPmaDocumentation . '" >'
93 .'<img class="icon" src="' . $pmaThemeImage . 'b_docs.png" width="16" height="16"'
94 .' alt="' . $strPmaDocumentation . '" /></a>' . "\n";
95 echo ' ' . PMA_showMySQLDocu('', '', TRUE) . "\n";
100 * Displays the MySQL servers choice form
102 if ($GLOBALS['cfg']['LeftDisplayServers'] && (count($GLOBALS['cfg']['Servers']) > 1 ||
$server == 0 && count($GLOBALS['cfg']['Servers']) == 1)) {
103 echo '<div id="serverinfo">';
104 include './libraries/select_server.lib.php';
105 PMA_select_server(true, true);
107 } // end if LeftDisplayServers