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>
|
|
|
|
<form method="get" action="<?php echo BASE_URL; ?>/internments">
|
|
|
|
<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) {
|
|
|
|
$section = View::escape($section);
|
2009-12-18 17:34:19 +00:00
|
|
|
$selected = (isset($_GET[$fieldname]) && $_GET[$fieldname]==$section)
|
2009-12-18 16:54:06 +00:00
|
|
|
? 'selected="selected"'
|
|
|
|
: '';
|
|
|
|
echo "<option $selected>$section</option>";
|
|
|
|
}
|
|
|
|
echo "
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</table>
|
|
|
|
<div>
|
|
|
|
<button type="submit" class="search">Search</button>
|
|
|
|
</div>
|
|
|
|
</form>
|