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();
|
$return_url = $url->__toString();
|
||||||
?>
|
?>
|
||||||
<div class="interfaceBox">
|
<div class="interfaceBox">
|
||||||
<h1>
|
<h2>
|
||||||
<?php
|
<?php
|
||||||
if (userIsAllowed('Interments')) {
|
if (userIsAllowed('Interments')) {
|
||||||
$addURL = new URL(BASE_URL.'/interments/addInterment.php');
|
$addURL = new URL(BASE_URL.'/interments/addInterment.php');
|
||||||
|
@ -24,7 +24,7 @@ $return_url = $url->__toString();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Interments
|
Interments
|
||||||
</h1>
|
</h2>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th></th>
|
<tr><th></th>
|
||||||
|
|
|
@ -11,16 +11,31 @@ foreach ($this->intermentList as $interment) {
|
||||||
$last = View::escape($interment->getLastname());
|
$last = View::escape($interment->getLastname());
|
||||||
$first = View::escape($interment->getFirstname());
|
$first = View::escape($interment->getFirstname());
|
||||||
$date = $interment->getDeceasedDate('Y-m-d');
|
$date = $interment->getDeceasedDate('Y-m-d');
|
||||||
$cemetery_name = View::escape($interment->getCemetery());
|
|
||||||
$section = View::escape($interment->getSection());
|
|
||||||
$lot = View::escape($interment->getLot());
|
$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 "
|
echo "
|
||||||
<interment id=\"{$interment->getId()}\">
|
<interment id=\"{$interment->getId()}\">
|
||||||
<lastname>$last</lastname>
|
<lastname>$last</lastname>
|
||||||
<firstname>$first</firstname>
|
<firstname>$first</firstname>
|
||||||
<deceasedDate>$date</deceasedDate>
|
<deceasedDate>$date</deceasedDate>
|
||||||
<cemetery id=\"{$interment->getCemetery_id()}\">$cemetery_name</cemetery>
|
<cemetery id=\"{$interment->getCemetery_id()}\">
|
||||||
<section id=\"{$interment->getSection_id()}\">$section</section>
|
<name>$cemetery_name</name>
|
||||||
|
</cemetery>
|
||||||
|
<section id=\"{$interment->getSection_id()}\">
|
||||||
|
<code>$section_code</code>
|
||||||
|
<name>$section_name</name>
|
||||||
|
</section>
|
||||||
<lot>$lot</lot>
|
<lot>$lot</lot>
|
||||||
</interment>
|
</interment>
|
||||||
";
|
";
|
||||||
|
|
Loading…
Reference in New Issue