File: D:/HostingSpaces/PvdBoogaard/indoorski.nl/backup/oude-site/cms/lib/iepngfix_v2/iepngfix.php
<?php
// Use this file in your CSS in place of the .HTC file if it works offline but not online.
// It will send the correct MIME type so that IE will execute the script correctly.
// modified for iwp5
// if the site is down for maintenacne we still want to show js as the admin will still use it
// so ignore the down for maintenanace message for this page load
define('IGNORE_MAINTENANCE', true);
define('IGNORE_INSTALL', true);
define('IN_CONTROL_PANEL', true);
require_once(dirname(__FILE__) . '../../../api/iwp.php');
function SendCacheHeaders($LastModifiedDate) {
if ($LastModifiedDate) {
$date = gmdate("D, d M Y H:i:s \G\M\T",$LastModifiedDate);
if ((isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $LastModifiedDate)) {
if (php_sapi_name() == 'CGI') {
header("Status: 304 Not Modified");
} else {
header("HTTP/1.0 304 Not Modified");
}
header('Last-Modified: '.$date);
header('Cache-Control: max-age=604800, must-revalidate');
header("Pragma: public");
header('Expires: '.gmdate("D, d M Y H:i:s \G\M\T",time()+604800));
die();
} else {
header('Last-Modified: '.$date);
header('Cache-Control: max-age=604800, must-revalidate');
header("Pragma: public");
header('Expires: '.gmdate("D, d M Y H:i:s \G\M\T",time()+604800));
}
}
}
header('Content-type: text/x-component');
$iwp = IWP::Init('basic,outputbuffer,language,whitelabel,functions', true);
$mtime = filemtime('iepngfix.htc');
SendCacheHeaders($mtime);
$htc = file_get_contents('iepngfix.htc');
$htc = $iwp->template->ParseInput($htc);
echo $htc;