Xataface  2.0alpha2
Xataface Application Framework
 All Data Structures Namespaces Files Functions Variables Groups Pages
css.php
Go to the documentation of this file.
1 <?php
2 if ( !defined('DATAFACE_SITE_PATH') ) die("Cannot be called directly");
3 if ( !$_GET['--id'] ) die("No id specified");
4 $path = DATAFACE_SITE_PATH.DIRECTORY_SEPARATOR.'templates_c'.DIRECTORY_SEPARATOR.basename($_GET['--id']).'.css';
5 if ( !file_exists($path) ){
6  dir("File could not be found");
7 }
8 // seconds, minutes, hours, days
9 //ob_start("ob_gzhandler"); //Removed due to PHP BUG 55544
10 ob_start();
11 $expires = 60*60*24*14;
12 header("Pragma: public");
13 header("Cache-Control: maxage=".$expires);
14 header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT');
15 header('Content-type: text/css');
16 echo file_get_contents($path);
17 exit;
18