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 the table is being dropped, $_REQUEST['purge'] is set
110 // (it always contains "1")
111 // so do not display the table name in upper div
112 if (strlen($GLOBALS['table']) && ! (isset($_REQUEST['purge']))) {
113 require_once './libraries/tbl_info.inc.php';
117 $GLOBALS['cfg']['DefaultTabTable'],
118 PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']),
119 str_replace(' ', ' ', htmlspecialchars($GLOBALS['table'])),
120 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ?
$GLOBALS['strView'] : $GLOBALS['strTable']),
121 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ?
'b_views' : 's_tbl') . '.png');
124 * Displays table comment
125 * @uses $show_comment from libraries/tbl_info.inc.php
126 * @uses $GLOBALS['avoid_show_comment'] from tbl_relation.php
128 if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) {
129 if (strstr($show_comment, '; InnoDB free')) {
130 $show_comment = preg_replace('@; InnoDB free:.*?$@', '', $show_comment);
132 echo '<span class="table_comment" id="span_table_comment">'
133 .'"' . htmlspecialchars($show_comment)
134 .'"</span>' . "\n";
137 // no table selected, display database comment if present
139 * Settings for relations stuff
141 require_once './libraries/relation.lib.php';
142 $cfgRelation = PMA_getRelationsParam();
144 // Get additional information about tables for tooltip is done
145 // in libraries/db_info.inc.php only once
146 if ($cfgRelation['commwork']) {
147 $comment = PMA_getDbComment($GLOBALS['db']);
149 * Displays table comment
151 if (! empty($comment)) {
152 echo '<span class="table_comment"'
153 . ' id="span_table_comment">"'
154 . htmlspecialchars($comment)
155 . '"</span>' . "\n";
164 * Sets a variable to remember headers have been sent
166 $GLOBALS['is_header_sent'] = true;