sorry, wrong version checked in
[phpmyadmin/arisferyanto.git] / footer.inc.php
bloba4da9f18148b279b6216554ccb9fb06ff161f0a4
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=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
13 require_once('./libraries/relation.lib.php'); // for PMA_setHistory()
15 /**
16 * Query window
19 // If query window is open, update with latest selected db/table.
21 <script type="text/javascript">
22 //<![CDATA[
23 <?php
24 if ( ! isset( $GLOBALS['no_history'] ) && ! empty( $GLOBALS['db'] ) && empty( $GLOBALS['error_message'] ) ) {
25 $table = isset( $GLOBALS['table'] ) ? $GLOBALS['table'] : '';
26 // updates current settings
28 window.parent.setAll( '<?php echo $GLOBALS['lang']; ?>', '<?php echo $GLOBALS['collation_connection']; ?>', '<?php echo $GLOBALS['server']; ?>', '<?php echo $GLOBALS['db']; ?>', '<?php echo $table; ?>' );
29 <?php
32 if ( ! empty( $GLOBALS['reload'] ) ) {
34 window.parent.refreshLeft();
35 <?php
38 if ( ! isset( $GLOBALS['no_history'] ) && empty( $GLOBALS['error_message'] ) ) {
39 if ( isset( $GLOBALS['LockFromUpdate'] ) && $GLOBALS['LockFromUpdate'] == '1' && isset( $GLOBALS['sql_query'] ) ) {
40 // When the button 'LockFromUpdate' was selected in the querywindow,
41 // it does not submit it's contents to
42 // itself. So we create a SQL-history entry here.
43 if ($GLOBALS['cfg']['QueryHistoryDB'] && $GLOBALS['cfgRelation']['historywork']) {
44 PMA_setHistory( ( isset( $GLOBALS['db'] ) ? $GLOBALS['db'] : '' ),
45 ( isset( $GLOBALS['table'] ) ? $GLOBALS['table'] : '' ),
46 $GLOBALS['cfg']['Server']['user'],
47 $GLOBALS['sql_query'] );
51 window.parent.reload_querywindow(
52 "<?php echo isset( $GLOBALS['db'] ) ? addslashes( $GLOBALS['db'] ) : '' ?>",
53 "<?php echo isset( $GLOBALS['table'] ) ? addslashes( $GLOBALS['table'] ) : '' ?>",
54 "<?php echo isset( $GLOBALS['sql_query'] ) ? urlencode( $GLOBALS['sql_query'] ) : ''; ?>" );
55 <?php
58 if ( ! empty( $GLOBALS['focus_querywindow'] ) ) {
60 if ( parent.querywindow && !parent.querywindow.closed && parent.querywindow.location) {
61 self.focus();
63 <?php
66 //]]>
67 </script>
68 <?php
71 /**
72 * Close database connections
74 if ( isset( $GLOBALS['dbh'] ) && $GLOBALS['dbh'] ) {
75 @PMA_DBI_close( $GLOBALS['dbh'] );
77 if ( isset( $GLOBALS['userlink'] ) && $GLOBALS['userlink'] ) {
78 @PMA_DBI_close( $GLOBALS['userlink'] );
81 include('./config.footer.inc.php');
83 /**
84 * Generates profiling data if requested
86 if ( ! empty( $GLOBALS['cfg']['DBG']['enable'] )
87 && ! empty( $GLOBALS['cfg']['DBG']['profile']['enable'] ) ) {
88 //run the basic setup code first
89 require_once('./libraries/dbg/setup.php');
90 //if the setup ran fine, then do the profiling
91 if ( ! empty( $GLOBALS['DBG'] ) ) {
92 require_once('./libraries/dbg/profiling.php');
93 dbg_dump_profiling_results();
98 </body>
99 </html>
100 <?php
102 * Sends bufferized data
104 if ( ! empty( $GLOBALS['cfg']['OBGzip'] )
105 && ! empty( $GLOBALS['ob_mode'] ) ) {
106 PMA_outBufferPost( $GLOBALS['ob_mode'] );
110 * Stops the script execution
112 exit;