fixes for HTML entities
[phpmyadmin/crack.git] / footer.inc.php3
blob3d1a0b90ab9da89e928c22e1021524a11f8209be
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
5 // In this file you may add PHP or HTML statements that will be used to define
6 // the footer for phpMyAdmin pages.
8 /**
9 * Query window
12 // If query window is wanted and open, update with latest selected db/table.
13 if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
15 <script>
16 <?php
17 if ($cfg['QueryFrameDebug']) {
19 document.writeln("Updating query window. DB: <?php echo (isset($db) ? $db : 'FALSE'); ?>, Table: <?php echo (isset($table) ? $table : 'FALSE'); ?><br>");
20 document.writeln("Window: " + top.frames.queryframe.querywindow.location + "<br>");
21 <?php
25 if (top.frames.queryframe && top.frames.queryframe.document && top.frames.queryframe.document.queryframeform) {
26 top.frames.queryframe.document.queryframeform.db.value = "<?php echo (isset($db) ? htmlspecialchars($db) : ''); ?>";
27 top.frames.queryframe.document.queryframeform.table.value = "<?php echo (isset($table) ? htmlspecialchars($table) : ''); ?>";
30 function reload_querywindow () {
31 if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
32 <?php echo ($cfg['QueryFrameDebug'] ? 'document.writeln("<a href=\'#\' onClick=\'top.frames.queryframe.querywindow.focus(); return false;\'>Query Window</a> can be updated.<br>");' : ''); ?>
34 top.frames.queryframe.querywindow.document.querywindow.db.value = "<?php echo (isset($db) ? htmlspecialchars($db) : '') ?>";
35 top.frames.queryframe.querywindow.document.querywindow.query_history_latest_db.value = "<?php echo (isset($db) ? htmlspecialchars($db) : '') ?>";
36 top.frames.queryframe.querywindow.document.querywindow.table.value = "<?php echo (isset($table) ? htmlspecialchars($table) : '') ?>";
37 top.frames.queryframe.querywindow.document.querywindow.query_history_latest_table.value = "<?php echo (isset($table) ? htmlspecialchars($table) : '') ?>";
39 <?php echo (isset($sql_query) ? 'top.frames.queryframe.querywindow.document.querywindow.query_history_latest.value = "' . urlencode($sql_query) . '";' : '// no sql query update') . "\n"; ?>
41 <?php echo ($cfg['QueryFrameDebug'] ? 'alert(\'Querywindow submits. Last chance to check variables.\');' : '') . "\n"; ?>
42 <?php echo ((!isset($error_message) || $error_message == '') ? 'top.frames.queryframe.querywindow.document.querywindow.submit();' : '// no submit, query was invalid') . "\n"; ?>
46 function focus_querywindow(sql_query) {
47 if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
48 top.frames.queryframe.querywindow.focus();
49 return false;
50 } else if (top.frames.queryframe) {
51 new_win_url = 'querywindow.php3?sql_query=' + sql_query + '&<?php echo PMA_generate_common_url(isset($db) ? $db : '', isset($table) ? $table : '', '&'); ?>';
52 top.frames.queryframe.querywindow=window.open(new_win_url, 'js_querywindow','toolbar=0,location=1,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=<?php echo $cfg['QueryWindowWidth']; ?>,height=<?php echo $cfg['QueryWindowHeight']; ?>');
54 if (!top.frames.queryframe.querywindow.opener) {
55 top.frames.queryframe.querywindow.opener = top.frames.queryframe;
58 // reload_querywindow();
59 return false;
63 reload_querywindow();
64 self.focus();
65 </script>
66 <?php
70 /**
71 * Close MySql non-persistent connections
73 if (isset($GLOBALS['dbh']) && $GLOBALS['dbh']) {
74 @mysql_close($GLOBALS['dbh']);
76 if (isset($GLOBALS['userlink']) && $GLOBALS['userlink']) {
77 @mysql_close($GLOBALS['userlink']);
81 </body>
83 </html>
84 <?php
86 /**
87 * Generates profiling data if requested
89 if (isset($GLOBALS['cfg']['DBG']['enable'])
90 && $GLOBALS['cfg']['DBG']['enable']
91 && isset($GLOBALS['cfg']['DBG']['profile']['enable'])
92 && $GLOBALS['cfg']['DBG']['profile']['enable']) {
93 //run the basic setup code first
94 include('./libraries/dbg/setup.php3');
95 //if the setup ran fine, then do the profiling
96 if (isset($GLOBALS['DBG']) && $GLOBALS['DBG']) {
97 include('./libraries/dbg/profiling.php3');
98 dbg_dump_profiling_results();
103 * Sends bufferized data
105 if (isset($GLOBALS['cfg']['OBGzip']) && $GLOBALS['cfg']['OBGzip']
106 && isset($GLOBALS['ob_mode']) && $GLOBALS['ob_mode']) {
107 PMA_outBufferPost($GLOBALS['ob_mode']);