2 /***************************************************************************
5 * begin : Saturday, Feb 13, 2001
6 * copyright : (C) 2001 The phpBB Group
7 * email : support@phpbb.com
9 * $Id: page_tail.php,v 1.27.2.4 2005/09/14 18:14:30 acydburn Exp $
12 ***************************************************************************/
14 /***************************************************************************
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
21 ***************************************************************************/
23 if ( !defined('IN_PHPBB') )
25 die('Hacking attempt');
28 global $do_gzip_compress;
31 // Show the overall footer.
33 $admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
35 $template->set_filenames(array(
36 'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
39 $template->assign_vars(array(
40 'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''),
41 'ADMIN_LINK' => $admin_link)
44 $template->pparse('overall_footer');
47 // Close our DB connection.
52 // Compress buffered output if required and send to browser
54 if ( $do_gzip_compress )
57 // Borrowed from php.net!
59 $gzip_contents = ob_get_contents();
62 $gzip_size = strlen($gzip_contents);
63 $gzip_crc = crc32($gzip_contents);
65 $gzip_contents = gzcompress($gzip_contents, 9);
66 $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
68 echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
70 echo pack('V', $gzip_crc);
71 echo pack('V', $gzip_size);