Esempio n. 1
0
}
if (empty($_GET['PATH_INFO'])) {
    try {
        if ($config->cachehome) {
            header("Pragma: public");
            header("Expires: " . gmdate('D, d M Y H:i:s', time() + $config->cachehome) . ' GMT');
        } elseif (DEBUG) {
            header("Expires: " . gmdate('D, d M Y H:i:s', time() - 86400) . ' GMT');
        }
        // Include the JS/CSS definitions from shared config file
        include '../head.php';
        $tpl = new Template("index.xhtml");
        $datapaths = array();
        if (!empty($config->tools['map'])) {
            $datapaths['mapdata'] = Head::GetVersionLink('images/map/map.xml');
            $datapaths['mapoverlay'] = Head::GetVersionLink('images/map/zones/overlay.json');
        }
        $tpl->js = array('ajaxRoot' => Util::AjaxBaseURI(), 'datapaths' => $datapaths);
        // Load enablement of tools
        $tpl->tools = $config->tools;
        $tpl->title = $config->title;
        $tpl->devheader = $config->devheader;
        $tpl->credits = is_array($config->credits) ? $config->credits : array(array('name' => 'Anonymous', 'job' => 'I did something?'));
        // Analytics support
        $tpl->analytics = !empty($config->analytics) ? $config->analytics : array('enabled' => false);
        $tpl->echoExecute();
    } catch (Exception $ex) {
        die((string) $ex);
    }
} else {
    try {