3 // vim: expandtab sw=4 ts=4 sts=4:
7 * @uses libraries/common.lib.php global fnctions
8 * @uses libraries/relation.lib.php table relations
9 * @uses $GLOBALS['strNoFrames']
10 * @uses $GLOBALS['cfg']['QueryHistoryDB']
11 * @uses $GLOBALS['cfg']['Server']['user']
12 * @uses $GLOBALS['cfg']['DefaultTabServer'] as src for the mainframe
13 * @uses $GLOBALS['cfg']['DefaultTabDatabase'] as src for the mainframe
14 * @uses $GLOBALS['cfg']['LeftWidth'] for left frame width
15 * @uses $GLOBALS['collation_connection'] from $_REQUEST (grab_globals.lib.php)
17 * @uses $GLOBALS['available_languages'] from common.lib.php (select_lang.lib.php)
18 * @uses $GLOBALS['db']
19 * @uses $GLOBALS['charset']
20 * @uses $GLOBALS['lang']
21 * @uses $GLOBALS['text_dir']
22 * @uses $_ENV['HTTP_HOST']
23 * @uses PMA_getRelationsParam()
24 * @uses PMA_purgeHistory()
25 * @uses PMA_generate_common_url()
27 * @uses session_write_close()
30 * @uses header() to send charset
34 * Gets core libraries and defines some variables
36 require_once './libraries/common.lib.php';
39 * Includes the ThemeManager if it hasn't been included yet
41 require_once './libraries/relation.lib.php';
43 // free the session file, for the other frames to be loaded
44 session_write_close();
47 // loic1 - 2001/25/11: use the new globals arrays defined with php 4.1+
48 if (empty($HTTP_HOST)) {
49 if (PMA_getenv('HTTP_HOST')) {
50 $HTTP_HOST = PMA_getenv('HTTP_HOST');
57 // purge querywindow history
58 $cfgRelation = PMA_getRelationsParam();
59 if ($GLOBALS['cfg']['QueryHistoryDB'] && $cfgRelation['historywork']) {
60 PMA_purgeHistory( $GLOBALS['cfg']['Server']['user'] );
66 * pass variables to child pages
68 $drops = array('lang', 'server', 'convcharset', 'collation_connection',
71 foreach ($drops as $each_drop) {
72 if (! array_key_exists($each_drop, $_GET)) {
73 unset($_GET[$each_drop]);
76 unset($drops, $each_drop);
78 if (! isset($GLOBALS['db']) ||
! strlen($GLOBALS['db'])) {
79 $main_target = $GLOBALS['cfg']['DefaultTabServer'];
80 } elseif (! isset($GLOBALS['table']) ||
! strlen($GLOBALS['table'])) {
81 $_GET['db'] = $GLOBALS['db'];
82 $main_target = $GLOBALS['cfg']['DefaultTabDatabase'];
84 $_GET['db'] = $GLOBALS['db'];
85 $_GET['table'] = $GLOBALS['table'];
86 $main_target = $GLOBALS['cfg']['DefaultTabTable'];
89 $url_query = PMA_generate_common_url($_GET);
91 if (!empty($GLOBALS['target']) && in_array($GLOBALS['target'], $goto_whitelist)) {
92 $main_target = $GLOBALS['target'];
95 $main_target .= $url_query;
97 $lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][2];
101 header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
103 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
104 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
105 <html xmlns
="http://www.w3.org/1999/xhtml"
106 xml
:lang
="<?php echo $lang_iso_code; ?>"
107 lang
="<?php echo $lang_iso_code; ?>"
108 dir
="<?php echo $GLOBALS['text_dir']; ?>">
110 <link rel
="icon" href
="./favicon.ico" type
="image/x-icon" />
111 <link rel
="shortcut icon" href
="./favicon.ico" type
="image/x-icon" />
112 <title
>phpMyAdmin
<?php
echo PMA_VERSION
; ?
> -
113 <?php
echo htmlspecialchars($HTTP_HOST); ?
></title
>
114 <meta http
-equiv
="Content-Type"
115 content
="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
116 <script type
="text/javascript" language
="javascript">
118 // definitions used in querywindow.js
119 var common_query
= '<?php echo PMA_generate_common_url('', '', '&');?>';
120 var opendb_url
= '<?php echo $GLOBALS['cfg
']['DefaultTabDatabase
']; ?>';
121 var safari_browser
= <?php
echo PMA_USR_BROWSER_AGENT
== 'SAFARI' ?
'true' : 'false' ?
>;
122 var querywindow_height
= <?php
echo $GLOBALS['cfg']['QueryWindowHeight']; ?
>;
123 var querywindow_width
= <?php
echo $GLOBALS['cfg']['QueryWindowWidth']; ?
>;
124 var collation_connection
= '<?php echo $GLOBALS['collation_connection
']; ?>';
125 var lang
= '<?php echo $GLOBALS['lang
']; ?>';
126 var server
= '<?php echo $GLOBALS['server
']; ?>';
127 var table
= '<?php echo $GLOBALS['table
']; ?>';
128 var db
= '<?php echo $GLOBALS['db
']; ?>';
129 var text_dir
= '<?php echo $GLOBALS['text_dir
']; ?>';
130 var pma_absolute_uri
= '<?php echo $GLOBALS['cfg
']['PmaAbsoluteUri
']; ?>';
133 <script src
="./js/querywindow.js" type
="text/javascript" language
="javascript">
136 <frameset cols
="<?php
137 if ($GLOBALS['text_dir'] === 'rtl') {
140 echo $GLOBALS['cfg']['LeftWidth'];
141 if ($GLOBALS['text_dir'] === 'ltr') {
144 ?>" rows
="*" id
="mainFrameset">
145 <?php
if ($GLOBALS['text_dir'] === 'ltr') { ?
>
146 <frame frameborder
="0" id
="frame_navigation"
147 src
="left.php<?php echo $url_query; ?>"
148 name
="frame_navigation" />
150 <frame frameborder
="0" id
="frame_content"
151 src
="<?php echo $main_target; ?>"
152 name
="frame_content" />
153 <?php
if ($GLOBALS['text_dir'] === 'rtl') { ?
>
154 <frame frameborder
="0" id
="frame_navigation"
155 src
="left.php<?php echo $url_query; ?>"
156 name
="frame_navigation" />
160 <p
><?php
echo $GLOBALS['strNoFrames']; ?
></p
>