lost patches sf cvs problem
[phpmyadmin/crack.git] / index.php3
blob62ba604abd28b2d8932fc33a54ff774108fc4759
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * Gets core libraries and defines some variables
8 */
9 require('./libraries/grab_globals.lib.php3');
10 require('./libraries/common.lib.php3');
12 // Gets the default font sizes
13 PMA_setFontSizes();
15 // Gets the host name
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');
27 else {
28 $HTTP_HOST = '';
33 /**
34 * Defines the frameset
36 // loic1: If left light mode -> urldecode the db name
37 if (isset($lightm_db)) {
38 $db = urldecode($lightm_db);
39 unset($lightm_db);
41 $url_query = PMA_generate_common_url(isset($db) ? $db : '');
43 header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
45 require('./libraries/relation.lib.php3');
46 $cfgRelation = PMA_getRelationsParam();
48 if ($cfg['QueryHistoryDB'] && $cfgRelation['historywork']) {
49 PMA_purgeHistory($cfg['Server']['user']);
52 $phpmain_hash = md5($cfg['PmaAbsoluteUri']);
53 $phpmain_hash_js = time();
55 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
56 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
57 <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; ?>">
58 <head>
59 <title>phpMyAdmin <?php echo PMA_VERSION; ?> - <?php echo $HTTP_HOST; ?></title>
60 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
61 <link rel="stylesheet" type="text/css" href="./css/phpmyadmin.css.php3?lang=<?php echo $lang; ?>&amp;js_frame=right" />
62 </head>
64 <frameset cols="<?php echo $cfg['LeftWidth']; ?>,*" rows="*">
65 <?php if ($cfg['QueryFrame']) { ?>
66 <frameset rows="*, 50" framespacing="0" frameborder="0" border="0">
67 <?php
68 if ($cfg['QueryFrameJS']) {?>
69 <script type="text/javascript">
70 document.writeln('<frame src="left.php3?<?php echo $url_query; ?>&amp;hash=<?php echo $phpmain_hash . $phpmain_hash_js; ?>" name="nav" frameborder="0" />');
71 document.writeln('<frame src="queryframe.php3?<?php echo $url_query; ?>&amp;hash=<?php echo $phpmain_hash . $phpmain_hash_js; ?>" name="queryframe" frameborder="0" />');
72 </script>
74 <noscript>
75 <?php } ?>
76 <frame src="left.php3?<?php echo $url_query; ?>&amp;hash=<?php echo $phpmain_hash; ?>" name="nav" frameborder="0" />
77 <frame src="queryframe.php3?<?php echo $url_query; ?>&amp;hash=<?php echo $phpmain_hash; ?>" name="queryframe" frameborder="0" />
78 <?php if ($cfg['QueryFrameJS']) { ?>
79 </noscript>
80 <?php } ?>
81 </frameset>
82 <?php
83 } else {
85 <frame src="left.php3?<?php echo $url_query; ?>&amp;hash='<?php echo $phpmain_hash; ?>" name="nav" frameborder="0" />
86 <?php
89 <frame src="<?php echo (empty($db)) ? 'main.php3' : $cfg['DefaultTabDatabase']; ?>?<?php echo $url_query; ?>" name="phpmain<?php echo $phpmain_hash; ?>" frameborder="1" />
91 <noframes>
92 <body bgcolor="#FFFFFF">
93 <p><?php echo $strNoFrames; ?></p>
94 </body>
95 </noframes>
96 </frameset>
98 </html>