3 * @name tsControllerCss
4 * @package CSS output class
7 class tsControllerCss
extends tsController
{
10 private $media = 'screen';
13 * the constructor that does it all.
14 * starts output buffering, and initializes different things
17 public function __construct(){
19 header('Content-type: text/css');
21 $this->theme
= (!empty($_COOKIE['theme']) ?
$_COOKIE['theme'] : DEFAULT_THEME
);
23 list($this->media
) = array_keys($_GET);
25 $this->media
= 'screen';
29 if (!is_file(THEME_PATH
. $tthis->heme
. DIRECTORY_SEPARATOR
.'_css'. DIRECTORY_SEPARATOR
.$this->media
.'.css')) {
30 $this->theme
= DEFAULT_THEME
;
31 $this->media
= 'screen';
36 public function dispatch (){
37 $out = file_get_contents ( THEME_PATH
. $this->theme
. DIRECTORY_SEPARATOR
.'_css'. DIRECTORY_SEPARATOR
.$this->media
.'.css');
38 $this->postDispatch ( $out );
42 private function postDispatch ($incString){
43 if (stristr ($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
44 $incString = str_replace(array('min-width:', 'max-width:'), 'width:', $incString);