split Chinese
[phpmyadmin/crack.git] / footer.inc.php3
blobd933591431d19ca8e3cb2b33353851b42441c561
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 type="text/javascript">
16 <!--
17 <?php
18 if ($cfg['QueryFrameDebug']) {
20 document.writeln("Updating query window. DB: <?php echo (isset($db) ? addslashes($db) : 'FALSE'); ?>, Table: <?php echo (isset($table) ? addslashes($table) : 'FALSE'); ?><br>");
21 document.writeln("Window: " + top.frames.queryframe.querywindow.location + "<br>");
22 <?php
26 if (top.frames.queryframe && top.frames.queryframe.document && top.frames.queryframe.document.queryframeform) {
27 top.frames.queryframe.document.queryframeform.db.value = "<?php echo (isset($db) ? addslashes($db) : ''); ?>";
28 top.frames.queryframe.document.queryframeform.table.value = "<?php echo (isset($table) ? addslashes($table) : ''); ?>";
31 function reload_querywindow () {
32 if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
33 <?php echo ($cfg['QueryFrameDebug'] ? 'document.writeln("<a href=\'#\' onClick=\'top.frames.queryframe.querywindow.focus(); return false;\'>Query Window</a> can be updated.<br>");' : ''); ?>
35 <?php
36 if (!isset($error_message) || $error_message == '') {
38 top.frames.queryframe.querywindow.document.querywindow.db.value = "<?php echo (isset($db) ? addslashes($db) : '') ?>";
39 top.frames.queryframe.querywindow.document.querywindow.query_history_latest_db.value = "<?php echo (isset($db) ? addslashes($db) : '') ?>";
40 top.frames.queryframe.querywindow.document.querywindow.table.value = "<?php echo (isset($table) ? addslashes($table) : '') ?>";
41 top.frames.queryframe.querywindow.document.querywindow.query_history_latest_table.value = "<?php echo (isset($table) ? addslashes($table) : '') ?>";
43 <?php echo (isset($sql_query) ? 'top.frames.queryframe.querywindow.document.querywindow.query_history_latest.value = "' . urlencode($sql_query) . '";' : '// no sql query update') . "\n"; ?>
45 <?php echo ($cfg['QueryFrameDebug'] ? 'alert(\'Querywindow submits. Last chance to check variables.\');' : '') . "\n"; ?>
46 top.frames.queryframe.querywindow.document.querywindow.submit();
47 <?php
48 } else {
50 // no submit, query was invalid
51 <?php
57 function focus_querywindow(sql_query) {
58 if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
59 if (top.frames.queryframe.querywindow.document.querywindow.querydisplay_tab != 'sql') {
60 top.frames.queryframe.querywindow.document.querywindow.querydisplay_tab.value = "sql";
61 top.frames.queryframe.querywindow.document.querywindow.query_history_latest.value = sql_query;
62 top.frames.queryframe.querywindow.document.querywindow.submit();
63 top.frames.queryframe.querywindow.focus();
64 } else {
65 top.frames.queryframe.querywindow.focus();
68 return false;
69 } else if (top.frames.queryframe) {
70 new_win_url = 'querywindow.php3?sql_query=' + sql_query + '&<?php echo PMA_generate_common_url(isset($db) ? addslashes($db) : '', isset($table) ? addslashes($table) : '', '&'); ?>';
71 top.frames.queryframe.querywindow=window.open(new_win_url, '','toolbar=0,location=1,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=<?php echo $cfg['QueryWindowWidth']; ?>,height=<?php echo $cfg['QueryWindowHeight']; ?>');
73 if (!top.frames.queryframe.querywindow.opener) {
74 top.frames.queryframe.querywindow.opener = top.frames.queryframe;
77 // reload_querywindow();
78 return false;
82 reload_querywindow();
83 <?php
84 if (isset($focus_querywindow) && $focus_querywindow == "true") {
86 if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
87 self.focus();
89 <?php
93 //-->
94 </script>
95 <?php
99 /**
100 * Close MySql non-persistent connections
102 if (isset($GLOBALS['dbh']) && $GLOBALS['dbh']) {
103 @mysql_close($GLOBALS['dbh']);
105 if (isset($GLOBALS['userlink']) && $GLOBALS['userlink']) {
106 @mysql_close($GLOBALS['userlink']);
110 </body>
112 </html>
113 <?php
116 * Generates profiling data if requested
118 if (isset($GLOBALS['cfg']['DBG']['enable'])
119 && $GLOBALS['cfg']['DBG']['enable']
120 && isset($GLOBALS['cfg']['DBG']['profile']['enable'])
121 && $GLOBALS['cfg']['DBG']['profile']['enable']) {
122 //run the basic setup code first
123 include('./libraries/dbg/setup.php3');
124 //if the setup ran fine, then do the profiling
125 if (isset($GLOBALS['DBG']) && $GLOBALS['DBG']) {
126 include('./libraries/dbg/profiling.php3');
127 dbg_dump_profiling_results();
132 * Sends bufferized data
134 if (isset($GLOBALS['cfg']['OBGzip']) && $GLOBALS['cfg']['OBGzip']
135 && isset($GLOBALS['ob_mode']) && $GLOBALS['ob_mode']) {
136 PMA_outBufferPost($GLOBALS['ob_mode']);