![]() |
Xataface 2.0
Xataface Application Framework
|
00001 <?php 00002 if ( !defined('DATAFACE_SITE_PATH') ) die("Cannot be called directly"); 00003 if ( !$_GET['--id'] ) die("No id specified"); 00004 $path = DATAFACE_SITE_PATH.DIRECTORY_SEPARATOR.'templates_c'.DIRECTORY_SEPARATOR.basename($_GET['--id']).'.css'; 00005 if ( !file_exists($path) ){ 00006 dir("File could not be found"); 00007 } 00008 // seconds, minutes, hours, days 00009 ob_start("ob_gzhandler"); 00010 00011 $expires = 60*60*24*14; 00012 header("Pragma: public"); 00013 header("Cache-Control: maxage=".$expires); 00014 header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT'); 00015 header('Content-type: text/css'); 00016 echo file_get_contents($path); 00017 exit; 00018