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/common.inc.php';
23 require_once './libraries/ob.lib.php';
26 // garvin: For re-usability, moved http-headers and stylesheets
27 // to a seperate file. It can now be included by header.inc.php,
30 require_once './libraries/header_http.inc.php';
31 require_once './libraries/header_meta_style.inc.php';
32 require_once './libraries/header_scripts.inc.php';
34 <meta name
="OBGZip" content
="<?php echo ($GLOBALS['cfg']['OBGzip'] ? 'true' : 'false'); ?>" />
35 <?php
/* remove vertical scroll bar bug in ie */ ?
>
37 <style type
="text/css">
50 // Include possible custom headers
51 if (file_exists('./config.header.inc.php')) {
52 require './config.header.inc.php';
56 // message of "Cookies required" displayed for auth_type http or config
57 // note: here, the decoration won't work because without cookies,
58 // our standard CSS is not operational
59 if (empty($_COOKIE)) {
60 PMA_Message
::notice('strCookiesRequired')->display();
63 if (!defined('PMA_DISPLAY_HEADING')) {
64 define('PMA_DISPLAY_HEADING', 1);
68 * Display heading if needed. Design can be set in css file.
71 if (PMA_DISPLAY_HEADING
&& $GLOBALS['server'] > 0) {
72 $server_info = (!empty($GLOBALS['cfg']['Server']['verbose'])
73 ?
$GLOBALS['cfg']['Server']['verbose']
74 : $GLOBALS['cfg']['Server']['host'] . (empty($GLOBALS['cfg']['Server']['port'])
76 : ':' . $GLOBALS['cfg']['Server']['port']
79 $item = '<a href="%1$s?%2$s" class="item">';
80 if ($GLOBALS['cfg']['NavigationBarIconic']) {
81 $separator = ' <span class="separator"><img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'item_ltr.png" width="5" height="9" alt="-" /></span>' . "\n";
82 $item .= ' <img class="icon" src="' . $GLOBALS['pmaThemeImage'] . '%5$s" width="16" height="16" alt="" /> ' . "\n";
84 $separator = ' <span class="separator"> - </span>' . "\n";
87 if ($GLOBALS['cfg']['NavigationBarIconic'] !== true) {
90 $item .= '%3$s</a>' . "\n";
92 echo '<div id="serverinfo">' . "\n";
94 $GLOBALS['cfg']['DefaultTabServer'],
95 PMA_generate_common_url(),
96 htmlspecialchars($server_info),
97 $GLOBALS['strServer'],
100 if (strlen($GLOBALS['db'])) {
104 $GLOBALS['cfg']['DefaultTabDatabase'],
105 PMA_generate_common_url($GLOBALS['db']),
106 htmlspecialchars($GLOBALS['db']),
107 $GLOBALS['strDatabase'],
110 if (strlen($GLOBALS['table'])) {
111 require_once './libraries/tbl_info.inc.php';
115 $GLOBALS['cfg']['DefaultTabTable'],
116 PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']),
117 str_replace(' ', ' ', htmlspecialchars($GLOBALS['table'])),
118 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ?
$GLOBALS['strView'] : $GLOBALS['strTable']),
119 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ?
'b_views' : 's_tbl') . '.png');
122 * Displays table comment
123 * @uses $show_comment from libraries/tbl_info.inc.php
124 * @uses $GLOBALS['avoid_show_comment'] from tbl_relation.php
126 if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) {
127 if (strstr($show_comment, '; InnoDB free')) {
128 $show_comment = preg_replace('@; InnoDB free:.*?$@', '', $show_comment);
130 echo '<span class="table_comment" id="span_table_comment">'
131 .'"' . htmlspecialchars($show_comment)
132 .'"</span>' . "\n";
135 // no table selected, display database comment if present
137 * Settings for relations stuff
139 require_once './libraries/relation.lib.php';
140 $cfgRelation = PMA_getRelationsParam();
142 // Get additional information about tables for tooltip is done
143 // in libraries/db_info.inc.php only once
144 if ($cfgRelation['commwork']) {
145 $comment = PMA_getDbComment($GLOBALS['db']);
147 * Displays table comment
149 if (! empty($comment)) {
150 echo '<span class="table_comment"'
151 . ' id="span_table_comment">"'
152 . htmlspecialchars($comment)
153 . '"</span>' . "\n";
162 * Sets a variable to remember headers have been sent
164 $GLOBALS['is_header_sent'] = true;