1 | <?php
|
---|
2 | /* $Id: footer.inc.php 9995 2007-02-16 18:00:34Z lem9 $ */
|
---|
3 | // vim: expandtab sw=4 ts=4 sts=4:
|
---|
4 |
|
---|
5 | /**
|
---|
6 | * WARNING: This script has to be included at the very end of your code because
|
---|
7 | * it will stop the script execution!
|
---|
8 | *
|
---|
9 | * always use $GLOBALS, as this script is also included by functions
|
---|
10 | *
|
---|
11 | */
|
---|
12 |
|
---|
13 | require_once './libraries/relation.lib.php'; // for PMA_setHistory()
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * updates javascript variables in index.php for coorect working with querywindow
|
---|
17 | * and navigation frame refreshing
|
---|
18 | */
|
---|
19 | ?>
|
---|
20 | <script type="text/javascript" language="javascript">
|
---|
21 | //<![CDATA[
|
---|
22 | <?php
|
---|
23 | if (! isset($GLOBALS['no_history']) && isset($GLOBALS['db'])
|
---|
24 | && strlen($GLOBALS['db']) && empty($GLOBALS['error_message'])) {
|
---|
25 | $table = isset($GLOBALS['table']) ? $GLOBALS['table'] : ''; ?>
|
---|
26 | // updates current settings
|
---|
27 | if (window.parent.setAll) {
|
---|
28 | window.parent.setAll('<?php
|
---|
29 | echo PMA_escapeJsString($GLOBALS['lang']) . "', '";
|
---|
30 | echo PMA_escapeJsString($GLOBALS['collation_connection']) . "', '";
|
---|
31 | echo PMA_escapeJsString($GLOBALS['server']) . "', '";
|
---|
32 | echo PMA_escapeJsString($GLOBALS['db']) . "', '";
|
---|
33 | echo PMA_escapeJsString($table); ?>');
|
---|
34 | }
|
---|
35 | <?php } ?>
|
---|
36 |
|
---|
37 | <?php if (! empty($GLOBALS['reload'])) { ?>
|
---|
38 | // refresh navigation frame content
|
---|
39 | if (window.parent.refreshNavigation) {
|
---|
40 | window.parent.refreshNavigation();
|
---|
41 | }
|
---|
42 | <?php } ?>
|
---|
43 |
|
---|
44 | <?php
|
---|
45 | if (! isset($GLOBALS['no_history']) && empty($GLOBALS['error_message'])) {
|
---|
46 | if (isset($GLOBALS['LockFromUpdate']) && $GLOBALS['LockFromUpdate'] == '1'
|
---|
47 | && isset($GLOBALS['sql_query'])) {
|
---|
48 | // When the button 'LockFromUpdate' was selected in the querywindow,
|
---|
49 | // it does not submit it's contents to
|
---|
50 | // itself. So we create a SQL-history entry here.
|
---|
51 | if ($GLOBALS['cfg']['QueryHistoryDB'] && $GLOBALS['cfgRelation']['historywork']) {
|
---|
52 | PMA_setHistory((isset($GLOBALS['db']) ? $GLOBALS['db'] : ''),
|
---|
53 | (isset($GLOBALS['table']) ? $GLOBALS['table'] : ''),
|
---|
54 | $GLOBALS['cfg']['Server']['user'],
|
---|
55 | $GLOBALS['sql_query']);
|
---|
56 | }
|
---|
57 | }
|
---|
58 | ?>
|
---|
59 | // set current db, table and sql query in the querywindow
|
---|
60 | if (window.parent.refreshNavigation) {
|
---|
61 | window.parent.reload_querywindow(
|
---|
62 | '<?php echo isset($GLOBALS['db']) ? PMA_escapeJsString($GLOBALS['db']) : '' ?>',
|
---|
63 | '<?php echo isset($GLOBALS['table']) ? PMA_escapeJsString($GLOBALS['table']) : '' ?>',
|
---|
64 | '<?php echo isset($GLOBALS['sql_query']) && ! defined('PMA_QUERY_TOO_BIG') ? PMA_escapeJsString($GLOBALS['sql_query']) : ''; ?>');
|
---|
65 | }
|
---|
66 | <?php } ?>
|
---|
67 |
|
---|
68 | <?php if (! empty($GLOBALS['focus_querywindow'])) { ?>
|
---|
69 | // set focus to the querywindow
|
---|
70 | if (parent.querywindow && !parent.querywindow.closed && parent.querywindow.location) {
|
---|
71 | self.focus();
|
---|
72 | }
|
---|
73 | <?php } ?>
|
---|
74 |
|
---|
75 | if (window.parent.frame_content) {
|
---|
76 | // reset content frame name, as querywindow needs to set a unique name
|
---|
77 | // before submitting form data, and navigation frame needs the original name
|
---|
78 | if (window.parent.frame_content.name != 'frame_content') {
|
---|
79 | window.parent.frame_content.name = 'frame_content';
|
---|
80 | }
|
---|
81 | if (window.parent.frame_content.id != 'frame_content') {
|
---|
82 | window.parent.frame_content.id = 'frame_content';
|
---|
83 | }
|
---|
84 | //window.parent.frame_content.setAttribute('name', 'frame_content');
|
---|
85 | //window.parent.frame_content.setAttribute('id', 'frame_content');
|
---|
86 | }
|
---|
87 | //]]>
|
---|
88 | </script>
|
---|
89 | <?php
|
---|
90 |
|
---|
91 | // Link to itself to replicate windows including frameset
|
---|
92 | if (!isset($GLOBALS['checked_special'])) {
|
---|
93 | $GLOBALS['checked_special'] = FALSE;
|
---|
94 | }
|
---|
95 |
|
---|
96 | if (PMA_getenv('SCRIPT_NAME') && empty($_POST) && !$GLOBALS['checked_special']) {
|
---|
97 | echo '<div id="selflink" class="print_ignore">' . "\n";
|
---|
98 | $url_params['target'] = basename(PMA_getenv('SCRIPT_NAME'));
|
---|
99 | echo '<a href="index.php' . PMA_generate_common_url($url_params) . '"'
|
---|
100 | . ' title="' . $GLOBALS['strOpenNewWindow'] . '" target="_blank">';
|
---|
101 | /*
|
---|
102 | echo '<a href="index.php?target=' . basename(PMA_getenv('SCRIPT_NAME'));
|
---|
103 | $url = PMA_generate_common_url(isset($GLOBALS['db']) ? $GLOBALS['db'] : '', isset($GLOBALS['table']) ? $GLOBALS['table'] : '');
|
---|
104 | if (!empty($url)) {
|
---|
105 | echo '&' . $url;
|
---|
106 | }
|
---|
107 | echo '" target="_blank">';
|
---|
108 | */
|
---|
109 | if ($GLOBALS['cfg']['NavigationBarIconic']) {
|
---|
110 | echo '<img class="icon" src="'. $GLOBALS['pmaThemeImage'] . 'window-new.png"'
|
---|
111 | . ' alt="' . $GLOBALS['strOpenNewWindow'] . '" />';
|
---|
112 | }
|
---|
113 | if ($GLOBALS['cfg']['NavigationBarIconic'] !== true) {
|
---|
114 | echo $GLOBALS['strOpenNewWindow'];
|
---|
115 | }
|
---|
116 | echo '</a>' . "\n";
|
---|
117 | echo '</div>' . "\n";
|
---|
118 | }
|
---|
119 |
|
---|
120 | /**
|
---|
121 | * Close database connections
|
---|
122 | */
|
---|
123 | if (isset($GLOBALS['controllink']) && $GLOBALS['controllink']) {
|
---|
124 | @PMA_DBI_close($GLOBALS['controllink']);
|
---|
125 | }
|
---|
126 | if (isset($GLOBALS['userlink']) && $GLOBALS['userlink']) {
|
---|
127 | @PMA_DBI_close($GLOBALS['userlink']);
|
---|
128 | }
|
---|
129 |
|
---|
130 | // Include possible custom footers
|
---|
131 | if (file_exists('./config.footer.inc.php')) {
|
---|
132 | require('./config.footer.inc.php');
|
---|
133 | }
|
---|
134 |
|
---|
135 |
|
---|
136 | /**
|
---|
137 | * Generates profiling data if requested
|
---|
138 | */
|
---|
139 |
|
---|
140 | // profiling deactivated due to licensing issues
|
---|
141 | if (! empty($GLOBALS['cfg']['DBG']['enable'])
|
---|
142 | && ! empty($GLOBALS['cfg']['DBG']['profile']['enable'])) {
|
---|
143 | //run the basic setup code first
|
---|
144 | require_once './libraries/dbg/setup.php';
|
---|
145 | //if the setup ran fine, then do the profiling
|
---|
146 | /*
|
---|
147 | if (! empty($GLOBALS['DBG'])) {
|
---|
148 | require_once './libraries/dbg/profiling.php';
|
---|
149 | dbg_dump_profiling_results();
|
---|
150 | }
|
---|
151 | */
|
---|
152 | }
|
---|
153 |
|
---|
154 | ?>
|
---|
155 | </body>
|
---|
156 | </html>
|
---|
157 | <?php
|
---|
158 | /**
|
---|
159 | * Sends bufferized data
|
---|
160 | */
|
---|
161 | if (! empty($GLOBALS['cfg']['OBGzip'])
|
---|
162 | && ! empty($GLOBALS['ob_mode'])) {
|
---|
163 | PMA_outBufferPost($GLOBALS['ob_mode']);
|
---|
164 | }
|
---|
165 |
|
---|
166 | /**
|
---|
167 | * Stops the script execution
|
---|
168 | */
|
---|
169 | exit;
|
---|
170 | ?>
|
---|