1 | <?php |
---|
2 | /*************************************************************************** |
---|
3 | * page_header.php * |
---|
4 | * ------------------ * |
---|
5 | * application : PhpWebGallery 1.4 <http://phpwebgallery.net> * |
---|
6 | * author : Pierrick LE GALL <pierrick@z0rglub.com> * |
---|
7 | * * |
---|
8 | * $Id: page_header.php 351 2004-02-07 11:50:26Z gweltas $ |
---|
9 | * * |
---|
10 | ***************************************************************************/ |
---|
11 | |
---|
12 | /*************************************************************************** |
---|
13 | * * |
---|
14 | * This program is free software; you can redistribute it and/or modify * |
---|
15 | * it under the terms of the GNU General Public License as published by * |
---|
16 | * the Free Software Foundation; * |
---|
17 | * * |
---|
18 | ***************************************************************************/ |
---|
19 | |
---|
20 | // |
---|
21 | // Start output of page |
---|
22 | // |
---|
23 | $template->set_filenames(array('header'=>'header.tpl')); |
---|
24 | |
---|
25 | $template->assign_vars(array( |
---|
26 | 'S_CONTENT_ENCODING' => $lang['charset'], |
---|
27 | 'T_STYLE' => './template/'.$user['template'].'/'.$user['template'].'.css', |
---|
28 | 'PAGE_TITLE' => $title) |
---|
29 | ); |
---|
30 | |
---|
31 | // refresh |
---|
32 | if ( isset( $refresh ) && $refresh >0 && isset($url_link)) |
---|
33 | { |
---|
34 | $url = $url_link.'&slideshow='.$refresh; |
---|
35 | $template->assign_vars(array( |
---|
36 | 'S_REFRESH_TIME' => $refresh, |
---|
37 | 'U_REFRESH' => add_session_id( $url ) |
---|
38 | ) |
---|
39 | ); |
---|
40 | $template->assign_block_vars('refresh', array()); |
---|
41 | } |
---|
42 | |
---|
43 | // Work around for "current" Apache 2 + PHP module which seems to not |
---|
44 | // cope with private cache control setting |
---|
45 | if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2')) |
---|
46 | { |
---|
47 | header ('Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0'); |
---|
48 | } |
---|
49 | else |
---|
50 | { |
---|
51 | header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0'); |
---|
52 | } |
---|
53 | header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT'); |
---|
54 | header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |
---|
55 | |
---|
56 | $template->pparse('header'); |
---|
57 | $vtp=new VTemplate; |
---|
58 | ?> |
---|