2 /* vim: set expandtab sw=4 ts=4 sts=4: */
8 if (! defined('PHPMYADMIN')) {
15 require_once './libraries/common.inc.php';
17 if (empty($GLOBALS['is_header_sent'])) {
20 * Gets a core script and starts output buffering work
22 require_once './libraries/ob.lib.php';
25 // garvin: For re-usability, moved http-headers and stylesheets
26 // to a seperate file. It can now be included by header.inc.php,
29 require_once './libraries/header_http.inc.php';
30 require_once './libraries/header_meta_style.inc.php';
31 require_once './libraries/header_scripts.inc.php';
33 <meta name
="OBGZip" content
="<?php echo ($GLOBALS['cfg']['OBGzip'] ? 'true' : 'false'); ?>" />
34 <?php
/* remove vertical scroll bar bug in ie */ ?
>
36 <style type
="text/css">
49 // Include possible custom headers
50 if (file_exists('./config.header.inc.php')) {
51 require './config.header.inc.php';
55 // message of "Cookies required" displayed for auth_type http or config
56 // note: here, the decoration won't work because without cookies,
57 // our standard CSS is not operational
58 if (empty($_COOKIE)) {
59 PMA_Message
::notice('strCookiesRequired')->display();
62 if (!defined('PMA_DISPLAY_HEADING')) {
63 define('PMA_DISPLAY_HEADING', 1);
67 * Display heading if needed. Design can be set in css file.
70 if (PMA_DISPLAY_HEADING
&& $GLOBALS['server'] > 0) {
71 $server_info = (!empty($GLOBALS['cfg']['Server']['verbose'])
72 ?
$GLOBALS['cfg']['Server']['verbose']
73 : $GLOBALS['cfg']['Server']['host'] . (empty($GLOBALS['cfg']['Server']['port'])
75 : ':' . $GLOBALS['cfg']['Server']['port']
78 $item = '<a href="%1$s?%2$s" class="item">';
79 if ($GLOBALS['cfg']['NavigationBarIconic']) {
80 $separator = ' <span class="separator"><img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'item_ltr.png" width="5" height="9" alt="-" /></span>' . "\n";
81 $item .= ' <img class="icon" src="' . $GLOBALS['pmaThemeImage'] . '%5$s" width="16" height="16" alt="" /> ' . "\n";
83 $separator = ' <span class="separator"> - </span>' . "\n";
86 if ($GLOBALS['cfg']['NavigationBarIconic'] !== true) {
89 $item .= '%3$s</a>' . "\n";
91 echo '<div id="serverinfo">' . "\n";
93 $GLOBALS['cfg']['DefaultTabServer'],
94 PMA_generate_common_url(),
95 htmlspecialchars($server_info),
96 $GLOBALS['strServer'],
99 if (strlen($GLOBALS['db'])) {
103 $GLOBALS['cfg']['DefaultTabDatabase'],
104 PMA_generate_common_url($GLOBALS['db']),
105 htmlspecialchars($GLOBALS['db']),
106 $GLOBALS['strDatabase'],
109 if (strlen($GLOBALS['table'])) {
110 require_once './libraries/tbl_info.inc.php';
114 $GLOBALS['cfg']['DefaultTabTable'],
115 PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']),
116 str_replace(' ', ' ', htmlspecialchars($GLOBALS['table'])),
117 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ?
$GLOBALS['strView'] : $GLOBALS['strTable']),
118 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ?
'b_views' : 's_tbl') . '.png');
121 * Displays table comment
122 * @uses $show_comment from libraries/tbl_info.inc.php
123 * @uses $GLOBALS['avoid_show_comment'] from tbl_relation.php
125 if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) {
126 if (strstr($show_comment, '; InnoDB free')) {
127 $show_comment = preg_replace('@; InnoDB free:.*?$@', '', $show_comment);
129 echo '<span class="table_comment" id="span_table_comment">'
130 .'"' . htmlspecialchars($show_comment)
131 .'"</span>' . "\n";
134 // no table selected, display database comment if present
136 * Settings for relations stuff
138 require_once './libraries/relation.lib.php';
139 $cfgRelation = PMA_getRelationsParam();
141 // Get additional information about tables for tooltip is done
142 // in libraries/db_info.inc.php only once
143 if ($cfgRelation['commwork']) {
144 $comment = PMA_getDbComment($GLOBALS['db']);
146 * Displays table comment
148 if (! empty($comment)) {
149 echo '<span class="table_comment"'
150 . ' id="span_table_comment">"'
151 . htmlspecialchars($comment)
152 . '"</span>' . "\n";
161 * Sets a variable to remember headers have been sent
163 $GLOBALS['is_header_sent'] = true;