--- a/fhiiqm/form/raum_form.inc.php Mon Feb 06 13:44:00 2012 +0100
+++ b/fhiiqm/form/raum_form.inc.php Fri Mar 02 13:54:32 2012 +0100
@@ -84,8 +84,9 @@
?>
</select>
</td>
- <tr>
- <td>Reinigungs-Typ</td>
+ </tr>
+ <tr>
+ <td> Reinigungs-Typ</td>
<td><select name="raum[reityp]">
<?php
if ($raum['reityp'] == -1) $select = " selected "; else $select = "";
@@ -100,7 +101,74 @@
else
echo "<option value=\"$row->reinigung_typ_ID\">$row->reinigung_typ_ID: $row->reinigung_typ_bez</option>\n";
}
- }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td> Bodentyp</td>
+ <td><select name="raum[boden]">
+ <?php
+ if ($raum['boden'] == -1) $select = " selected "; else $select = "";
+ echo "<option $select value=\"-1\"></option>\n";
+ $sql = "SELECT boden_typ_ID, boden_typ_bez FROM fhiiqm.Boden_Typ ORDER BY 2";
+ if ($result = $dbc->queryObjectArray($sql))
+ {
+ foreach ($result as $row)
+ {
+ if ($row->boden_typ_ID == $raum['boden'])
+ echo "<option selected value=\"$row->boden_typ_ID\">$row->boden_typ_bez</option>\n";
+ else
+ echo "<option value=\"$row->boden_typ_ID\">$row->boden_typ_bez</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td> Reinigungs-Kategorie</td>
+ <td><select name="raum[reikat]">
+ <?php
+ if ($raum['reikat'] == -1) $select = " selected "; else $select = "";
+ echo "<option $select value=\"-1\"></option>\n";
+ $sql = "SHOW COLUMNS FROM Raum WHERE Field = 'reinigung_kat'";
+ if ($result = $dbc->queryRow($sql))
+ {
+ //print_r($result);
+ foreach ($result as $row)
+ $arr=explode("','",preg_replace("/(enum|set)\('(.+?)'\)/","\\2",$row[1]));
+ //print "werte =";print_r($werte);
+ foreach ($arr as $kat)
+ {
+ if ($kat == $raum["reikat"])
+ echo "<option selected value=\"$kat\">$kat</option>\n";
+ else
+ echo "<option value=\"$kat\">$kat</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td> Reinigungs-Turnus</td>
+ <td><select name="raum[reitur]">
+ <?php
+ if ($raum['reitur'] == -1) $select = " selected "; else $select = "";
+ echo "<option $select value=\"-1\"></option>\n";
+ $sql = "SELECT reinigung_turnus_ID, reinigung_turnus_bez FROM fhiiqm.Reinigung_Turnus ORDER BY 1";
+ if ($result = $dbc->queryObjectArray($sql))
+ {
+ foreach ($result as $row)
+ {
+ if ($row->reinigung_turnus_ID == $raum['reitur'])
+ echo "<option selected value=\"$row->reinigung_turnus_ID\">$row->reinigung_turnus_bez</option>\n";
+ else
+ echo "<option value=\"$row->reinigung_turnus_ID\">$row->reinigung_turnus_bez</option>\n";
+ }
+ }
?>
</select>
</td>