Select Git revision
exportJSONAlert.php
exportJSONAlert.php 410 B
<?php
require_once dirname(__FILE__).'/../config.inc.php';
require_once 'functions.inc.php';
if (!isset($output)) {
$output = getCAPData($config);
}
$jsonContents = $output->toJSON('alert');
$jsonContents = 'unlAlerts.data = ' . $jsonContents . ";\n";
$jsonContents .= 'try {
unlAlerts.server.init();
} catch(e) {}'."\n";
file_put_contents(dirname(__FILE__).'/../www/json/unlcap.js', $jsonContents);