6 * Gets a core script and starts output buffering work
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']);
25 // Don't use cache (required for Opera)
26 $GLOBALS['now'] = gmdate('D, d M Y H:i:s') . ' GMT';
27 header('Expires: 0'); // 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']);
36 * Sends the beginning of the html page then returns to the calling script
38 // Gets the font sizes to use
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';
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']; ?>">
54 <title
>phpMyAdmin
</title
>
55 <meta http
-equiv
="Content-Type" content
="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
57 if (!empty($GLOBALS['cfg']['PmaAbsoluteUri'])) {
58 echo '<base href="' . $GLOBALS['cfg']['PmaAbsoluteUri'] . '" />' . "\n";
61 <style type
="text/css">
64 font
-family
: <?php
echo $right_font_family; ?
>;
65 font
-size
: <?php
echo $font_size; ?
>;
68 if ($GLOBALS['cfg']['RightBgImage'] == '') {
69 echo ' background-image: url(\'./images/vertical_line.gif\');' . "\n"
70 . ' background-repeat: repeat-y;' . "\n";
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
}
102 border
-top
: 1px solid
#999;
103 border
-right
: 1px solid
#666;
104 border
-left
: 1px solid
#999;
107 -moz
-border
-radius
: 2px
;
113 border
-bottom
: 1px solid
#666;
116 .syntax
{font
-family
: sans
-serif
; font
-size
: <?php
echo $font_smaller; ?
>;}
120 .syntax_digit_integer
{}
121 .syntax_digit_float
{}
123 .syntax_alpha
{text
-transform
: lowercase
;}
124 .syntax_alpha_columnType
{text
-transform
: uppercase
;}
125 .syntax_alpha_columnAttrib
{text
-transform
: uppercase
;}
126 .syntax_alpha_reservedWord
{text
-transform
: uppercase
; font
-weight
: bold
;}
127 .syntax_alpha_functionName
{text
-transform
: uppercase
;}
128 .syntax_alpha_identifier
{}
129 .syntax_alpha_variable
{}
131 .syntax_quote_backtick
{}
133 echo PMA_SQP_buildCssData();
140 if (isset($GLOBALS['db'])) {
141 $title .= str_replace('\'', '\\\'', $GLOBALS['db']);
143 if (isset($GLOBALS['table'])) {
144 $title .= (empty($title) ?
'' : '.') . str_replace('\'', '\\\'', $GLOBALS['table']);
146 if (!empty($GLOBALS['cfg']['Server']) && isset($GLOBALS['cfg']['Server']['host'])) {
147 $title .= (empty($title) ?
'phpMyAdmin ' : ' ')
148 . sprintf($GLOBALS['strRunning'], (empty($GLOBALS['cfg']['Server']['verbose']) ?
str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['host']) : str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['verbose'])));
150 $title .= (empty($title) ?
'' : ' - ') . 'phpMyAdmin ' . PMA_VERSION
;
152 <script type
="text/javascript" language
="javascript">
154 // Updates the title of the frameset if possible (ns4 does not allow this)
155 if (typeof(parent
.document
) != 'undefined' && typeof(parent
.document
) != 'unknown'
156 && typeof(parent
.document
.title
) == 'string') {
157 parent
.document
.title
= '<?php echo $title; ?>';
160 // Add some javascript instructions if required
161 if (isset($js_to_run) && $js_to_run == 'functions.js') {
164 // js form validation stuff
165 var errorMsg0
= '<?php echo str_replace('\'
', '\\\'
', $GLOBALS['strFormEmpty
']); ?>';
166 var errorMsg1
= '<?php echo str_replace('\'
', '\\\'
', $GLOBALS['strNotNumber
']); ?>';
167 var errorMsg2
= '<?php echo str_replace('\'
', '\\\'
', $GLOBALS['strNotValidNumber
']); ?>';
168 var noDropDbMsg
= '<?php echo((!$GLOBALS['cfg
']['AllowUserDropDatabase
']) ? str_replace('\'
', '\\\'
', $GLOBALS['strNoDropDatabases
']) : ''); ?>';
169 var confirmMsg
= '<?php echo(($GLOBALS['cfg
']['Confirm
']) ? str_replace('\'
', '\\\'
', $GLOBALS['strDoYouReally
']) : ''); ?>';
172 <script src
="libraries/functions.js" type
="text/javascript" language
="javascript"></script
>
174 } else if (isset($js_to_run) && $js_to_run == 'user_details.js') {
177 // js form validation stuff
178 var jsHostEmpty
= '<?php echo str_replace('\'
', '\\\'
', $GLOBALS['strHostEmpty
']); ?>';
179 var jsUserEmpty
= '<?php echo str_replace('\'
', '\\\'
', $GLOBALS['strUserEmpty
']); ?>';
180 var jsPasswordEmpty
= '<?php echo str_replace('\'
', '\\\'
', $GLOBALS['strPasswordEmpty
']); ?>';
181 var jsPasswordNotSame
= '<?php echo str_replace('\'
', '\\\'
', $GLOBALS['strPasswordNotSame
']); ?>';
184 <script src
="libraries/user_details.js" type
="text/javascript" language
="javascript"></script
>
186 } else if (isset($js_to_run) && $js_to_run == 'indexes.js') {
189 // js index validation stuff
190 var errorMsg0
= '<?php echo str_replace('\'
', '\\\'
', $GLOBALS['strFormEmpty
']); ?>';
191 var errorMsg1
= '<?php echo str_replace('\'
', '\\\'
', $GLOBALS['strNotNumber
']); ?>';
192 var errorMsg2
= '<?php echo str_replace('\'
', '\\\'
', $GLOBALS['strNotValidNumber
']); ?>';
195 <script src
="libraries/indexes.js" type
="text/javascript" language
="javascript"></script
>
197 } else if (isset($js_to_run) && $js_to_run == 'tbl_change.js') {
202 <script src
="libraries/tbl_change.js" type
="text/javascript" language
="javascript"></script
>
217 if ($GLOBALS['cfg']['RightBgImage'] != '') {
218 $bkg_img = ' background="' . $GLOBALS['cfg']['RightBgImage'] . '"';
223 <body bgcolor
="<?php echo $GLOBALS['cfg']['RightBgColor'] . '"' . $bkg_img; ?>>
225 if (isset($GLOBALS['db
'])) {
226 $header_url_qry = '?lang
=' . urlencode($GLOBALS['lang
'])
227 . '&
;convcharset
=' . $GLOBALS['convcharset
']
228 . '&
;server
=' . $GLOBALS['server
'];
230 echo ' ' . $GLOBALS['strDatabase
'] . ' <i
><a
class="h1" href
="db_details.php3' . $header_url_qry . '&db=' . urlencode($GLOBALS['db']) . '">' . htmlspecialchars($GLOBALS['db
']) . '</a
></i
>' . "\n";
231 if (!empty($GLOBALS['table
'])) {
232 echo ' - ' . $GLOBALS['strTable
'] . ' <i
><a
class="h1" href
="tbl_properties.php3' . $header_url_qry . '&db=' . urlencode($GLOBALS['db']) . '&table=' . urlencode($GLOBALS['table']) . '">' . htmlspecialchars($GLOBALS['table
']) . '</a
></i
>' . "\n";
234 echo ' ' . sprintf($GLOBALS['strRunning
'], ' <i
>' . (($GLOBALS['cfg
']['Server
']['verbose
']) ? $GLOBALS['cfg
']['Server
']['verbose
'] : $GLOBALS['cfg
']['Server
']['host
']) . '</i
>') . "\n";
241 * Sets a variable to remember headers have been sent
243 $GLOBALS['is_header_sent
'] = TRUE;