<?php
include (dirname(__FILE__) . "/../config.inc");
$rest = new Rest();
$page = PageFactory::getInstance()->create($rest->getDefaulted("action", "generic"));
session_start();
try
{
	echo $page->process();
}
catch (PageDataNotValidException $e)
{
	echo NotFoundPage::getInstance()->process();
}
catch (Exception $e)
{
	echo ErrorPage::getInstance()->process($e);
}
