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 // 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(CUSTOM_HEADER_FILE
)) {
51 require CUSTOM_HEADER_FILE
;
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(__('Cookies must be enabled past this point.'))->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),
99 if (strlen($GLOBALS['db'])) {
103 $GLOBALS['cfg']['DefaultTabDatabase'],
104 PMA_generate_common_url($GLOBALS['db']),
105 htmlspecialchars($GLOBALS['db']),
109 if (isset($GLOBALS['action']) && $GLOBALS['action'] == 'tbl_create.php') {
110 /* We're creating a new table */
114 PMA_generate_common_url($GLOBALS['db']),
118 } elseif (strlen($GLOBALS['table'])) {
119 require_once './libraries/tbl_info.inc.php';
123 $GLOBALS['cfg']['DefaultTabTable'],
124 PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']),
125 str_replace(' ', ' ', htmlspecialchars($GLOBALS['table'])),
126 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ?
__('View') : __('Table')),
127 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ?
'b_views' : 's_tbl') . '.png');
130 * Displays table comment
131 * @uses $show_comment from libraries/tbl_info.inc.php
132 * @uses $GLOBALS['avoid_show_comment'] from tbl_relation.php
134 if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) {
135 if (strstr($show_comment, '; InnoDB free')) {
136 $show_comment = preg_replace('@; InnoDB free:.*?$@', '', $show_comment);
138 echo '<span class="table_comment" id="span_table_comment">'
139 .'"' . htmlspecialchars($show_comment)
140 .'"</span>' . "\n";
143 // no table selected, display database comment if present
145 * Settings for relations stuff
147 require_once './libraries/relation.lib.php';
148 $cfgRelation = PMA_getRelationsParam();
150 // Get additional information about tables for tooltip is done
151 // in libraries/db_info.inc.php only once
152 if ($cfgRelation['commwork']) {
153 $comment = PMA_getDbComment($GLOBALS['db']);
155 * Displays table comment
157 if (! empty($comment)) {
158 echo '<span class="table_comment"'
159 . ' id="span_table_comment">"'
160 . htmlspecialchars($comment)
161 . '"</span>' . "\n";
170 * Sets a variable to remember headers have been sent
172 $GLOBALS['is_header_sent'] = true;