Rev Author Line No. Line
130 kaklik 1 <?php
2 /***************************************************************************
3 * page_footer_admin.php
4 * -------------------
5 * begin : Saturday, Jul 14, 2001
6 * copyright : (C) 2001 The phpBB Group
7 * email : support@phpbb.com
8 *
9 * $Id: page_footer_admin.php,v 1.9.2.5 2005/09/19 20:49:06 grahamje Exp $
10 *
11 *
12 ***************************************************************************/
13  
14 /***************************************************************************
15 *
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.
20 *
21 ***************************************************************************/
22  
23 if ( !defined('IN_PHPBB') )
24 {
25 die("Hacking attempt");
26 }
27  
28 global $do_gzip_compress;
29  
30 //
31 // Show the overall footer.
32 //
33 $template->set_filenames(array(
34 'page_footer' => 'admin/page_footer.tpl')
35 );
36  
37 $template->assign_vars(array(
38 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . $board_config['version'] : '',
39 'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''))
40 );
41  
42 $template->pparse('page_footer');
43  
44 //
45 // Close our DB connection.
46 //
47 $db->sql_close();
48  
49 //
50 // Compress buffered output if required
51 // and send to browser
52 //
53 if( $do_gzip_compress )
54 {
55 //
56 // Borrowed from php.net!
57 //
58 $gzip_contents = ob_get_contents();
59 ob_end_clean();
60  
61 $gzip_size = strlen($gzip_contents);
62 $gzip_crc = crc32($gzip_contents);
63  
64 $gzip_contents = gzcompress($gzip_contents, 9);
65 $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
66  
67 echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
68 echo $gzip_contents;
69 echo pack('V', $gzip_crc);
70 echo pack('V', $gzip_size);
71 }
72  
73 exit;
74  
75 ?>