Xataface 2.0
Xataface Application Framework
js.php
Go to the documentation of this file.
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']).'.js';
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 session_cache_limiter('public');
00013 header("Pragma: public", true);
00014 header("Cache-Control:max-age=".$expires.', public, s-maxage='.$expires, true);
00015 header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT', true);
00016 header('Content-type: text/javascript', true);
00017 //header('Content-Length: '.strlen($out), true);
00018 header('Connection: close', true);
00019 echo file_get_contents($path);
00020 
00021 
00022 exit;
00023 
 All Data Structures Namespaces Files Functions Variables Enumerations