2009-12-18 16:54:06 +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>
|
|
|
|
*/
|
|
|
|
?>
|
|
|
|
<h1>Search Burial Records</h1>
|
2009-12-18 17:40:05 +00:00
|
|
|
<form method="get" action="<?php echo BASE_URL; ?>/interments">
|
2009-12-18 16:54:06 +00:00
|
|
|
<table>
|
|
|
|
<tr><td><label for="lastname">Last Name</label></td>
|
|
|
|
<td><input name="lastname" id="lastname"
|
|
|
|
value="<?php echo isset($_GET['lastname']) ? View::escape($_GET['lastname']) : ''; ?>" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr><td><label for="firstname">First Name</label></td>
|
|
|
|
<td><input name="firstname" id="firstname"
|
|
|
|
value="<?php echo isset($_GET['firstname']) ? View::escape($_GET['firstname']) : ''; ?>" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
$cemeteries = new CemeteryList();
|
|
|
|
$cemeteries->find();
|
|
|
|
foreach ($cemeteries as $cemetery) {
|
|
|
|
$name = View::escape($cemetery->getName());
|
2009-12-18 17:34:19 +00:00
|
|
|
$fieldname = 'sections_'.$cemetery->getId();
|
2009-12-18 16:54:06 +00:00
|
|
|
echo "
|
|
|
|
<tr><td><label for=\"\">$name Sections</label></td>
|
2009-12-18 17:34:19 +00:00
|
|
|
<td><select name=\"$fieldname\">
|
2009-12-18 16:54:06 +00:00
|
|
|
<option value=\"\">All</option>
|
|
|
|
";
|
|
|
|
foreach ($cemetery->getSections() as $section) {
|
2010-01-04 15:47:15 +00:00
|
|
|
$selected = (isset($_GET[$fieldname]) && $_GET[$fieldname]==$section->getId())
|
2009-12-18 16:54:06 +00:00
|
|
|
? 'selected="selected"'
|
|
|
|
: '';
|
2010-01-04 15:47:15 +00:00
|
|
|
$name = View::escape($section);
|
|
|
|
echo "<option value=\"{$section->getId()}\" $selected>$name</option>";
|
2009-12-18 16:54:06 +00:00
|
|
|
}
|
|
|
|
echo "
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</table>
|
|
|
|
<div>
|
|
|
|
<button type="submit" class="search">Search</button>
|
|
|
|
</div>
|
|
|
|
</form>
|