|
1 <?php |
|
2 |
|
3 /** |
|
4 * @author Bettina Schwarzer, Fritz-Haber-Institut |
|
5 * @copyright 12/2011 |
|
6 * |
|
7 * Form Laser |
|
8 */ |
|
9 |
|
10 include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php"); |
|
11 if (!isset($dbc) || !$dbc) $dbc = new dbconnection(); |
|
12 $okn = true; |
|
13 if (!$la["geb"]) $la["geb"]="A"; |
|
14 |
|
15 ?> |
|
16 <div align="center"> |
|
17 <table> |
|
18 <tr><td class="bigger">Die Auswahl eines Verantwortlichen geschieht durch<br />Eingeben von mindesten 2 Zeichen in das entsprechende Feld. |
|
19 </td></tr> |
|
20 <tr><td class="bigger">Umlaute wie 'ä', 'ü', 'ö', 'ß' werden nicht gefunden, bitte benachbarte Zeichen eingeben.</td></tr> |
|
21 <tr><td class="bigger"> </td></tr> |
|
22 </table> |
|
23 </div> |
|
24 <form action="<?php $_SERVER['PHP_SELF'] ?>" method="post" enctype="application/x-www-form-urlencoded" name="fanl"> |
|
25 <div align="center"> |
|
26 <table border="0" cellspacing="3" cellpadding="3"> |
|
27 <!-- <div class="ui-widget"> --> |
|
28 <tr><td>Laserbezeichnung *</td> |
|
29 <td valign="top"><input type="text" name="la[lbez]" id="lbez" size="30" maxlength="250" value="<?php echo $la['lbez']; ?>"/> |
|
30 <?php |
|
31 if (isset($la['lbez']) && $la['lbez']<'!') |
|
32 { |
|
33 echo "<br><span class=\"red\">Laserbezeichnung ist erforderlich!</span>\n"; |
|
34 $okn = false; |
|
35 } |
|
36 else |
|
37 if ($okn) $okn = true; else $okn=false; |
|
38 ?> |
|
39 </td> |
|
40 </tr> |
|
41 <tr><td>Laserwelle von</td> |
|
42 <td valign="top"><input type="text" name="la[wvon]" size="10" maxlength="7" value="<?php echo $la['wvon']; ?>"/> |
|
43 Laserwelle bis |
|
44 <input type="text" name="la[wbis]" size="10" maxlength="7" value="<?php echo $la['wbis']; ?>"/></td> |
|
45 </tr> |
|
46 <tr><td>Schutzstufe</td> |
|
47 <td><select name="la[suid]"> |
|
48 <?php |
|
49 if ($la['suid'] == -1) $select = " selected "; else $select = ""; |
|
50 echo "<option $select value=\"-1\"></option>\n"; |
|
51 $sql = "SELECT schutzst_ID, schutzst_bez FROM Schutzstufe ORDER BY 2"; |
|
52 if ($res = $dbc -> queryObjectArray($sql)) |
|
53 { |
|
54 $select = ""; |
|
55 foreach ($res as $row) |
|
56 { |
|
57 if ($row->schutzst_ID == $la['suid']) $select="selected"; else $select=""; |
|
58 echo "<option $select value='$row->schutzst_ID'>$row->schutzst_bez</option>\n"; |
|
59 } |
|
60 } |
|
61 ?> |
|
62 </select></td> |
|
63 </tr> |
|
64 <tr><td>Laserart</td> |
|
65 <td><select name="la[lart]"> |
|
66 <?php |
|
67 if ($la['lart'] == -1) $select = " selected "; else $select = ""; |
|
68 echo "<option $select value=\"-1\"></option>\n"; |
|
69 $sql = "SELECT las_art_ID, las_art_bez FROM Laser_Art ORDER BY 2"; |
|
70 if ($res = $dbc -> queryObjectArray($sql)) |
|
71 { |
|
72 $select = ""; |
|
73 foreach ($res as $row) |
|
74 { |
|
75 if ($row->las_art_ID == $la['lart']) $select="selected"; else $select=""; |
|
76 echo "<option $select value='$row->las_art_ID'>$row->las_art_bez</option>\n"; |
|
77 } |
|
78 } |
|
79 ?> |
|
80 </select></td> |
|
81 </tr> |
|
82 <tr><td>Laserklasse</td> |
|
83 <td><select name="la[lkla]"> |
|
84 <?php |
|
85 if ($la['lkla'] == -1) $select = " selected "; else $select = ""; |
|
86 echo "<option $select value=\"-1\"></option>\n"; |
|
87 $sql = "SELECT las_klasse_ID, las_klasse_bez FROM Laser_Klasse ORDER BY 2"; |
|
88 if ($res = $dbc -> queryObjectArray($sql)) |
|
89 { |
|
90 $select = ""; |
|
91 foreach ($res as $row) |
|
92 { |
|
93 if ($row->las_klasse_ID == $la['lkla']) $select="selected"; else $select=""; |
|
94 echo "<option $select value='$row->las_klasse_ID'>$row->las_klasse_bez</option>\n"; |
|
95 } |
|
96 } |
|
97 ?> |
|
98 </select></td> |
|
99 </tr> |
|
100 <tr><td>Lasertyp</td> |
|
101 <td><select name="la[ltyp]"> |
|
102 <?php |
|
103 if ($la['ltyp'] == -1) $select = " selected "; else $select = ""; |
|
104 echo "<option $select value=\"-1\"></option>\n"; |
|
105 $sql = "SELECT las_typ_ID, las_typ_bez FROM Laser_Typ ORDER BY 2"; |
|
106 if ($res = $dbc -> queryObjectArray($sql)) |
|
107 { |
|
108 $select = ""; |
|
109 foreach ($res as $row) |
|
110 { |
|
111 if ($row->las_typ_ID == $la['ltyp']) $select="selected"; else $select=""; |
|
112 echo "<option $select value='$row->las_typ_ID'>$row->las_typ_bez</option>\n"; |
|
113 } |
|
114 } |
|
115 ?> |
|
116 </select></td> |
|
117 </tr> |
|
118 <tr><td>Leistung</td> |
|
119 <td valign="top"><input type="text" name="la[leist]" size="10" maxlength="7" value="<?php echo $la['leist']; ?>"/> |
|
120 Einheit |
|
121 <select name="la[eleist]"> |
|
122 <?php |
|
123 $sql = "SELECT einheit_ID,einheit,einheit_beschr FROM Einheit WHERE laser=1 ORDER BY right(einheit,1),2"; |
|
124 if ($ree = $dbc -> queryObjectArray($sql)) |
|
125 { |
|
126 $select = ""; |
|
127 foreach ($ree as $row) |
|
128 { |
|
129 if ($row->einheit_ID == $la['eleist']) $select="selected"; else $select=""; |
|
130 echo "<option $select value='$row->einheit_ID'>$row->einheit ($row->einheit_beschr)</option>\n"; |
|
131 } |
|
132 } |
|
133 ?> |
|
134 </select></td> |
|
135 </tr> |
|
136 <tr><td>Energie</td> |
|
137 <td valign="top"><input type="text" name="la[eng]" size="10" maxlength="7" value="<?php echo $la['eng']; ?>"/> |
|
138 Einheit |
|
139 <select name="la[eeng]"> |
|
140 <?php |
|
141 if ($ree) |
|
142 { |
|
143 $select = ""; |
|
144 foreach ($ree as $row) |
|
145 { |
|
146 if ($row->einheit_ID == $la['eeng']) $select="selected"; else $select=""; |
|
147 echo "<option $select value='$row->einheit_ID'>$row->einheit ($row->einheit_beschr)</option>\n"; |
|
148 } |
|
149 } |
|
150 ?> |
|
151 </select></td> |
|
152 </tr> |
|
153 <tr><td>Apertur</td> |
|
154 <td valign="top"><input type="text" name="la[apt]" size="10" maxlength="7" value="<?php echo $la['apt']; ?>"/> |
|
155 Einheit |
|
156 <select name="la[eapt]"> |
|
157 <?php |
|
158 if ($ree) |
|
159 { |
|
160 $select = ""; |
|
161 foreach ($ree as $row) |
|
162 { |
|
163 if ($row->einheit_ID == $la['eapt']) $select="selected"; else $select=""; |
|
164 echo "<option $select value='$row->einheit_ID'>$row->einheit ($row->einheit_beschr)</option>\n"; |
|
165 } |
|
166 } |
|
167 ?> |
|
168 </select></td> |
|
169 </tr> |
|
170 <tr><td>Frequenz</td> |
|
171 <td valign="top"><input type="text" name="la[frq]" size="10" maxlength="7" value="<?php echo $la['frq']; ?>"/> |
|
172 Einheit |
|
173 <select name="la[efrq]"> |
|
174 <?php |
|
175 if ($ree) |
|
176 { |
|
177 $select = ""; |
|
178 foreach ($ree as $row) |
|
179 { |
|
180 if ($row->einheit_ID == $la['efrq']) $select="selected"; else $select=""; |
|
181 echo "<option $select value='$row->einheit_ID'>$row->einheit ($row->einheit_beschr)</option>\n"; |
|
182 } |
|
183 } |
|
184 ?> |
|
185 </select></td> |
|
186 </tr> |
|
187 <tr><td>Impulsbreite</td> |
|
188 <td valign="top"><input type="text" name="la[ipb]" size="10" maxlength="7" value="<?php echo $la['ipb']; ?>"/> |
|
189 Einheit |
|
190 <select name="la[eipb]"> |
|
191 <?php |
|
192 if ($ree) |
|
193 { |
|
194 $select = ""; |
|
195 foreach ($ree as $row) |
|
196 { |
|
197 if ($row->einheit_ID == $la['eipb']) $select="selected"; else $select=""; |
|
198 echo "<option $select value='$row->einheit_ID'>$row->einheit ($row->einheit_beschr)</option>\n"; |
|
199 } |
|
200 } |
|
201 ?> |
|
202 </select></td> |
|
203 </tr> |
|
204 <tr><td>aktiv</td> |
|
205 <td><input type="checkbox" name="la[akt] <?php echo ($la["akt"] )? "checked" : "";?>"/></td> |
|
206 </tr> |
|
207 <tr> |
|
208 <td>Hersteller (Firma)</td> |
|
209 <td> |
|
210 <select name="la[hstid]"> |
|
211 <?php |
|
212 if ($la['hstid'] == -1) $select = " selected "; else $select = ""; |
|
213 echo "<option $select value=\"-1\"></option>\n"; |
|
214 $sql = "SELECT las_hersteller_ID, las_hersteller_bez FROM Hersteller ORDER BY 2"; |
|
215 if ($result = $dbc->queryObjectArray($sql)) |
|
216 { |
|
217 foreach ($result as $row) |
|
218 { |
|
219 if ($row->las_hersteller_ID == $la['hstid']) $select="selected"; else $select=""; |
|
220 echo "<option $select value=\"$row->las_hersteller_ID\">$row->las_hersteller_bez</option>\n"; |
|
221 } |
|
222 } |
|
223 ?> |
|
224 </select> oder neu |
|
225 <input name="la[herst]" type="text" size="30" maxlength="50" value="<?php echo $la['herst']; ?>"/> |
|
226 </td> |
|
227 </tr> |
|
228 <tr><td>Standort</td> |
|
229 <td valign="top">Haus |
|
230 <select name="la[geb]" onchange="this.form.submit();"> |
|
231 <?php |
|
232 $sql = "SELECT geb_ID, geb_name FROM `fhiiqm`.`Haus` ORDER BY 1"; |
|
233 if ($result = $dbc->queryObjectArray($sql)) |
|
234 { |
|
235 foreach ($result as $row) |
|
236 { |
|
237 if ($row->geb_ID == $la['geb']) $select="selected"; else $select=""; |
|
238 echo "<option $select value=\"$row->geb_ID\">$row->geb_ID: $row->geb_name</option>\n"; |
|
239 } |
|
240 } |
|
241 ?> |
|
242 </select> |
|
243 Raum |
|
244 <select name="la[raum]"> |
|
245 <?php |
|
246 if ($la['raum'] == -1) $select = " selected "; else $select = ""; |
|
247 echo "<option $select value=\"-1\"></option>\n"; |
|
248 $sql = "SELECT raum_ID, raum_nr, raum_name FROM `fhiiqm`.`Raum` WHERE geb_ID='" . $la['geb'] ."' ORDER BY 2"; |
|
249 if ($result = $dbc->queryObjectArray($sql)) |
|
250 { |
|
251 foreach ($result as $row) |
|
252 { |
|
253 if ($row->raum_ID == $la['raum']) $select="selected"; else $select=""; |
|
254 echo "<option $select value=\"$row->raum_ID\">$row->raum_nr $row->raum_name</option>\n"; |
|
255 } |
|
256 } |
|
257 ?> |
|
258 </select> |
|
259 </td> |
|
260 </tr> |
|
261 <tr><td>Verantwortlicher</td> |
|
262 <td valign="top"><input class="long20" type="text" name="la[persknr]" id="persknr" value="<?php echo $la['persknr']; ?>"/> |
|
263 </td> |
|
264 </tr> |
|
265 <tr><td>Laser-Infos</td> |
|
266 <td><textarea name="la[linfo]" cols="50" rows="4"><?php echo $la['linfo']; ?></textarea></td> |
|
267 </tr> |
|
268 |
|
269 <input type="hidden" name="la[pid]" id="pid" value="<?php echo $la['pid']; ?>"/> |
|
270 <input type="hidden" name="la[okn]" value="<?php echo $okn; ?>"/> |
|
271 <!-- |
|
272 </div> |
|
273 </form> |
|
274 </table> --> |