2 $uid = get_theme_uid();
4 $style = get_pconfig($uid, 'vier', 'style');
7 $style = get_config('vier', 'style');
13 $stylecssfile = 'view/theme/vier/flat.css';
14 else if ($style == "netcolour")
15 $stylecssfile = 'view/theme/vier/netcolour.css';
16 else if ($style == "breathe")
17 $stylecssfile = 'view/theme/vier/breathe.css';
18 else if ($style == "plus")
19 $stylecssfile = 'view/theme/vier/plus.css';
20 else if ($style == "dark")
21 $stylecssfile = 'view/theme/vier/dark.css';
23 if (file_exists($THEMEPATH."//style.css")) {
24 $stylecss = file_get_contents($THEMEPATH."//style.css")."\n";
25 $modified = filemtime($THEMEPATH."//style.css");
28 $stylemodified = filemtime($stylecssfile);
29 $stylecss .= file_get_contents($stylecssfile);
31 if ($stylemodified > $modified)
32 $modified = $stylemodified;
34 $modified = gmdate('r', $modified);
36 $etag = md5($stylecss);
38 // Only send the CSS file if it was changed
39 header('Cache-Control: public');
40 header('ETag: "'.$etag.'"');
41 header('Last-Modified: '.$modified);
43 if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) || isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
45 $cached_modified = gmdate('r', strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']));
46 $cached_etag = str_replace(array('"', "-gzip"), array('', ''),
47 stripslashes($_SERVER['HTTP_IF_NONE_MATCH']));
49 if (($cached_modified == $modified) AND ($cached_etag == $etag)) {
50 header('HTTP/1.1 304 Not Modified');