2001-02-21 07:38:38 +00:00
< ? php
2001-04-19 06:24:23 +00:00
/***************************************************************************
2001-02-21 07:38:38 +00:00
* page_tail . php
2001-04-19 06:24:23 +00:00
* -------------------
* begin : Saturday , Feb 13 , 2001
* copyright : ( C ) 2001 The phpBB Group
* email : support @ phpbb . com
*
2001-02-21 07:38:38 +00:00
* $Id $
2001-04-19 06:24:23 +00:00
*
*
***************************************************************************/
2001-02-21 07:38:38 +00:00
2001-08-30 22:20:23 +00:00
/***************************************************************************
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later version .
*
***************************************************************************/
2001-04-15 17:44:46 +00:00
//
2001-02-22 07:53:34 +00:00
// Show the overall footer.
2001-04-15 17:44:46 +00:00
//
2001-05-31 22:57:38 +00:00
if ( $userdata [ 'user_level' ] == ADMIN )
2001-02-22 07:53:34 +00:00
{
2001-07-31 14:17:41 +00:00
$admin_link = " <a href= \" " . append_sid ( " admin/index. $phpEx " ) . " \" > " . $lang [ 'Admin_panel' ] . " </a><br /><br /> " ;
}
else
{
$admin_link = " " ;
2001-02-22 07:53:34 +00:00
}
2001-04-19 06:24:23 +00:00
$current_time = time ();
2001-07-04 22:44:15 +00:00
2001-10-16 11:12:32 +00:00
if ( empty ( $gen_simple_header ) )
{
$template -> set_filenames ( array (
" overall_footer " => " overall_footer.tpl " )
);
}
else
{
$template -> set_filenames ( array (
" overall_footer " => " simple_footer.tpl " )
);
}
2001-07-04 22:44:15 +00:00
2001-05-03 22:10:23 +00:00
$template -> assign_vars ( array (
2001-11-01 22:57:35 +00:00
" PHPBB_VERSION " => " 2.0 CVS " ,
2002-01-16 17:56:46 +00:00
" TRANSLATION_INFO " => $lang [ 'TRANSLATION_INFO' ],
" ADMIN_LINK " => $admin_link )
);
2001-04-15 17:44:46 +00:00
2001-03-17 00:46:26 +00:00
$template -> pparse ( " overall_footer " );
2001-02-21 07:38:38 +00:00
2001-04-15 17:44:46 +00:00
//
// Output page creation time
//
2001-02-23 01:31:43 +00:00
$mtime = microtime ();
$mtime = explode ( " " , $mtime );
$mtime = $mtime [ 1 ] + $mtime [ 0 ];
$endtime = $mtime ;
$totaltime = ( $endtime - $starttime );
2001-07-11 16:07:58 +00:00
$gzip_text = ( $board_config [ 'gzip_compress' ]) ? " GZIP compression enabled " : " GZIP compression disabled " ;
2001-07-20 15:16:03 +00:00
$debug_mode = ( DEBUG ) ? " : Debug Mode " : " " ;
2001-07-11 16:07:58 +00:00
2001-07-31 14:17:41 +00:00
printf ( " <br /><center><font size= \" -2 \" >phpBB Created this page in %f seconds : " . $db -> num_queries . " queries executed : $gzip_text " . $debug_mode . " </font></center> " , $totaltime );
2001-07-08 15:56:58 +00:00
//
// Close our DB connection.
//
$db -> sql_close ();
2001-02-23 01:31:43 +00:00
2001-07-20 15:16:03 +00:00
//for($i=0;$i<count($db->query_array);$i++)
// echo $db->query_array[$i] . "<BR>";
2001-06-30 23:36:10 +00:00
//
// Compress buffered output if required
// and send to browser
//
if ( $do_gzip_compress )
{
2001-07-04 22:44:15 +00:00
//
// Borrowed from php.net!
//
2001-08-30 22:20:23 +00:00
$gzip_contents = ob_get_contents ();
ob_end_clean ();
2001-06-30 23:36:10 +00:00
2001-08-30 22:20:23 +00:00
$gzip_size = strlen ( $gzip_contents );
$gzip_crc = crc32 ( $gzip_contents );
2001-06-30 23:36:10 +00:00
2001-08-30 22:20:23 +00:00
$gzip_contents = gzcompress ( $gzip_contents , 9 );
$gzip_contents = substr ( $gzip_contents , 0 , strlen ( $gzip_contents ) - 4 );
2001-06-30 23:36:10 +00:00
2001-08-30 22:20:23 +00:00
echo " \x1f \x8b \x08 \x00 \x00 \x00 \x00 \x00 " ;
echo $gzip_contents ;
2001-06-30 23:36:10 +00:00
echo pack ( " V " , $gzip_crc );
echo pack ( " V " , $gzip_size );
}
2001-04-15 17:44:46 +00:00
exit ;
2001-11-01 22:57:35 +00:00
?>