Created a JSON service for the interment list
git-svn-id: https://rosehill.googlecode.com/svn/branches/php@31 100bd78a-fc82-11de-b5bc-ffd2847a4b57
This commit is contained in:
parent
5379d7bb1e
commit
3bc8cc7752
|
@ -11,7 +11,7 @@ $url = new URL($_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
|
|||
$return_url = $url->__toString();
|
||||
?>
|
||||
<div class="interfaceBox">
|
||||
<h1>
|
||||
<h2>
|
||||
<?php
|
||||
if (userIsAllowed('Interments')) {
|
||||
$addURL = new URL(BASE_URL.'/interments/addInterment.php');
|
||||
|
@ -24,7 +24,7 @@ $return_url = $url->__toString();
|
|||
}
|
||||
?>
|
||||
Interments
|
||||
</h1>
|
||||
</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th></th>
|
||||
|
|
|
@ -11,16 +11,31 @@ foreach ($this->intermentList as $interment) {
|
|||
$last = View::escape($interment->getLastname());
|
||||
$first = View::escape($interment->getFirstname());
|
||||
$date = $interment->getDeceasedDate('Y-m-d');
|
||||
$cemetery_name = View::escape($interment->getCemetery());
|
||||
$section = View::escape($interment->getSection());
|
||||
$lot = View::escape($interment->getLot());
|
||||
|
||||
$cemetery_name = '';
|
||||
if ($interment->getCemetery_id()) {
|
||||
$cemetery_name = View::escape($interment->getCemetery()->getName());
|
||||
}
|
||||
|
||||
$section_code = '';
|
||||
$section_name = '';
|
||||
if ($interment->getSection_id()) {
|
||||
$section_code = View::escape($interment->getSection()->getCode());
|
||||
$section_name = View::escape($interment->getSection()->getName());
|
||||
}
|
||||
echo "
|
||||
<interment id=\"{$interment->getId()}\">
|
||||
<lastname>$last</lastname>
|
||||
<firstname>$first</firstname>
|
||||
<deceasedDate>$date</deceasedDate>
|
||||
<cemetery id=\"{$interment->getCemetery_id()}\">$cemetery_name</cemetery>
|
||||
<section id=\"{$interment->getSection_id()}\">$section</section>
|
||||
<cemetery id=\"{$interment->getCemetery_id()}\">
|
||||
<name>$cemetery_name</name>
|
||||
</cemetery>
|
||||
<section id=\"{$interment->getSection_id()}\">
|
||||
<code>$section_code</code>
|
||||
<name>$section_name</name>
|
||||
</section>
|
||||
<lot>$lot</lot>
|
||||
</interment>
|
||||
";
|
||||
|
|
Loading…
Reference in New Issue