2009-12-18 20:57:41 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @copyright 2009 City of Bloomington, Indiana
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
|
|
|
|
* @author Cliff Ingham <inghamn@bloomington.in.gov>
|
|
|
|
* @param $_GET cemetery_id
|
|
|
|
* @param $_GET section (optional)
|
|
|
|
*/
|
|
|
|
try {
|
|
|
|
if (!isset($_GET['cemetery_id']) || !$_GET['cemetery_id']) {
|
|
|
|
throw new Exception('cemeteries/unknownCemetery');
|
|
|
|
}
|
2010-01-04 15:47:15 +00:00
|
|
|
$cemetery = new Cemetery($_GET['cemetery_id']);
|
2009-12-18 20:57:41 +00:00
|
|
|
}
|
|
|
|
catch (Exception $e) {
|
|
|
|
$_SESSION['errorMessages'][] = $e;
|
|
|
|
header('Location: '.BASE_URL);
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2010-01-06 16:16:21 +00:00
|
|
|
|
2010-01-07 16:19:46 +00:00
|
|
|
$template = isset($_GET['format'])
|
|
|
|
? new Template('default',$_GET['format'])
|
|
|
|
: $template = new Template();
|
2009-12-18 20:57:41 +00:00
|
|
|
$template->blocks[] = new Block('cemeteries/cemeteryInfo.inc',array('cemetery'=>$cemetery));
|
2010-01-06 16:16:21 +00:00
|
|
|
echo $template->render();
|