00001 <?php
00002
00003
00004
00005 if (empty($GLOBALS['is_header_sent'])) {
00006
00010 require_once('./libraries/common.lib.php');
00011 require_once('./libraries/ob.lib.php');
00012 if ($GLOBALS['cfg']['OBGzip']) {
00013 $GLOBALS['ob_mode'] = PMA_outBufferModeGet();
00014 if ($GLOBALS['ob_mode']) {
00015 PMA_outBufferPre($GLOBALS['ob_mode']);
00016 }
00017 }
00018
00019
00020
00021
00022
00023 require_once('./libraries/header_http.inc.php');
00024 require_once('./libraries/header_meta_style.inc.php');
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 $title = '';
00043 if ($cfg['ShowHttpHostTitle']) {
00044 $title .= (empty($GLOBALS['cfg']['SetHttpHostTitle']) && isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $GLOBALS['cfg']['SetHttpHostTitle']) . ' / ';
00045 }
00046 if (!empty($GLOBALS['cfg']['Server']) && isset($GLOBALS['cfg']['Server']['host'])) {
00047 $title.=str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['host']);
00048 }
00049 if (isset($GLOBALS['db'])) {
00050 $title .= ' / ' . str_replace('\'', '\\\'', $GLOBALS['db']);
00051 }
00052 if (isset($GLOBALS['table'])) {
00053 $title .= (empty($title) ? '' : ' ') . ' / ' . str_replace('\'', '\\\'', $GLOBALS['table']);
00054 }
00055 $title .= ' | phpMyAdmin ' . PMA_VERSION;
00056 ?>
00057 <script type="text/javascript" language="javascript">
00058 <!--
00059
00060 if (typeof(parent.document) != 'undefined' && typeof(parent.document) != 'unknown'
00061 && typeof(parent.document.title) == 'string') {
00062 parent.document.title = '<?php echo PMA_sanitize($title); ?>';
00063 }
00064
00065 document.write('<style type="text/css">');
00066 document.write('img.lightbulb { cursor: pointer; }');
00067 document.write('<\/style>');
00068
00069 <?php
00070
00071 if (isset($js_to_run) && $js_to_run == 'functions.js') {
00072 echo "\n";
00073 ?>
00074
00075 var errorMsg0 = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strFormEmpty']); ?>';
00076 var errorMsg1 = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strNotNumber']); ?>';
00077 var noDropDbMsg = '<?php echo((!$GLOBALS['cfg']['AllowUserDropDatabase']) ? str_replace('\'', '\\\'', $GLOBALS['strNoDropDatabases']) : ''); ?>';
00078 var confirmMsg = '<?php echo(($GLOBALS['cfg']['Confirm']) ? str_replace('\'', '\\\'', $GLOBALS['strDoYouReally']) : ''); ?>';
00079 var confirmMsgDropDB = '<?php echo(($GLOBALS['cfg']['Confirm']) ? str_replace('\'', '\\\'', $GLOBALS['strDropDatabaseStrongWarning']) : ''); ?>';
00080
00081 </script>
00082 <script src="libraries/functions.js" type="text/javascript" language="javascript"></script>
00083 <?php
00084 } else if (isset($js_to_run) && $js_to_run == 'user_password.js') {
00085 echo "\n";
00086 ?>
00087
00088 var jsHostEmpty = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strHostEmpty']); ?>';
00089 var jsUserEmpty = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strUserEmpty']); ?>';
00090 var jsPasswordEmpty = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strPasswordEmpty']); ?>';
00091 var jsPasswordNotSame = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strPasswordNotSame']); ?>';
00092
00093 </script>
00094 <script src="libraries/user_password.js" type="text/javascript" language="javascript"></script>
00095 <?php
00096 } else if (isset($js_to_run) && $js_to_run == 'server_privileges.js') {
00097 echo "\n";
00098 ?>
00099
00100 var jsHostEmpty = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strHostEmpty']); ?>';
00101 var jsUserEmpty = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strUserEmpty']); ?>';
00102 var jsPasswordEmpty = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strPasswordEmpty']); ?>';
00103 var jsPasswordNotSame = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strPasswordNotSame']); ?>';
00104
00105 </script>
00106 <script src="libraries/server_privileges.js" type="text/javascript" language="javascript"></script>
00107 <?php
00108 } else if (isset($js_to_run) && $js_to_run == 'indexes.js') {
00109 echo "\n";
00110 ?>
00111
00112 var errorMsg0 = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strFormEmpty']); ?>';
00113 var errorMsg1 = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strNotNumber']); ?>';
00114
00115 </script>
00116 <script src="libraries/indexes.js" type="text/javascript" language="javascript"></script>
00117 <?php
00118 } else if (isset($js_to_run) && $js_to_run == 'tbl_change.js') {
00119 echo "\n";
00120 ?>
00121
00122 </script>
00123 <script src="libraries/tbl_change.js" type="text/javascript" language="javascript"></script>
00124 <?php
00125 } else {
00126 echo "\n";
00127 ?>
00128
00129 </script>
00130 <?php
00131 }
00132 echo "\n";
00133
00134
00135 PMA_reloadNavigation();
00136 ?>
00137 <meta name="OBGZip" content="<?php echo ($cfg['OBGzip'] ? 'true' : 'false'); ?>" />
00138 </head>
00139
00140
00141 <?php
00142 if ($GLOBALS['cfg']['RightBgImage'] != '') {
00143 $bkg_img = ' background="' . $GLOBALS['cfg']['RightBgImage'] . '"';
00144 } else {
00145 $bkg_img = '';
00146 }
00147 ?>
00148 <body bgcolor="<?php echo $GLOBALS['cfg']['RightBgColor'] . '"' . $bkg_img; ?>>
00149 <div id="TooltipContainer" name="TooltipContainer" onmouseover="holdTooltip();" onmouseout="swapTooltip('default');"></div>
00150 <?php
00151 include('./config.header.inc.php');
00152
00153 if (!defined('PMA_DISPLAY_HEADING')) {
00154 define('PMA_DISPLAY_HEADING', 1);
00155 }
00156
00161 if (PMA_DISPLAY_HEADING) {
00162 $server_info = (!empty($GLOBALS['cfg']['Server']['verbose'])
00163 ? $GLOBALS['cfg']['Server']['verbose']
00164 : $GLOBALS['cfg']['Server']['host'] . (empty($GLOBALS['cfg']['Server']['port'])
00165 ? ''
00166 : ':' . $GLOBALS['cfg']['Server']['port']
00167 )
00168 );
00169 $item = '<a href="%1$s?%2$s" class="item">';
00170 if ( $GLOBALS['cfg']['NavigationBarIconic'] ) {
00171 $separator = ' <span class="separator"><img src="' . $GLOBALS['pmaThemeImage'] . 'item_ltr.png" width="5" height="9" alt="-" /></span>' . "\n";
00172 $item .= ' <img src="' . $GLOBALS['pmaThemeImage'] . '%5$s" width="16" height="16" alt="" border="0" /> ' . "\n";
00173 } else {
00174 $separator = ' <span class="separator"> - </span>' . "\n";
00175 }
00176
00177 if ( $GLOBALS['cfg']['NavigationBarIconic'] !== true ) {
00178 $item .= '%4$s: ';
00179 }
00180 $item .= '%3$s</a>' . "\n";
00181
00182 echo '<div id="serverinfo">' . "\n";
00183 printf( $item,
00184 $GLOBALS['cfg']['DefaultTabServer'],
00185 PMA_generate_common_url(),
00186 htmlspecialchars($server_info),
00187 $GLOBALS['strServer'],
00188 's_host.png' );
00189
00190 if (!empty($GLOBALS['db'])) {
00191
00192 echo $separator;
00193 printf( $item,
00194 $GLOBALS['cfg']['DefaultTabDatabase'],
00195 PMA_generate_common_url($GLOBALS['db']),
00196 htmlspecialchars($GLOBALS['db']),
00197 $GLOBALS['strDatabase'],
00198 's_db.png' );
00199
00200 if (!empty($GLOBALS['table'])) {
00201 require_once('./tbl_properties_table_info.php');
00202
00203 echo $separator;
00204 printf( $item,
00205 $GLOBALS['cfg']['DefaultTabTable'],
00206 PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']),
00207 htmlspecialchars($GLOBALS['table']),
00208 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? $GLOBALS['strView'] : $GLOBALS['strTable']),
00209 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? 'b_views' : 's_tbl') . '.png' );
00210
00216 if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) {
00217 if (strstr($show_comment, '; InnoDB free')) {
00218 $show_comment = preg_replace('@; InnoDB free:.*?$@' , '', $show_comment);
00219 }
00220 echo '<!-- Table comment -->' . "\n"
00221 . '<span class="table_comment" id="span_table_comment">"' . htmlspecialchars($show_comment) . '"</span>' . "\n";
00222 }
00223 }
00224 }
00225 echo '</div>';
00226
00227 }
00231 $GLOBALS['is_header_sent'] = TRUE;
00232 }
00233
00234 ?>