250 |
kaklik |
1 |
<?php |
|
|
2 |
/* $Id: left_header.inc.php,v 2.10 2006/01/14 23:17:16 cybot_tm Exp $ */ |
|
|
3 |
// vim: expandtab sw=4 ts=4 sts=4: |
|
|
4 |
|
|
|
5 |
/** |
|
|
6 |
* displays the pma logo, links and db and server selection in left frame |
|
|
7 |
* |
|
|
8 |
*/ |
|
|
9 |
|
|
|
10 |
if ( empty( $query_url ) ) { |
|
|
11 |
$db = ! isset( $db ) ? '' : $db; |
|
|
12 |
$table = ! isset( $table ) ? '' : $table; |
|
|
13 |
$query_url = PMA_generate_common_url( $db, $table ); |
|
|
14 |
} |
|
|
15 |
|
|
|
16 |
// display Logo, depending on $GLOBALS['cfg']['LeftDisplayLogo'] |
|
|
17 |
if ( $GLOBALS['cfg']['LeftDisplayLogo'] ) { |
|
|
18 |
$logo = 'phpMyAdmin'; |
|
|
19 |
if ( @file_exists( $GLOBALS['pmaThemeImage'] . 'logo_left.png' ) ) { |
|
|
20 |
$logo = '<img src="' . $GLOBALS['pmaThemeImage'] . 'logo_left.png" ' |
|
|
21 |
.'alt="' . $logo . '" id="imgpmalogo" />'; |
|
|
22 |
} elseif ( @file_exists( $GLOBALS['pmaThemeImage'] . 'pma_logo2.png' ) ) { |
|
|
23 |
$logo = '<img src="' . $GLOBALS['pmaThemeImage'] . 'pma_logo2.png" ' |
|
|
24 |
.'alt="' . $logo . '" id="imgpmalogo" />'; |
|
|
25 |
} |
|
|
26 |
|
|
|
27 |
echo '<div id="pmalogo">' . "\n" |
|
|
28 |
.'<a href="http://www.phpmyadmin.net/" target="_blank">' |
|
|
29 |
.$logo . '</a>' . "\n" |
|
|
30 |
.'</div>' . "\n"; |
|
|
31 |
} // end of display logo |
|
|
32 |
?> |
|
|
33 |
<div id="leftframelinks"> |
|
|
34 |
<?php |
|
|
35 |
echo '<a href="main.php?' . $query_url . '"' |
|
|
36 |
.' title="' . $strHome . '">' |
|
|
37 |
.( $GLOBALS['cfg']['MainPageIconic'] |
|
|
38 |
? '<img class="icon" src="' . $pmaThemeImage . 'b_home.png" width="16" ' |
|
|
39 |
.' height="16" alt="' . $strHome . '" />' |
|
|
40 |
: $strHome ) |
|
|
41 |
.'</a>' . "\n"; |
|
|
42 |
// if we have chosen server |
|
|
43 |
if ( $server != 0 ) { |
|
|
44 |
// Logout for advanced authentication |
|
|
45 |
if ( $GLOBALS['cfg']['Server']['auth_type'] != 'config' ) { |
|
|
46 |
echo ($GLOBALS['cfg']['MainPageIconic'] ? '' : ' - '); |
|
|
47 |
echo '<a href="index.php?' . $query_url . '&old_usr=' |
|
|
48 |
.urlencode($PHP_AUTH_USER) . '" target="_parent"' |
|
|
49 |
.' title="' . $strLogout . '" >' |
|
|
50 |
.( $GLOBALS['cfg']['MainPageIconic'] |
|
|
51 |
? '<img class="icon" src="' . $pmaThemeImage . 's_loggoff.png" ' |
|
|
52 |
.' width="16" height="16" alt="' . $strLogout . '" />' |
|
|
53 |
: $strLogout ) |
|
|
54 |
.'</a>' . "\n"; |
|
|
55 |
} // end if ($GLOBALS['cfg']['Server']['auth_type'] != 'config' |
|
|
56 |
|
|
|
57 |
$anchor = 'querywindow.php?' . PMA_generate_common_url( $db, $table ); |
|
|
58 |
|
|
|
59 |
if ($GLOBALS['cfg']['MainPageIconic']) { |
|
|
60 |
$query_frame_link_text = |
|
|
61 |
'<img class="icon" src="' . $pmaThemeImage . 'b_selboard.png"' |
|
|
62 |
.' width="16" height="16" alt="' . $strQueryFrame . '" />'; |
|
|
63 |
} else { |
|
|
64 |
echo '<br />' . "\n"; |
|
|
65 |
$query_frame_link_text = $strQueryFrame; |
|
|
66 |
} |
|
|
67 |
echo '<a href="' . $anchor . '&no_js=true"' |
|
|
68 |
.' title="' . $strQueryFrame . '"'; |
|
|
69 |
echo ' onclick="javascript:window.parent.open_querywindow();' |
|
|
70 |
.' return false;"'; |
|
|
71 |
echo '>' . $query_frame_link_text . '</a>' . "\n"; |
|
|
72 |
} // end if ($server != 0) |
|
|
73 |
|
|
|
74 |
if ($GLOBALS['cfg']['MainPageIconic']) { |
|
|
75 |
echo ' <a href="Documentation.html" target="documentation"' |
|
|
76 |
.' title="' . $strPmaDocumentation . '" >' |
|
|
77 |
.'<img class="icon" src="' . $pmaThemeImage . 'b_docs.png" width="16" height="16"' |
|
|
78 |
.' alt="' . $strPmaDocumentation . '" /></a>' . "\n"; |
|
|
79 |
echo ' ' . PMA_showMySQLDocu('', '', TRUE) . "\n"; |
|
|
80 |
} |
|
|
81 |
echo '</div>' . "\n"; |
|
|
82 |
|
|
|
83 |
/** |
|
|
84 |
* Displays the MySQL servers choice form |
|
|
85 |
*/ |
|
|
86 |
if ($GLOBALS['cfg']['LeftDisplayServers'] && (count($GLOBALS['cfg']['Servers']) > 1 || $server == 0 && count($GLOBALS['cfg']['Servers']) == 1)) { |
|
|
87 |
include('./libraries/select_server.lib.php'); |
|
|
88 |
PMA_select_server(TRUE, TRUE); |
|
|
89 |
} // end if LeftDisplayServers |
|
|
90 |
?> |