<?php

define('WP_USE_THEMES', false);
require '../../../../../wp-blog-header.php';
if(!defined('ABSPATH')) die('-1');

$lastModified = get_option('alc_last_modified');

$etagFile = md5_file(__FILE__);
$ifModifiedSince = isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])
    ? $_SERVER['HTTP_IF_MODIFIED_SINCE']
    : false;
$etagHeader = isset($_SERVER['HTTP_IF_NONE_MATCH'])
    ? trim($_SERVER['HTTP_IF_NONE_MATCH'])
    : false;

header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $lastModified) . ' GMT');
header('Etag: $etagFile');
header('Cache-Control: public');

if(@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $lastModified || $etagHeader == $etagFile)
{
       header("HTTP/1.1 304 Not Modified");
       die();
}

header("HTTP/1.1 200 OK");
header('Content-type: text/javascript');

$ALCLibrary = new AwesomeLiveChat_Library();

?>


<?php echo stripslashes($ALCLibrary->settings('js')); ?>

<?php die(); ?>
