1 rizwank 1.1 <?php
2 /***************************************************************************
3 * page_header_admin.php
4 * -------------------
5 * begin : Saturday, Feb 13, 2001
6 * copyright : (C) 2001 The phpBB Group
7 * email : support@phpbb.com
8 *
9 * $Id: page_header_admin.php,v 1.12.2.3 2002/12/10 11:13:58 bartvb 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 rizwank 1.1
23 if ( !defined('IN_PHPBB') )
24 {
25 die("Hacking attempt");
26 }
27
28 define('HEADER_INC', true);
29
30 //
31 // gzip_compression
32 //
33 $do_gzip_compress = FALSE;
34 if ( $board_config['gzip_compress'] )
35 {
36 $phpver = phpversion();
37
38 $useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT;
39
40 if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
41 {
42 if ( extension_loaded('zlib') )
43 rizwank 1.1 {
44 ob_start('ob_gzhandler');
45 }
46 }
47 else if ( $phpver > '4.0' )
48 {
49 if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
50 {
51 if ( extension_loaded('zlib') )
52 {
53 $do_gzip_compress = TRUE;
54 ob_start();
55 ob_implicit_flush(0);
56
57 header('Content-Encoding: gzip');
58 }
59 }
60 }
61 }
62
63 $template->set_filenames(array(
64 rizwank 1.1 'header' => 'admin/page_header.tpl')
65 );
66
67 //
68 // The following assigns all _common_ variables that may be used at any point
69 // in a template. Note that all URL's should be wrapped in append_sid, as
70 // should all S_x_ACTIONS for forms.
71 //
72 $template->assign_vars(array(
73 'SITENAME' => $board_config['sitename'],
74 'PAGE_TITLE' => $page_title,
75
76 'L_ADMIN' => $lang['Admin'],
77 'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
78 'L_FAQ' => $lang['FAQ'],
79
80 'U_INDEX' => append_sid('../index.'.$phpEx),
81
82 'S_TIMEZONE' => sprintf($lang['All_times'], $lang[$board_config['board_timezone']]),
83 'S_LOGIN_ACTION' => append_sid('../login.'.$phpEx),
84 'S_JUMPBOX_ACTION' => append_sid('../viewforum.'.$phpEx),
85 rizwank 1.1 'S_CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])),
86 'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
87 'S_CONTENT_ENCODING' => $lang['ENCODING'],
88 'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
89 'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
90
91 'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
92 'T_BODY_BACKGROUND' => $theme['body_background'],
93 'T_BODY_BGCOLOR' => '#'.$theme['body_bgcolor'],
94 'T_BODY_TEXT' => '#'.$theme['body_text'],
95 'T_BODY_LINK' => '#'.$theme['body_link'],
96 'T_BODY_VLINK' => '#'.$theme['body_vlink'],
97 'T_BODY_ALINK' => '#'.$theme['body_alink'],
98 'T_BODY_HLINK' => '#'.$theme['body_hlink'],
99 'T_TR_COLOR1' => '#'.$theme['tr_color1'],
100 'T_TR_COLOR2' => '#'.$theme['tr_color2'],
101 'T_TR_COLOR3' => '#'.$theme['tr_color3'],
102 'T_TR_CLASS1' => $theme['tr_class1'],
103 'T_TR_CLASS2' => $theme['tr_class2'],
104 'T_TR_CLASS3' => $theme['tr_class3'],
105 'T_TH_COLOR1' => '#'.$theme['th_color1'],
106 rizwank 1.1 'T_TH_COLOR2' => '#'.$theme['th_color2'],
107 'T_TH_COLOR3' => '#'.$theme['th_color3'],
108 'T_TH_CLASS1' => $theme['th_class1'],
109 'T_TH_CLASS2' => $theme['th_class2'],
110 'T_TH_CLASS3' => $theme['th_class3'],
111 'T_TD_COLOR1' => '#'.$theme['td_color1'],
112 'T_TD_COLOR2' => '#'.$theme['td_color2'],
113 'T_TD_COLOR3' => '#'.$theme['td_color3'],
114 'T_TD_CLASS1' => $theme['td_class1'],
115 'T_TD_CLASS2' => $theme['td_class2'],
116 'T_TD_CLASS3' => $theme['td_class3'],
117 'T_FONTFACE1' => $theme['fontface1'],
118 'T_FONTFACE2' => $theme['fontface2'],
119 'T_FONTFACE3' => $theme['fontface3'],
120 'T_FONTSIZE1' => $theme['fontsize1'],
121 'T_FONTSIZE2' => $theme['fontsize2'],
122 'T_FONTSIZE3' => $theme['fontsize3'],
123 'T_FONTCOLOR1' => '#'.$theme['fontcolor1'],
124 'T_FONTCOLOR2' => '#'.$theme['fontcolor2'],
125 'T_FONTCOLOR3' => '#'.$theme['fontcolor3'],
126 'T_SPAN_CLASS1' => $theme['span_class1'],
127 rizwank 1.1 'T_SPAN_CLASS2' => $theme['span_class2'],
128 'T_SPAN_CLASS3' => $theme['span_class3'])
129 );
130
131
132 $template->pparse('header');
133
134 ?>
|