XHTML fixes
[phpmyadmin/crack.git] / libraries / navigation_header.inc.php
blobfbe649ce9fd9cad083d8d00b3f0733125070c965
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * displays the pma logo, links and db and server selection in left frame
6 * @version $Id$
7 */
8 if (! defined('PHPMYADMIN')) {
9 exit;
12 /**
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']) {
23 $logo = 'phpMyAdmin';
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']) {
35 case 'new':
36 echo '" target="_blank"';
37 break;
38 case 'main':
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"';
42 } else {
43 echo '"';
46 echo '>' . $logo . '</a>' . "\n"
47 .'</div>' . "\n";
48 } // end of display logo
50 <div id="leftframelinks">
51 <?php
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 . '" />'
57 : $strHome)
58 .'</a>' . "\n";
59 // if we have chosen server
60 if ($server != 0) {
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 . '&amp;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 . '" />'
70 : $strLogout)
71 .'</a>' . "\n";
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 . '" />';
80 } else {
81 echo '<br />' . "\n";
82 $query_frame_link_text = $strQueryFrame;
84 echo '<a href="' . $anchor . '&amp;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";
97 echo '</div>' . "\n";
99 /**
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);
106 echo '</div><br />';
107 } // end if LeftDisplayServers