+ added the individual posts page so it can contain comments
[vsc.git] / style.php
blobe3ce5233e141496406e09e5f00674f1acf272186
1 <?php
2 /**
3 * this will output the desired css style
4 * incoming variables
5 * @var theme _COOKIE
6 * @var media _GET
7 */
9 ob_start();
10 require ('./config.inc.php');
11 header('Content-type: text/css');
12 $theme = (!empty($_COOKIE['theme']) ? $_COOKIE['theme'] : DEFAULT_THEME);
13 if (!empty($_GET)) {
14 list($media) = array_keys($_GET);
15 } else {
16 $media = 'screen';
19 if (!is_file(THEME_PATH. $theme . DIRECTORY_SEPARATOR .'_css'. DIRECTORY_SEPARATOR .$media.'.css')) {
20 $theme = DEFAULT_THEME;
21 $media = 'screen';
24 $out = file_get_contents ( THEME_PATH. $theme . DIRECTORY_SEPARATOR .'_css'. DIRECTORY_SEPARATOR .$media.'.css');
25 ob_end_clean();
26 echo $out;