#More visually compatible house filtering

This commit is contained in:
Znote 2019-03-10 11:58:56 +01:00
parent 00828a9f70
commit fbcaa6e7e4

View File

@ -153,15 +153,23 @@ if (empty($_POST) === false && $config['ServerEngine'] === 'TFS_03') {
// Create Search house box
?>
<form action="" method="get" style="width: 648px">
<b>Select town:</b>
<form action="" method="get" class="houselist">
<table>
<tr>
<td>Town</td>
<td>Order</td>
<td>Sort</td>
</tr>
<tr>
<td>
<select name="id">
<?php
foreach ($towns as $id => $name)
echo '<option value="'. $id .'"' . ($townid != $id ?: ' selected') . '>'. $name .'</option>';
?>
</select>
<b style="padding-left: 8px;">Order:</b>
</td>
<td>
<select name="order">
<?php
$order_allowed = array('id', 'name', 'size', 'beds', 'rent', 'owner');
@ -169,6 +177,8 @@ if (empty($_POST) === false && $config['ServerEngine'] === 'TFS_03') {
echo '<option value="' . $o . '"' . ($o != $order ?: ' selected') . '>' . ucfirst($o) . '</option>';
?>
</select>
</td>
<td>
<select name="type">
<?php
$type_allowed = array('desc', 'asc');
@ -176,7 +186,14 @@ if (empty($_POST) === false && $config['ServerEngine'] === 'TFS_03') {
echo '<option value="' . $t . '"' . ($t != $type ?: ' selected') . '>' . ($t == 'desc' ? 'Descending' : 'Ascending') .'</option>';
?>
</select>
<input type="submit" value="Fetch houses" style="margin-left: 8px;"/>
</td>
</tr>
<tr>
<td colspan="3">
<input type="submit" value="Fetch houses"/>
</td>
</tr>
</table>
</form>
<?php
if(!in_array($order, $order_allowed))