Interment searching is now working

git-svn-id: https://rosehill.googlecode.com/svn/branches/php@9 100bd78a-fc82-11de-b5bc-ffd2847a4b57
This commit is contained in:
inghamn 2009-12-18 17:34:19 +00:00
parent b0fbc4bb44
commit ace118bc0a
1 changed files with 3 additions and 2 deletions

View File

@ -23,14 +23,15 @@
$cemeteries->find();
foreach ($cemeteries as $cemetery) {
$name = View::escape($cemetery->getName());
$fieldname = 'sections_'.$cemetery->getId();
echo "
<tr><td><label for=\"\">$name Sections</label></td>
<td><select name=\"sections_{$cemetery->getId()}\">
<td><select name=\"$fieldname\">
<option value=\"\">All</option>
";
foreach ($cemetery->getSections() as $section) {
$section = View::escape($section);
$selected = (isset($_GET['section']) && $_GET['section']==$section)
$selected = (isset($_GET[$fieldname]) && $_GET[$fieldname]==$section)
? 'selected="selected"'
: '';
echo "<option $selected>$section</option>";