Romanian update
[phpmyadmin/arisferyanto.git] / libraries / navigation_header.inc.php
blob6a8748e9d7473dd994428d4be783e208fe0e8354
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 */
9 /**
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']) {
20 $logo = 'phpMyAdmin';
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']) {
32 case 'new':
33 echo '" target="_blank"';
34 break;
35 case 'main':
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"';
39 } else {
40 echo '"';
43 echo '>' . $logo . '</a>' . "\n"
44 .'</div>' . "\n";
45 } // end of display logo
47 <div id="leftframelinks">
48 <?php
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 . '" />'
54 : $strHome)
55 .'</a>' . "\n";
56 // if we have chosen server
57 if ($server != 0) {
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 . '&amp;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 . '" />'
67 : $strLogout)
68 .'</a>' . "\n";
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 . '" />';
77 } else {
78 echo '<br />' . "\n";
79 $query_frame_link_text = $strQueryFrame;
81 echo '<a href="' . $anchor . '&amp;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";
94 echo '</div>' . "\n";
96 /**
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);
103 echo '</div><br />';
104 } // end if LeftDisplayServers