3 // vim: expandtab sw=4 ts=4 sts=4:
7 * Gets core libraries and defines some variables
9 require('./libraries/grab_globals.lib.php3');
10 require('./libraries/common.lib.php3');
12 // Gets the default font sizes
16 // loic1 - 2001/25/11: use the new globals arrays defined with php 4.1+
17 if (empty($HTTP_HOST)) {
18 if (!empty($_ENV) && isset($_ENV['HTTP_HOST'])) {
19 $HTTP_HOST = $_ENV['HTTP_HOST'];
21 else if (!empty($HTTP_ENV_VARS) && isset($HTTP_ENV_VARS['HTTP_HOST'])) {
22 $HTTP_HOST = $HTTP_ENV_VARS['HTTP_HOST'];
24 else if (@getenv
('HTTP_HOST')) {
25 $HTTP_HOST = getenv('HTTP_HOST');
34 * Defines the frameset
36 // loic1: If left light mode -> urldecode the db name
37 if (isset($lightm_db)) {
38 // no longer urlencoded because of html entities in the db name
39 // $db = urldecode($lightm_db);
43 $url_query = PMA_generate_common_url(isset($db) ?
$db : '');
45 header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
47 require('./libraries/relation.lib.php3');
48 $cfgRelation = PMA_getRelationsParam();
50 if ($cfg['QueryHistoryDB'] && $cfgRelation['historywork']) {
51 PMA_purgeHistory($cfg['Server']['user']);
54 $phpmain_hash = md5($cfg['PmaAbsoluteUri']);
55 $phpmain_hash_js = time();
57 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
58 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
59 <html xmlns
="http://www.w3.org/1999/xhtml" xml
:lang
="<?php echo $available_languages[$lang][2]; ?>" lang
="<?php echo $available_languages[$lang][2]; ?>" dir
="<?php echo $text_dir; ?>">
61 <title
>phpMyAdmin
<?php
echo PMA_VERSION
; ?
> - <?php
echo $HTTP_HOST; ?
></title
>
62 <meta http
-equiv
="Content-Type" content
="text/html; charset=<?php echo $charset; ?>" />
63 <link rel
="stylesheet" type
="text/css" href
="./css/phpmyadmin.css.php3?lang=<?php echo $lang; ?>&js_frame=right" />
67 if ($cfg['QueryFrame']) {
69 if ($cfg['QueryFrameJS']) {
70 echo '<script type="text/javascript">' . "\n";
72 echo ' document.writeln(\'<frameset cols="' . $cfg['LeftWidth'] . ',*" rows="*" border="1" frameborder="1" framespacing="0">\');' . "\n";
73 echo ' document.writeln(\' <frameset rows="*, 50" framespacing="0" frameborder="0" border="0">\');' . "\n";
74 echo ' document.writeln(\' <frame src="left.php3?' . $url_query . '&hash=' . $phpmain_hash . $phpmain_hash_js . '" name="nav" frameborder="0" />\');' . "\n";
75 echo ' document.writeln(\' <frame src="queryframe.php3?' . $url_query . '&hash=' . $phpmain_hash . $phpmain_hash_js . '" name="queryframe" frameborder="0" />\');' . "\n";
76 echo ' document.writeln(\' </frameset>\');' . "\n";
77 echo ' document.writeln(\' <frame src="' . (empty($db) ?
$cfg['DefaultTabServer'] : $cfg['DefaultTabDatabase']) . '?' . $url_query . '" name="phpmain' . $phpmain_hash . $phpmain_hash_js . '" border="0" frameborder="0" />\');' . "\n";
78 echo ' document.writeln(\' <noframes>\');' . "\n";
79 echo ' document.writeln(\' <body bgcolor="#FFFFFF">\');' . "\n";
80 echo ' document.writeln(\' <p>' . str_replace("'", "\'", $strNoFrames) . '</p>\');' . "\n";
81 echo ' document.writeln(\' </body>\');' . "\n";
82 echo ' document.writeln(\' </noframes>\');' . "\n";
83 echo ' document.writeln(\'</frameset>\');' . "\n";
85 echo '</script>' . "\n";
87 echo '<noscript>' . "\n";
90 echo '<frameset cols="' . $cfg['LeftWidth'] . ',*" rows="*" border="1" frameborder="1" framespacing="0">' . "\n";
91 echo ' <frameset rows="*, 50" framespacing="0" frameborder="0" border="0">' . "\n";
92 echo ' <frame src="left.php3?' . $url_query . '&hash=' . $phpmain_hash . '" name="nav" frameborder="0" />' . "\n";
93 echo ' <frame src="queryframe.php3?' . $url_query . '&hash=' . $phpmain_hash . '" name="queryframe" frameborder="0" />' . "\n";
94 echo ' </frameset>' . "\n";
95 echo ' <frame src="' . (empty($db) ?
$cfg['DefaultTabServer'] : $cfg['DefaultTabDatabase']) . '?' . $url_query . '" name="phpmain' . $phpmain_hash . '" frameborder="0" />' . "\n";
99 echo '<frameset cols="' . $cfg['LeftWidth'] . ',*" rows="*" border="1" frameborder="1" framespacing="0">' . "\n";
100 echo ' <frame src="left.php3?' . $url_query . '&hash=' . $phpmain_hash . '" name="nav" frameborder="0" />' . "\n";
101 echo ' <frame src="' . (empty($db) ?
$cfg['DefaultTabServer'] : $cfg['DefaultTabDatabase']) . '?' . $url_query . '" name="phpmain' . $phpmain_hash . '" frameborder="1" />' . "\n";
107 <body bgcolor
="#FFFFFF">
108 <p
><?php
echo $strNoFrames; ?
></p
>
113 if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
114 echo '</noscript>' . "\n";