Skip to content
Newer
Older
100644 179 lines (160 sloc) 5.74 KB
7ff8fed Initial revision
Olivier Müller authored
1 <?php
817e790 synced/fixed vim line
Sebastian Mendel authored
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3143135 XHTML 1.0 trans. compliance and more semantic XHTML output
Sebastian Mendel authored
3 /**
c3afb50 @nijel Add docs to some files and methods
nijel authored
4 * Creates frameset
81cd3d3 moved setting of cookies into index.php
Sebastian Mendel authored
5 *
e56949f @nijel Use package name PhpMyAdmin
nijel authored
6 * @package PhpMyAdmin
3143135 XHTML 1.0 trans. compliance and more semantic XHTML output
Sebastian Mendel authored
7 */
0ab0ad6 @lem9 merge Loic's version
lem9 authored
8
9 /**
a91bfdd calling the "set_font_sizes()" function is required to get the "$font…
Loïc Chapeaux authored
10 * Gets core libraries and defines some variables
0ab0ad6 @lem9 merge Loic's version
lem9 authored
11 */
b2fd866 Leading ./ paths for includes can be omitted, part 2
Jo Michael authored
12 require_once 'libraries/common.inc.php';
81cd3d3 moved setting of cookies into index.php
Sebastian Mendel authored
13
3143135 XHTML 1.0 trans. compliance and more semantic XHTML output
Sebastian Mendel authored
14 // free the session file, for the other frames to be loaded
15 session_write_close();
5103056 @lem9 bug 1006011, save the chosen connection collation into a cookie
lem9 authored
16
a91bfdd calling the "set_font_sizes()" function is required to get the "$font…
Loïc Chapeaux authored
17 // Gets the host name
7a443cd Ensure the server hostname is find whatever is the php configuration
Loïc Chapeaux authored
18 if (empty($HTTP_HOST)) {
bf54038 @wiltave Unnecessary "else" statement removed
wiltave authored
19 $HTTP_HOST = '';
44a0f36 use PMA_getenv()
Sebastian Mendel authored
20 if (PMA_getenv('HTTP_HOST')) {
21 $HTTP_HOST = PMA_getenv('HTTP_HOST');
9007431 Misc urlencode use fixes
Loïc Chapeaux authored
22 }
7a443cd Ensure the server hostname is find whatever is the php configuration
Loïc Chapeaux authored
23 }
4d878ae See Changelog: Lightweight tabs, DB-based SQL history, tabbed querywi…
Garvin Hicking authored
24
25
3143135 XHTML 1.0 trans. compliance and more semantic XHTML output
Sebastian Mendel authored
26 // purge querywindow history
27 $cfgRelation = PMA_getRelationsParam();
d9c1045 replaced $_ENV with getenv()
Sebastian Mendel authored
28 if ($GLOBALS['cfg']['QueryHistoryDB'] && $cfgRelation['historywork']) {
cfeb306 coding standard: no spaces inside braces
Sebastian Mendel authored
29 PMA_purgeHistory($GLOBALS['cfg']['Server']['user']);
4d878ae See Changelog: Lightweight tabs, DB-based SQL history, tabbed querywi…
Garvin Hicking authored
30 }
d9c1045 replaced $_ENV with getenv()
Sebastian Mendel authored
31 unset($cfgRelation);
74f29a1 - moved setting of cookies from index.php into common.lib.php
Sebastian Mendel authored
32
210576b Fixed Bug #723955, 723736, 723713 (Query Frame)
Garvin Hicking authored
33
74f29a1 - moved setting of cookies from index.php into common.lib.php
Sebastian Mendel authored
34 /**
35 * pass variables to child pages
36 */
8ceb240 @nijel Drop passing of convcharset.
nijel authored
37 $drops = array('lang', 'server', 'collation_connection',
d9c1045 replaced $_ENV with getenv()
Sebastian Mendel authored
38 'db', 'table');
7ff8fed Initial revision
Olivier Müller authored
39
d9c1045 replaced $_ENV with getenv()
Sebastian Mendel authored
40 foreach ($drops as $each_drop) {
b2dfe50 @helmo [core] Fix broken cleanup of $_GET
helmo authored
41 if (array_key_exists($each_drop, $_GET)) {
d9c1045 replaced $_ENV with getenv()
Sebastian Mendel authored
42 unset($_GET[$each_drop]);
3143135 XHTML 1.0 trans. compliance and more semantic XHTML output
Sebastian Mendel authored
43 }
bb98260 @lem9 compute queryframe height
lem9 authored
44 }
d9c1045 replaced $_ENV with getenv()
Sebastian Mendel authored
45 unset($drops, $each_drop);
3143135 XHTML 1.0 trans. compliance and more semantic XHTML output
Sebastian Mendel authored
46
008734f do NEVER unset $table or $db;
Sebastian Mendel authored
47 if (! strlen($GLOBALS['db'])) {
3143135 XHTML 1.0 trans. compliance and more semantic XHTML output
Sebastian Mendel authored
48 $main_target = $GLOBALS['cfg']['DefaultTabServer'];
008734f do NEVER unset $table or $db;
Sebastian Mendel authored
49 } elseif (! strlen($GLOBALS['table'])) {
74f29a1 - moved setting of cookies from index.php into common.lib.php
Sebastian Mendel authored
50 $_GET['db'] = $GLOBALS['db'];
3143135 XHTML 1.0 trans. compliance and more semantic XHTML output
Sebastian Mendel authored
51 $main_target = $GLOBALS['cfg']['DefaultTabDatabase'];
52 } else {
74f29a1 - moved setting of cookies from index.php into common.lib.php
Sebastian Mendel authored
53 $_GET['db'] = $GLOBALS['db'];
54 $_GET['table'] = $GLOBALS['table'];
6f9253b @madhuracj Various coding style improvements
madhuracj authored
55 $main_target = ! empty($GLOBALS['goto'])
56 ? $GLOBALS['goto']
57 : $GLOBALS['cfg']['DefaultTabTable'];
d9a2161 @lem9 redesign part 3
lem9 authored
58 }
019ce87 @nijel Use same code for all server selection, possibly display server links…
nijel authored
59
d9c1045 replaced $_ENV with getenv()
Sebastian Mendel authored
60 $url_query = PMA_generate_common_url($_GET);
74f29a1 - moved setting of cookies from index.php into common.lib.php
Sebastian Mendel authored
61
6f9253b @madhuracj Various coding style improvements
madhuracj authored
62 if (! empty($_REQUEST['target'])
63 && is_string($_REQUEST['target'])
64 && in_array($_REQUEST['target'], $goto_whitelist)
65 ) {
e04d881 Bug #3498559 Not relying on grab_globals for $_GET[target], use $_REQ…
Jo Michael authored
66 $main_target = $_REQUEST['target'];
f370db5 @nijel Add target parameter to index.php to allow direct jump to any script.
nijel authored
67 }
68
74f29a1 - moved setting of cookies from index.php into common.lib.php
Sebastian Mendel authored
69 $main_target .= $url_query;
7fc46ed Another try at the frameset generation.
Garvin Hicking authored
70
f9ccd69 @nijel Remove no longer needed language file names.
nijel authored
71 $lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][1];
5a5b287 @derrabus Don't display scrollbars in queryframe
derrabus authored
72
7fc46ed Another try at the frameset generation.
Garvin Hicking authored
73
3143135 XHTML 1.0 trans. compliance and more semantic XHTML output
Sebastian Mendel authored
74 // start output
a054562 @roccivic PMA_Footer and PMA_Header no longer need to be singletons
roccivic authored
75 $response = PMA_Response::getInstance();
d9bedbd @roccivic Finished integrating the PMA_Footer class
roccivic authored
76 $header = $response->getHeader();
77 $header->sendHttpHeaders();
78 $response->disable();
79
d2d5643 Bug #728935 // See discussion on Mailinglist about QueryFramesJS set …
Garvin Hicking authored
80 ?>
3143135 XHTML 1.0 trans. compliance and more semantic XHTML output
Sebastian Mendel authored
81 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
82 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
83 <html xmlns="http://www.w3.org/1999/xhtml"
84 xml:lang="<?php echo $lang_iso_code; ?>"
85 lang="<?php echo $lang_iso_code; ?>"
86 dir="<?php echo $GLOBALS['text_dir']; ?>">
87 <head>
3b56f6a Leading ./ paths for links and favicons can be omitted, part 1
Jo Michael authored
88 <link rel="icon" href="favicon.ico" type="image/x-icon" />
89 <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
74f29a1 - moved setting of cookies from index.php into common.lib.php
Sebastian Mendel authored
90 <title>phpMyAdmin <?php echo PMA_VERSION; ?> -
91 <?php echo htmlspecialchars($HTTP_HOST); ?></title>
bbbf2c4 @nijel Drop $GLOBALS['charset'].
nijel authored
92 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
c44c681 prevent search indexes from indexing phpMyAdmin installations
Sebastian Mendel authored
93 <meta name="robots" content="noindex,nofollow" />
dd0ea69 @lem9 no js between </head> and </html>, thanks to Michael Keck
lem9 authored
94 <script type="text/javascript">
74f29a1 - moved setting of cookies from index.php into common.lib.php
Sebastian Mendel authored
95 // <![CDATA[
e5881ad rename JavaScript file according it's use
Sebastian Mendel authored
96 // definitions used in common.js
bcc5684 @nijel security fixes
nijel authored
97 var common_query = '<?php echo PMA_escapeJsString(PMA_generate_common_url('', '', '&'));?>';
98 var opendb_url = '<?php echo PMA_escapeJsString($GLOBALS['cfg']['DefaultTabDatabase']); ?>';
4d21dc6 wrong check for safari
Sebastian Mendel authored
99 var safari_browser = <?php echo PMA_USR_BROWSER_AGENT == 'SAFARI' ? 'true' : 'false' ?>;
bcc5684 @nijel security fixes
nijel authored
100 var querywindow_height = <?php echo PMA_escapeJsString($GLOBALS['cfg']['QueryWindowHeight']); ?>;
101 var querywindow_width = <?php echo PMA_escapeJsString($GLOBALS['cfg']['QueryWindowWidth']); ?>;
102 var collation_connection = '<?php echo PMA_escapeJsString($GLOBALS['collation_connection']); ?>';
103 var lang = '<?php echo PMA_escapeJsString($GLOBALS['lang']); ?>';
104 var server = '<?php echo PMA_escapeJsString($GLOBALS['server']); ?>';
105 var table = '<?php echo PMA_escapeJsString($GLOBALS['table']); ?>';
106 var db = '<?php echo PMA_escapeJsString($GLOBALS['db']); ?>';
62461e5 @lem9 port 2.11.7.1 fix
lem9 authored
107 var token = '<?php echo PMA_escapeJsString($_SESSION[' PMA_token ']); ?>';
bcc5684 @nijel security fixes
nijel authored
108 var text_dir = '<?php echo PMA_escapeJsString($GLOBALS['text_dir']); ?>';
109 var pma_absolute_uri = '<?php echo PMA_escapeJsString($GLOBALS['cfg']['PmaAbsoluteUri']); ?>';
6971295 @Chanaka Renamed PMA_CommonFunctions::getInstance()-> with PMA_Util::
Chanaka authored
110 var pma_text_default_tab = '<?php echo PMA_escapeJsString(PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable'])); ?>';
111 var pma_text_left_default_tab = '<?php echo PMA_escapeJsString(PMA_Util::getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable'])); ?>';
dd0ea69 @lem9 no js between </head> and </html>, thanks to Michael Keck
lem9 authored
112
113 // for content and navigation frames
114
115 var frame_content = 0;
116 var frame_navigation = 0;
44d59e7 @nijel Various coding style improvements
nijel authored
117 function getFrames()
118 {
dd0ea69 @lem9 no js between </head> and </html>, thanks to Michael Keck
lem9 authored
119 <?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
120 frame_content = window.frames[1];
121 frame_navigation = window.frames[0];
122 <?php } else { ?>
123 frame_content = window.frames[0];
124 frame_navigation = window.frames[1];
125 <?php } ?>
126 }
e5881ad rename JavaScript file according it's use
Sebastian Mendel authored
127 var onloadCnt = 0;
dd0ea69 @lem9 no js between </head> and </html>, thanks to Michael Keck
lem9 authored
128 var onLoadHandler = window.onload;
129 window.onload = function() {
130 if (onloadCnt == 0) {
e5881ad rename JavaScript file according it's use
Sebastian Mendel authored
131 if (typeof(onLoadHandler) == "function") {
132 onLoadHandler();
dd0ea69 @lem9 no js between </head> and </html>, thanks to Michael Keck
lem9 authored
133 }
e5881ad rename JavaScript file according it's use
Sebastian Mendel authored
134 if (typeof(getFrames) != 'undefined' && typeof(getFrames) == 'function') {
135 getFrames();
dd0ea69 @lem9 no js between </head> and </html>, thanks to Michael Keck
lem9 authored
136 }
137 onloadCnt++;
138 }
139 };
74f29a1 - moved setting of cookies from index.php into common.lib.php
Sebastian Mendel authored
140 // ]]>
141 </script>
394c673 @nijel Use PMA_includeJS from top level page.
nijel authored
142 <?php
1f7daca @roccivic Dropped PMA_includeJS() in favor of the PMA_Scripts class
roccivic authored
143 $scripts = new PMA_Scripts();
144 $scripts->addFile('jquery/jquery-1.6.2.js');
145 $scripts->addFile('update-location.js');
146 $scripts->addFile('common.js');
147 echo $scripts->getDisplay();
394c673 @nijel Use PMA_includeJS from top level page.
nijel authored
148 ?>
3143135 XHTML 1.0 trans. compliance and more semantic XHTML output
Sebastian Mendel authored
149 </head>
d9c1045 replaced $_ENV with getenv()
Sebastian Mendel authored
150 <frameset cols="<?php
c04775d @nijel Move navigation frame to right for rtl languages.
nijel authored
151 if ($GLOBALS['text_dir'] === 'rtl') {
152 echo '*,';
153 }
9a4e3a6 improved themes
Sebastian Mendel authored
154 echo $GLOBALS['cfg']['NaviWidth'];
c04775d @nijel Move navigation frame to right for rtl languages.
nijel authored
155 if ($GLOBALS['text_dir'] === 'ltr') {
156 echo ',*';
157 }
158 ?>" rows="*" id="mainFrameset">
159 <?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
8444d62 syncronize id and name attribute for frame tags but keep IE sending q…
Sebastian Mendel authored
160 <frame frameborder="0" id="frame_navigation"
491187e @nijel Rename left.php to navigation.php and modify all calls to that. Only …
nijel authored
161 src="navigation.php<?php echo $url_query; ?>"
8444d62 syncronize id and name attribute for frame tags but keep IE sending q…
Sebastian Mendel authored
162 name="frame_navigation" />
c04775d @nijel Move navigation frame to right for rtl languages.
nijel authored
163 <?php } ?>
8444d62 syncronize id and name attribute for frame tags but keep IE sending q…
Sebastian Mendel authored
164 <frame frameborder="0" id="frame_content"
81cd3d3 moved setting of cookies into index.php
Sebastian Mendel authored
165 src="<?php echo $main_target; ?>"
8444d62 syncronize id and name attribute for frame tags but keep IE sending q…
Sebastian Mendel authored
166 name="frame_content" />
c04775d @nijel Move navigation frame to right for rtl languages.
nijel authored
167 <?php if ($GLOBALS['text_dir'] === 'rtl') { ?>
168 <frame frameborder="0" id="frame_navigation"
491187e @nijel Rename left.php to navigation.php and modify all calls to that. Only …
nijel authored
169 src="navigation.php<?php echo $url_query; ?>"
c04775d @nijel Move navigation frame to right for rtl languages.
nijel authored
170 name="frame_navigation" />
171 <?php } ?>
77172fa patch #460567 (UI - small html change in frame options) thanks to Vas…
Loïc Chapeaux authored
172 <noframes>
3143135 XHTML 1.0 trans. compliance and more semantic XHTML output
Sebastian Mendel authored
173 <body>
2182098 @lem9 strings to gettext, second batch
lem9 authored
174 <p><?php echo __('phpMyAdmin is more friendly with a <b>frames-capable</b> browser.'); ?></p>
77172fa patch #460567 (UI - small html change in frame options) thanks to Vas…
Loïc Chapeaux authored
175 </body>
176 </noframes>
7ff8fed Initial revision
Olivier Müller authored
177 </frameset>
0f8da57 @nijel Avoid XSS on HTTP_HOST.
nijel authored
178 </html>
Something went wrong with that request. Please try again.