equal
deleted
inserted
replaced
|
1 <?php |
|
2 |
|
3 /** |
|
4 * @author Bettina Schwarzer, Fritz-Haber-Institut |
|
5 * @copyright 06/2012 |
|
6 * |
|
7 * Form Gefaehrdung - Massnahme |
|
8 * |
|
9 */ |
|
10 |
|
11 include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php"); |
|
12 if (!isset($dbc) || !$dbc) $dbc = new dbconnection(); |
|
13 $okn = true; |
|
14 |
|
15 ?> |
|
16 <form action="<?php $_SERVER['PHP_SELF'] ?>" method="post" enctype="application/x-www-form-urlencoded" name="form_apm" target="_self"> |
|
17 <div align="center"> |
|
18 <table width="35%" border="0" cellspacing="3" cellpadding="3"> |
|
19 <tr> |
|
20 <td>Gefährdung *</td> |
|
21 <td> |
|
22 <select name="asm[gf]" size="1"> |
|
23 <?php |
|
24 $select = null; |
|
25 $sql = "SELECT gefahr_ID, gefahr_bez FROM fhiiqm.Gefahr ORDER BY 1"; |
|
26 if ($result = $dbc->queryObjectArray($sql)) |
|
27 { |
|
28 foreach ($result as $row) |
|
29 { |
|
30 $select = ( $row->gefahr_ID==$asm['gf'] ) ? ' selected' : null; |
|
31 echo "<option $select value=\"$row->gefahr_ID\">$row->gefahr_ID - $row->gefahr_bez</option>\n"; |
|
32 } |
|
33 } |
|
34 ?> |
|
35 </select> |
|
36 </td> |
|
37 </tr> |
|
38 <tr> |
|
39 <td>Bezeichnung AS Maßnahme * |
|
40 </td> |
|
41 <td><input name="asm[asm]" size="50" maxlength="50" value="<?php echo $asm['asm']; ?>" /> |
|
42 <?php |
|
43 if (isset($asm['asm']) && $asm['asm']<'!') |
|
44 { |
|
45 echo "<br><span class=\"red\">Maßnahmenbezeichnung ist erforderlich!</span>\n"; |
|
46 $okn = false; |
|
47 } |
|
48 ?> |
|
49 </td> |
|
50 </tr> |
|
51 <tr> |
|
52 <td>lfd. Nr. AS Maßnahme</td> |
|
53 <td><input name="asm[lnr]" size="5" maxlength="2" value="<?php echo $asm['lnr']; ?>" /></td> |
|
54 </tr> |
|
55 <tr> |
|
56 <td>AS Maßnahme</td> |
|
57 <td><textarea name="asm[bem]" rows="5" cols="50"><?php echo $asm['bem']; ?></textarea></td> |
|
58 </tr> |
|
59 <input type="hidden" name="asm[okn]" value="<?php echo $okn; ?>"/> |
|
60 <!-- |
|
61 </table> |
|
62 </form> |
|
63 --> |