header("Expires: " . gmdate('D, d M Y H:i:s', time() + $config->cachehome) . ' GMT'); } $tpl = new Template("license.xhtml"); $tpl->license = new FileLoader("http://www.gnu.org/licenses/agpl-3.0-standalone.html"); $tpl->echoExecute(); } elseif ($path_info[0] == 'css') { // Include the JS/CSS definitions from shared config file include '../head.php'; header("Pragma: public"); header("Content-Type: text/css; charset=UTF-8"); header("Expires: " . gmdate('D, d M Y H:i:s', strtotime('+1 year')) . ' GMT'); Head::OutputCombined($_GET['PATH_INFO'], $_GET['t']); } elseif ($path_info[0] == 'js') { // Include the JS/CSS definitions from shared config file include '../head.php'; header("Pragma: public"); header("Content-Type: application/x-javascript; charset=UTF-8"); header("Expires: " . gmdate('D, d M Y H:i:s', strtotime('+1 year')) . ' GMT'); Head::OutputCombined($_GET['PATH_INFO'], $_GET['t']); } else { throw new Exception("Invalid Request"); } } catch (PDOException $ex) { header("Content-Type: application/json; charset=UTF-8"); echo json_encode(array('response' => 'error', 'error' => "Database Error: SQLSTATE:" . $ex->getCode())); error_log((string) $ex); } catch (Exception $ex) { header("Content-Type: application/json; charset=UTF-8"); echo json_encode(array('response' => 'error', 'error' => (string) $ex)); } }