/**
 * Prints headers to serve javascript
 *
 * @param string $filePath (default: NULL)
 */
function print_headers($filePath = null)
{
    $expiresOffset = is_debug_mode() ? -10000 : 3600 * 24 * 10;
    //no cache
    header("Content-type: text/javascript");
    header("Vary: Accept-Encoding");
    // Handle proxies
    header("Expires: " . @gmdate("D, d M Y H:i:s", @time() + $expiresOffset) . " GMT");
    if (null !== $filePath && is_file($filePath)) {
        header("Last-Modified: " . @gmdate("D, d M Y H:i:s", filectime($filePath)) . " GMT");
    }
    if (($enc = supports_gzip_encoding()) !== null) {
        header("Content-Encoding: " . $enc);
    }
}
示例#2
0
        | <?php 
echo create_link(_("Help"), "faq.php", _("Submittion guileline etc."));
?>
        | <?php 
echo create_event("About", '$("#about").show()');
?>
        
        
        
        <br>
        <?php 
echo _("Copyright © 2005-2011 Informatic Lab in SYSU. All rights reserved.");
?>
    </p>

    <?php 
if (is_debug_mode()) {
    printf("<strong><p>" . round((microtime(true) - $startTime) * 1000) . " ms</p></strong>");
}
?>
</div>
<?php 
if (!Config::$onsite) {
    echo "<script type='text/javascript' src='{$script_prefix}/ga.js'> </script>";
}
?>

</body>
</html>
<?php 
ob_end_flush();