new language: uzbek (cyrillic and latin)
[phpmyadmin/crack.git] / libraries / header.inc.php
blob1f0dc81a8c03459aba1563f7366e0d225966a8b4
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @version $Id$
6 * @package phpMyAdmin
7 */
8 if (! defined('PHPMYADMIN')) {
9 exit;
12 /**
15 require_once './libraries/common.inc.php';
17 if (empty($GLOBALS['is_header_sent'])) {
19 /**
20 * Gets a core script and starts output buffering work
22 require_once './libraries/common.inc.php';
23 require_once './libraries/ob.lib.php';
24 PMA_outBufferPre();
26 // garvin: For re-usability, moved http-headers and stylesheets
27 // to a seperate file. It can now be included by header.inc.php,
28 // querywindow.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 */ ?>
36 <!--[if IE 6]>
37 <style type="text/css">
38 /* <![CDATA[ */
39 html {
40 overflow-y: scroll;
42 /* ]]> */
43 </style>
44 <![endif]-->
45 </head>
47 <body>
48 <?php
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);
67 /**
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'])
75 ? ''
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";
83 } else {
84 $separator = ' <span class="separator"> - </span>' . "\n";
87 if ($GLOBALS['cfg']['NavigationBarIconic'] !== true) {
88 $item .= '%4$s: ';
90 $item .= '%3$s</a>' . "\n";
92 echo '<div id="serverinfo">' . "\n";
93 printf($item,
94 $GLOBALS['cfg']['DefaultTabServer'],
95 PMA_generate_common_url(),
96 htmlspecialchars($server_info),
97 $GLOBALS['strServer'],
98 's_host.png');
100 if (strlen($GLOBALS['db'])) {
102 echo $separator;
103 printf($item,
104 $GLOBALS['cfg']['DefaultTabDatabase'],
105 PMA_generate_common_url($GLOBALS['db']),
106 htmlspecialchars($GLOBALS['db']),
107 $GLOBALS['strDatabase'],
108 's_db.png');
110 if (strlen($GLOBALS['table'])) {
111 require_once './libraries/tbl_info.inc.php';
113 echo $separator;
114 printf($item,
115 $GLOBALS['cfg']['DefaultTabTable'],
116 PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']),
117 str_replace(' ', '&nbsp;', 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 .'&quot;' . htmlspecialchars($show_comment)
132 .'&quot;</span>' . "\n";
133 } // end if
134 } else {
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">&quot;'
152 . htmlspecialchars($comment)
153 . '&quot;</span>' . "\n";
154 } // end if
158 echo '</div>';
162 * Sets a variable to remember headers have been sent
164 $GLOBALS['is_header_sent'] = true;