2 /* vim: set expandtab sw=4 ts=4 sts=4: */
7 if (! defined('PHPMYADMIN')) {
14 require_once './libraries/common.inc.php';
16 if (empty($GLOBALS['is_header_sent'])) {
19 * Gets a core script and starts output buffering work
21 require_once './libraries/ob.lib.php';
24 // For re-usability, moved http-headers and stylesheets
25 // to a seperate file. It can now be included by header.inc.php,
28 require_once './libraries/header_http.inc.php';
29 require_once './libraries/header_meta_style.inc.php';
30 require_once './libraries/header_scripts.inc.php';
32 <meta name
="OBGZip" content
="<?php echo ($GLOBALS['cfg']['OBGzip'] ? 'true' : 'false'); ?>" />
33 <?php
/* remove vertical scroll bar bug in ie */ ?
>
35 <style type
="text/css">
48 // Include possible custom headers
49 if (file_exists(CUSTOM_HEADER_FILE
)) {
50 require CUSTOM_HEADER_FILE
;
54 // message of "Cookies required" displayed for auth_type http or config
55 // note: here, the decoration won't work because without cookies,
56 // our standard CSS is not operational
57 if (empty($_COOKIE)) {
58 PMA_Message
::notice(__('Cookies must be enabled past this point.'))->display();
61 if (!defined('PMA_DISPLAY_HEADING')) {
62 define('PMA_DISPLAY_HEADING', 1);
66 * Display heading if needed. Design can be set in css file.
69 if (PMA_DISPLAY_HEADING
&& $GLOBALS['server'] > 0) {
70 $server_info = (!empty($GLOBALS['cfg']['Server']['verbose'])
71 ?
$GLOBALS['cfg']['Server']['verbose']
72 : $GLOBALS['cfg']['Server']['host'] . (empty($GLOBALS['cfg']['Server']['port'])
74 : ':' . $GLOBALS['cfg']['Server']['port']
77 $item = '<a href="%1$s?%2$s" class="item">';
78 if ($GLOBALS['cfg']['NavigationBarIconic']) {
79 $separator = ' <span class="separator"><img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'item_ltr.png" width="5" height="9" alt="-" /></span>' . "\n";
80 $item .= ' <img class="icon" src="' . $GLOBALS['pmaThemeImage'] . '%5$s" width="16" height="16" alt="" /> ' . "\n";
82 $separator = ' <span class="separator"> - </span>' . "\n";
85 if ($GLOBALS['cfg']['NavigationBarIconic'] !== true) {
88 $item .= '%3$s</a>' . "\n";
90 echo '<div id="serverinfo">' . "\n";
92 $GLOBALS['cfg']['DefaultTabServer'],
93 PMA_generate_common_url(),
94 htmlspecialchars($server_info),
98 if (strlen($GLOBALS['db'])) {
102 $GLOBALS['cfg']['DefaultTabDatabase'],
103 PMA_generate_common_url($GLOBALS['db']),
104 htmlspecialchars($GLOBALS['db']),
108 if (isset($GLOBALS['action']) && $GLOBALS['action'] == 'tbl_create.php') {
109 /* We're creating a new table */
113 PMA_generate_common_url($GLOBALS['db']),
117 } elseif (strlen($GLOBALS['table'])) {
118 require_once './libraries/tbl_info.inc.php';
122 $GLOBALS['cfg']['DefaultTabTable'],
123 PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']),
124 str_replace(' ', ' ', htmlspecialchars($GLOBALS['table'])),
125 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ?
__('View') : __('Table')),
126 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ?
'b_views' : 's_tbl') . '.png');
129 * Displays table comment
130 * @uses $show_comment from libraries/tbl_info.inc.php
131 * @uses $GLOBALS['avoid_show_comment'] from tbl_relation.php
133 if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) {
134 if (strstr($show_comment, '; InnoDB free')) {
135 $show_comment = preg_replace('@; InnoDB free:.*?$@', '', $show_comment);
137 echo '<span class="table_comment" id="span_table_comment">'
138 .'"' . htmlspecialchars($show_comment)
139 .'"</span>' . "\n";
142 // no table selected, display database comment if present
144 * Settings for relations stuff
146 $cfgRelation = PMA_getRelationsParam();
148 // Get additional information about tables for tooltip is done
149 // in libraries/db_info.inc.php only once
150 if ($cfgRelation['commwork']) {
151 $comment = PMA_getDbComment($GLOBALS['db']);
153 * Displays table comment
155 if (! empty($comment)) {
156 echo '<span class="table_comment"'
157 . ' id="span_table_comment">"'
158 . htmlspecialchars($comment)
159 . '"</span>' . "\n";
168 * Sets a variable to remember headers have been sent
170 $GLOBALS['is_header_sent'] = true;