Translation update done using Pootle.
[phpmyadmin/tyronm.git] / libraries / navigation_header.inc.php
blob7f7c530f67d10b58a095bc12f520314961e9f6c3
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 * @package phpMyAdmin
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 if ($GLOBALS['cfg']['LeftLogoLink']) {
34 echo '<a href="' . htmlspecialchars($GLOBALS['cfg']['LeftLogoLink']);
35 switch ($GLOBALS['cfg']['LeftLogoLinkWindow']) {
36 case 'new':
37 echo '" target="_blank"';
38 break;
39 case 'main':
40 // do not add our parameters for an external link
41 if (substr(strtolower($GLOBALS['cfg']['LeftLogoLink']), 0, 4) !== '://') {
42 echo '?' . $query_url . '" target="frame_content"';
43 } else {
44 echo '" target="_blank"';
47 echo '>' . $logo . '</a>' . "\n";
48 } else {
49 echo $logo . "\n";
51 echo '</div>' . "\n";
52 } // end of display logo
54 <div id="leftframelinks">
55 <?php
56 echo '<a href="main.php?' . $query_url . '"'
57 .' title="' . __('Home') . '">'
58 .($GLOBALS['cfg']['MainPageIconic']
59 ? '<img class="icon ic_b_home" src="themes/dot.gif" alt="' . __('Home') . '" />'
60 : __('Home'))
61 .'</a>' . "\n";
62 // if we have chosen server
63 if ($server != 0) {
64 // Logout for advanced authentication
65 if ($GLOBALS['cfg']['Server']['auth_type'] != 'config') {
66 echo ($GLOBALS['cfg']['MainPageIconic'] ? '' : ' - ');
67 echo '<a href="index.php?' . $query_url . '&amp;old_usr='
68 .urlencode($PHP_AUTH_USER) . '" target="_parent"'
69 .' title="' . __('Log out') . '" >'
70 .($GLOBALS['cfg']['MainPageIconic']
71 ? '<img class="icon ic_s_loggoff" src="themes/dot.gif" alt="' . __('Log out') . '" />'
72 : __('Log out'))
73 .'</a>' . "\n";
74 } // end if ($GLOBALS['cfg']['Server']['auth_type'] != 'config'
76 $anchor = 'querywindow.php?' . PMA_generate_common_url($db, $table);
78 if ($GLOBALS['cfg']['MainPageIconic']) {
79 $query_frame_link_text =
80 '<img class="icon ic_b_selboard" src="themes/dot.gif" alt="' . __('Query window') . '" />';
81 } else {
82 echo '<br />' . "\n";
83 $query_frame_link_text = __('Query window');
85 echo '<a href="' . $anchor . '&amp;no_js=true"'
86 .' title="' . __('Query window') . '"';
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 echo ' <a href="Documentation.html" target="documentation"'
92 .' title="' . __('phpMyAdmin documentation') . '" >';
94 if ($GLOBALS['cfg']['MainPageIconic']) {
95 echo '<img class="icon ic_b_docs" src="themes/dot.gif"'
96 .' alt="' . __('phpMyAdmin documentation') . '" />';
98 echo '</a>';
99 echo ' ' . PMA_showMySQLDocu('', '', true) . "\n";
101 $params = array('uniqid' => uniqid());
102 if (!empty($GLOBALS['db'])) {
103 $params['db'] = $GLOBALS['db'];
105 echo '<a href="navigation.php?' . PMA_generate_common_url($params) . '" target="frame_navigation">';
106 if ($GLOBALS['cfg']['MainPageIconic']) {
107 echo '<img class="icon ic_s_reload" src="themes/dot.gif"'
108 . ' title="' . __('Reload navigation frame') . '"'
109 . ' alt="' . __('Reload navigation frame') . '" />';
110 } else {
111 echo '<br />' . __('Reload navigation frame');
113 echo '</a>';
115 echo '</div>' . "\n";
118 * Displays the MySQL servers choice form
120 if ($GLOBALS['cfg']['LeftDisplayServers'] && (count($GLOBALS['cfg']['Servers']) > 1 || $server == 0 && count($GLOBALS['cfg']['Servers']) == 1)) {
121 echo '<div id="serverinfo">';
122 include './libraries/select_server.lib.php';
123 PMA_select_server(true, true);
124 echo '</div><br />';
125 } // end if LeftDisplayServers