Improve translation.
[phpmyadmin/crack.git] / libraries / footer.inc.php
blobe0ff3e7a82ee30a4679c16083bc64f3911e7d6bf
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * finishs HTML output
6 * updates javascript variables in index.php for coorect working with querywindow
7 * and navigation frame refreshing
9 * send buffered data if buffered
11 * WARNING: This script has to be included at the very end of your code because
12 * it will stop the script execution!
14 * always use $GLOBALS, as this script is also included by functions
16 * @uses $_REQUEST['no_history']
17 * @uses $GLOBALS['lang']
18 * @uses $GLOBALS['collation_connection']
19 * @uses $GLOBALS['server']
20 * @uses $GLOBALS['db']
21 * @uses $GLOBALS['table']
22 * @uses $GLOBALS['error_message']
23 * @uses $GLOBALS['reload']
24 * @uses $GLOBALS['sql_query']
25 * @uses $GLOBALS['focus_querywindow']
26 * @uses $GLOBALS['checked_special']
27 * @uses $GLOBALS['pmaThemeImage']
28 * @uses $GLOBALS['controllink'] to close it
29 * @uses $GLOBALS['userlink'] to close it
30 * @uses $cfg['Server']['user']
31 * @uses $cfg['NavigationBarIconic']
32 * @uses $cfg['DBG']['enable']
33 * @uses $cfg['DBG']['profile']['enable']
34 * @uses $GLOBALS['strOpenNewWindow']
35 * @uses $cfg['MaxCharactersInDisplayedSQL']
36 * @uses PMA_isValid()
37 * @uses PMA_setHistory()
38 * @uses PMA_ifSetOr()
39 * @uses PMA_escapeJsString()
40 * @uses PMA_getenv()
41 * @uses PMA_generate_common_url()
42 * @uses basename()
43 * @uses file_exists()
44 * @version $Id$
47 /**
48 * for PMA_setHistory()
50 require_once './libraries/relation.lib.php';
52 if (! PMA_isValid($_REQUEST['no_history']) && empty($GLOBALS['error_message'])
53 && ! empty($GLOBALS['sql_query'])) {
54 PMA_setHistory(PMA_ifSetOr($GLOBALS['db'], ''),
55 PMA_ifSetOr($GLOBALS['table'], ''),
56 $GLOBALS['cfg']['Server']['user'],
57 $GLOBALS['sql_query']);
60 if ($GLOBALS['error_handler']->hasDisplayErrors()) {
61 echo '<div>';
62 $GLOBALS['error_handler']->dispErrors();
63 echo '</div>';
66 if (count($GLOBALS['footnotes'])) {
67 echo '<div class="notice">';
68 foreach ($GLOBALS['footnotes'] as $footnote) {
69 echo '<span id="footnote_' . $footnote['nr'] . '"><sup>'
70 . $footnote['nr'] . '</sup> ' . $footnote['note'] . '</span><br />';
72 echo '</div>';
76 <script type="text/javascript">
77 //<![CDATA[
78 <?php
79 if (empty($GLOBALS['error_message'])) {
81 // updates current settings
82 if (window.parent.setAll) {
83 window.parent.setAll('<?php
84 echo PMA_escapeJsString($GLOBALS['lang']) . "', '";
85 echo PMA_escapeJsString($GLOBALS['collation_connection']) . "', '";
86 echo PMA_escapeJsString($GLOBALS['server']) . "', '";
87 echo PMA_escapeJsString(PMA_ifSetOr($GLOBALS['db'], '')) . "', '";
88 echo PMA_escapeJsString(PMA_ifSetOr($GLOBALS['table'], '')); ?>');
90 <?php
91 if (! empty($GLOBALS['reload'])) {
93 // refresh navigation frame content
94 if (window.parent.refreshNavigation) {
95 window.parent.refreshNavigation();
97 <?php
100 // set current db, table and sql query in the querywindow
101 if (window.parent.reload_querywindow) {
102 window.parent.reload_querywindow(
103 '<?php echo PMA_escapeJsString(PMA_ifSetOr($GLOBALS['db'], '')) ?>',
104 '<?php echo PMA_escapeJsString(PMA_ifSetOr($GLOBALS['table'], '')) ?>',
105 '<?php echo strlen($GLOBALS['sql_query']) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] ? PMA_escapeJsString($GLOBALS['sql_query']) : ''; ?>');
107 <?php
110 if (! empty($GLOBALS['focus_querywindow'])) {
112 // set focus to the querywindow
113 if (parent.querywindow && !parent.querywindow.closed && parent.querywindow.location) {
114 self.focus();
116 <?php
120 if (window.parent.frame_content) {
121 // reset content frame name, as querywindow needs to set a unique name
122 // before submitting form data, and navigation frame needs the original name
123 if (typeof(window.parent.frame_content.name) != 'undefined'
124 && window.parent.frame_content.name != 'frame_content') {
125 window.parent.frame_content.name = 'frame_content';
127 if (typeof(window.parent.frame_content.id) != 'undefined'
128 && window.parent.frame_content.id != 'frame_content') {
129 window.parent.frame_content.id = 'frame_content';
131 //window.parent.frame_content.setAttribute('name', 'frame_content');
132 //window.parent.frame_content.setAttribute('id', 'frame_content');
134 //]]>
135 </script>
136 <?php
138 // Link to itself to replicate windows including frameset
139 if (!isset($GLOBALS['checked_special'])) {
140 $GLOBALS['checked_special'] = false;
143 if (PMA_getenv('SCRIPT_NAME') && empty($_POST) && !$GLOBALS['checked_special']) {
144 echo '<div id="selflink" class="print_ignore">' . "\n";
145 $url_params['target'] = basename(PMA_getenv('SCRIPT_NAME'));
146 echo '<a href="index.php' . PMA_generate_common_url($url_params) . '"'
147 . ' title="' . $GLOBALS['strOpenNewWindow'] . '" target="_blank">';
149 echo '<a href="index.php?target=' . basename(PMA_getenv('SCRIPT_NAME'));
150 $url = PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']);
151 if (!empty($url)) {
152 echo '&amp;' . $url;
154 echo '" target="_blank">';
156 if ($GLOBALS['cfg']['NavigationBarIconic']) {
157 echo '<img class="icon" src="'. $GLOBALS['pmaThemeImage'] . 'window-new.png"'
158 . ' alt="' . $GLOBALS['strOpenNewWindow'] . '" />';
160 if ($GLOBALS['cfg']['NavigationBarIconic'] !== true) {
161 echo $GLOBALS['strOpenNewWindow'];
163 echo '</a>' . "\n";
164 echo '</div>' . "\n";
167 // Include possible custom footers
168 if (file_exists('./config.footer.inc.php')) {
169 require './config.footer.inc.php';
174 * Generates profiling data if requested
177 // profiling deactivated due to licensing issues
178 if (! empty($GLOBALS['cfg']['DBG']['enable'])
179 && ! empty($GLOBALS['cfg']['DBG']['profile']['enable'])) {
180 //run the basic setup code first
181 require_once './libraries/dbg/setup.php';
182 //if the setup ran fine, then do the profiling
184 if (! empty($GLOBALS['DBG'])) {
185 require_once './libraries/dbg/profiling.php';
186 dbg_dump_profiling_results();
192 </body>
193 </html>
194 <?php
196 * Stops the script execution
198 exit;