Remove timing and other details for final release ...can always be put back for those that want it

git-svn-id: file:///svn/phpbb/trunk@2481 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2002-04-04 11:53:13 +00:00
parent 212515e02c
commit 6200b07830

View file

@ -22,70 +22,35 @@
if ( !defined('IN_PHPBB') ) if ( !defined('IN_PHPBB') )
{ {
die("Hacking attempt"); die('Hacking attempt');
} }
// //
// Show the overall footer. // Show the overall footer.
// //
if($userdata['user_level'] == ADMIN) $admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="' . append_sid("admin/index.$phpEx") . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
{
$admin_link = "<a href=\"" . append_sid("admin/index.$phpEx") . "\">" . $lang['Admin_panel'] . "</a><br /><br />";
}
else
{
$admin_link = "";
}
$current_time = time();
if( empty($gen_simple_header) ) $template->set_filenames(array(
{ 'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
$template->set_filenames(array(
"overall_footer" => "overall_footer.tpl")
);
}
else
{
$template->set_filenames(array(
"overall_footer" => "simple_footer.tpl")
);
}
$template->assign_vars(array(
"PHPBB_VERSION" => "2.0 " . $board_config['version'],
"TRANSLATION_INFO" => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : "",
"ADMIN_LINK" => $admin_link)
); );
$template->pparse("overall_footer"); $template->assign_vars(array(
'PHPBB_VERSION' => '2' . $board_config['version'],
'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '',
'ADMIN_LINK' => $admin_link)
);
// $template->pparse('overall_footer');
// Output page creation time
//
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
$gzip_text = ($board_config['gzip_compress']) ? "GZIP compression enabled" : "GZIP compression disabled";
$debug_mode = (DEBUG) ? " : Debug Mode" : "";
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);
// //
// Close our DB connection. // Close our DB connection.
// //
$db->sql_close(); $db->sql_close();
//for($i=0;$i<count($db->query_array);$i++)
// echo $db->query_array[$i] . "<BR>";
// //
// Compress buffered output if required // Compress buffered output if required and send to browser
// and send to browser
// //
if($do_gzip_compress) if ( $do_gzip_compress )
{ {
// //
// Borrowed from php.net! // Borrowed from php.net!
@ -99,12 +64,12 @@ if($do_gzip_compress)
$gzip_contents = gzcompress($gzip_contents, 9); $gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4); $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; echo '\x1f\x8b\x08\x00\x00\x00\x00\x00';
echo $gzip_contents; echo $gzip_contents;
echo pack("V", $gzip_crc); echo pack('V', $gzip_crc);
echo pack("V", $gzip_size); echo pack('V', $gzip_size);
} }
exit; exit;
?> ?>