japanese
[phpmyadmin/crack.git] / header.inc.php3
blob4c51e39d85b594a7638ae9625ca82e43603dca4c
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
5 /**
6 * Gets a core script and starts output buffering work
7 */
8 if (!defined('PMA_COMMON_LIB_INCLUDED')) {
9 include('./libraries/common.lib.php3');
11 if (!defined('PMA_OB_LIB_INCLUDED')) {
12 include('./libraries/ob.lib.php3');
14 if ($GLOBALS['cfg']['OBGzip']) {
15 $GLOBALS['ob_mode'] = PMA_outBufferModeGet();
16 if ($GLOBALS['ob_mode']) {
17 PMA_outBufferPre($GLOBALS['ob_mode']);
22 /**
23 * Sends http headers
25 // Don't use cache (required for Opera)
26 $GLOBALS['now'] = gmdate('D, d M Y H:i:s') . ' GMT';
27 header('Expires: ' . $GLOBALS['now']); // rfc2616 - Section 14.21
28 header('Last-Modified: ' . $GLOBALS['now']);
29 header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
30 header('Pragma: no-cache'); // HTTP/1.0
31 // Define the charset to be used
32 header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
35 /**
36 * Sends the beginning of the html page then returns to the calling script
38 // Gets the font sizes to use
39 PMA_setFontSizes();
40 // Defines the cell alignment values depending on text direction
41 if ($GLOBALS['text_dir'] == 'ltr') {
42 $GLOBALS['cell_align_left'] = 'left';
43 $GLOBALS['cell_align_right'] = 'right';
44 } else {
45 $GLOBALS['cell_align_left'] = 'right';
46 $GLOBALS['cell_align_right'] = 'left';
49 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
50 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
51 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
53 <head>
54 <title>phpMyAdmin</title>
55 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
56 <?php
57 if (!empty($GLOBALS['cfg']['PmaAbsoluteUri'])) {
58 echo '<base href="' . $GLOBALS['cfg']['PmaAbsoluteUri'] . '" />' . "\n";
61 <style type="text/css">
62 <!--
63 body {
64 font-family: <?php echo $right_font_family; ?>;
65 font-size: <?php echo $font_size; ?>;
66 color: #000000;
67 <?php
68 if ($GLOBALS['cfg']['RightBgImage'] == '') {
69 echo ' background-image: url(\'./images/vertical_line.gif\');' . "\n"
70 . ' background-repeat: repeat-y;' . "\n";
71 } else {
72 echo ' background-image: url(\'' . $GLOBALS['cfg']['RightBgImage'] . '\');' . "\n";
73 } // end if... else...
75 background-color: <?php echo $GLOBALS['cfg']['RightBgColor'] . "\n"; ?>
77 pre, tt {font-size: <?php echo $font_size; ?>}
78 th {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold; color: #000000; background-color: <?php echo $GLOBALS['cfg']['ThBgcolor']; ?>}
79 td {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>}
80 form {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>}
81 input {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>}
82 input.textfield {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #FFFFFF}
83 select {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #FFFFFF}
84 textarea {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #FFFFFF}
85 h1 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold}
86 a:link {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; text-decoration: none; color: #0000FF}
87 a:visited {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; text-decoration: none; color: #0000FF}
88 a:hover {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; text-decoration: underline; color: #FF0000}
89 a.nav:link {font-family: <?php echo $right_font_family; ?>; color: #000000}
90 a.nav:visited {font-family: <?php echo $right_font_family; ?>; color: #000000}
91 a.nav:hover {font-family: <?php echo $right_font_family; ?>; color: #FF0000}
92 a.h1:link {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold; color: #000000}
93 a.h1:visited {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold; color: #000000}
94 a.h1:hover {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold; color: #FF0000}
95 a.drop:link {font-family: <?php echo $right_font_family; ?>; color: #ff0000}
96 a.drop:visited {font-family: <?php echo $right_font_family; ?>; color: #ff0000}
97 a.drop:hover {font-family: <?php echo $right_font_family; ?>; color: #ffffff; background-color:#ff0000; text-decoration: none}
98 .nav {font-family: <?php echo $right_font_family; ?>; color: #000000}
99 .warning {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold; color: #FF0000}
100 td.topline {font-size: 1px}
101 td.tab {
102 border-top: 1px solid #999;
103 border-right: 1px solid #666;
104 border-left: 1px solid #999;
105 border-bottom: none;
106 border-radius: 2px;
107 -moz-border-radius: 2px;
109 table.tabs {
110 border-top: none;
111 border-right: none;
112 border-left: none;
113 border-bottom: 1px solid #666;
116 .print{font-family:arial;font-size:8pt;}
118 .syntax {font-family: sans-serif; font-size: <?php echo $font_smaller; ?>;}
119 .syntax_comment {}
120 .syntax_digit {}
121 .syntax_digit_hex {}
122 .syntax_digit_integer {}
123 .syntax_digit_float {}
124 .syntax_punct {}
125 .syntax_alpha {text-transform: lowercase;}
126 .syntax_alpha_columnType {text-transform: uppercase;}
127 .syntax_alpha_columnAttrib {text-transform: uppercase;}
128 .syntax_alpha_reservedWord {text-transform: uppercase; font-weight: bold;}
129 .syntax_alpha_functionName {text-transform: uppercase;}
130 .syntax_alpha_identifier {}
131 .syntax_alpha_variable {}
132 .syntax_quote {}
133 .syntax_quote_backtick {}
134 <?php
135 echo PMA_SQP_buildCssData();
137 //-->
138 </style>
140 <?php
141 $title = '';
142 if (isset($GLOBALS['db'])) {
143 $title .= str_replace('\'', '\\\'', $GLOBALS['db']);
145 if (isset($GLOBALS['table'])) {
146 $title .= (empty($title) ? '' : '.') . str_replace('\'', '\\\'', $GLOBALS['table']);
148 if (!empty($GLOBALS['cfg']['Server']) && isset($GLOBALS['cfg']['Server']['host'])) {
149 $title .= (empty($title) ? 'phpMyAdmin ' : ' ')
150 . sprintf($GLOBALS['strRunning'], (empty($GLOBALS['cfg']['Server']['verbose']) ? str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['host']) : str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['verbose'])));
152 $title .= (empty($title) ? '' : ' - ') . 'phpMyAdmin ' . PMA_VERSION;
154 <script type="text/javascript" language="javascript">
155 <!--
156 // Updates the title of the frameset if possible (ns4 does not allow this)
157 if (typeof(parent.document) != 'undefined' && typeof(parent.document) != 'unknown'
158 && typeof(parent.document.title) == 'string') {
159 parent.document.title = '<?php echo $title; ?>';
161 <?php
162 // Add some javascript instructions if required
163 if (isset($js_to_run) && $js_to_run == 'functions.js') {
164 echo "\n";
166 // js form validation stuff
167 var errorMsg0 = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strFormEmpty']); ?>';
168 var errorMsg1 = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strNotNumber']); ?>';
169 var errorMsg2 = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strNotValidNumber']); ?>';
170 var noDropDbMsg = '<?php echo((!$GLOBALS['cfg']['AllowUserDropDatabase']) ? str_replace('\'', '\\\'', $GLOBALS['strNoDropDatabases']) : ''); ?>';
171 var confirmMsg = '<?php echo(($GLOBALS['cfg']['Confirm']) ? str_replace('\'', '\\\'', $GLOBALS['strDoYouReally']) : ''); ?>';
172 //-->
173 </script>
174 <script src="libraries/functions.js" type="text/javascript" language="javascript"></script>
175 <?php
176 } else if (isset($js_to_run) && $js_to_run == 'user_details.js') {
177 echo "\n";
179 // js form validation stuff
180 var jsHostEmpty = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strHostEmpty']); ?>';
181 var jsUserEmpty = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strUserEmpty']); ?>';
182 var jsPasswordEmpty = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strPasswordEmpty']); ?>';
183 var jsPasswordNotSame = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strPasswordNotSame']); ?>';
184 //-->
185 </script>
186 <script src="libraries/user_details.js" type="text/javascript" language="javascript"></script>
187 <?php
188 } else if (isset($js_to_run) && $js_to_run == 'indexes.js') {
189 echo "\n";
191 // js index validation stuff
192 var errorMsg0 = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strFormEmpty']); ?>';
193 var errorMsg1 = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strNotNumber']); ?>';
194 var errorMsg2 = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strNotValidNumber']); ?>';
195 //-->
196 </script>
197 <script src="libraries/indexes.js" type="text/javascript" language="javascript"></script>
198 <?php
199 } else if (isset($js_to_run) && $js_to_run == 'tbl_change.js') {
200 echo "\n";
202 //-->
203 </script>
204 <script src="libraries/tbl_change.js" type="text/javascript" language="javascript"></script>
205 <?php
206 } else {
207 echo "\n";
209 //-->
210 </script>
211 <?php
213 echo "\n";
215 </head>
218 <?php
219 if ($GLOBALS['cfg']['RightBgImage'] != '') {
220 $bkg_img = ' background="' . $GLOBALS['cfg']['RightBgImage'] . '"';
221 } else {
222 $bkg_img = '';
225 <body bgcolor="<?php echo $GLOBALS['cfg']['RightBgColor'] . '"' . $bkg_img; ?>>
226 <?php
227 if (isset($GLOBALS['db'])) {
228 $header_url_qry = '?lang=' . urlencode($GLOBALS['lang'])
229 . '&amp;convcharset=' . $GLOBALS['convcharset']
230 . '&amp;server=' . $GLOBALS['server'];
231 echo '<h1>' . "\n";
232 echo ' ' . $GLOBALS['strDatabase'] . ' <i><a class="h1" href="db_details.php3' . $header_url_qry . '&amp;db=' . urlencode($GLOBALS['db']) . '">' . htmlspecialchars($GLOBALS['db']) . '</a></i>' . "\n";
233 if (!empty($GLOBALS['table'])) {
234 echo ' - ' . $GLOBALS['strTable'] . ' <i><a class="h1" href="tbl_properties.php3' . $header_url_qry . '&amp;db=' . urlencode($GLOBALS['db']) . '&amp;table=' . urlencode($GLOBALS['table']) . '">' . htmlspecialchars($GLOBALS['table']) . '</a></i>' . "\n";
236 echo ' ' . sprintf($GLOBALS['strRunning'], ' <i>' . (($GLOBALS['cfg']['Server']['verbose']) ? $GLOBALS['cfg']['Server']['verbose'] : $GLOBALS['cfg']['Server']['host']) . '</i>') . "\n";
237 echo '</h1>' . "\n";
239 echo "\n";
243 * Sets a variable to remember headers have been sent
245 $GLOBALS['is_header_sent'] = TRUE;