Revert "* changed the end of lines to unix"
[vsc.git] / style.php
blob3522918408a8776ce180c4396cabb454d5266f5c
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;