3 require_once('code/wfpl/file.php');
4 require_once('code/ie_detect.php');
6 # this file is meant to act as a filter for .css files. it removes all lines
7 # containing "remove this line for IE 5.5 and 6"
9 # see also: .htaccess style.css
11 function css_mangler() {
12 $file = $_SERVER['REDIRECT_URL'];
14 $file = substr($file, 1);
16 $file = ereg_replace('_[0-9]*[.]css', '.css', $file);
18 $mtime = filemtime($file);
19 if($mtime === false) {
20 header('Content-Type: text/plain');
21 print("cannot stat $file");
25 header('Content-Type: text/css');
26 header('Last-Modified: '.gmdate('D, d M Y H:i:s', $mtime) . ' GMT');
27 header('Last-Modified: '.gmdate('D, d M Y H:i:s', $mtime) . ' GMT');
30 echo(ereg_replace("\n[^\n]*remove this line for IE 5.5 and 6[^\n]*\n", "\n", read_whole_file($file)));