--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fhiiqm/form/laser_form.inc.php Fri Dec 23 15:03:37 2011 +0100
@@ -0,0 +1,274 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 12/2011
+ *
+ * Form Laser
+ */
+
+ include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
+ if (!isset($dbc) || !$dbc) $dbc = new dbconnection();
+ $okn = true;
+ if (!$la["geb"]) $la["geb"]="A";
+
+?>
+<div align="center">
+<table>
+<tr><td class="bigger">Die Auswahl eines Verantwortlichen geschieht durch<br />Eingeben von mindesten 2 Zeichen in das entsprechende Feld.
+</td></tr>
+<tr><td class="bigger">Umlaute wie 'ä', 'ü', 'ö', 'ß' werden nicht gefunden, bitte benachbarte Zeichen eingeben.</td></tr>
+<tr><td class="bigger"> </td></tr>
+</table>
+</div>
+<form action="<?php $_SERVER['PHP_SELF'] ?>" method="post" enctype="application/x-www-form-urlencoded" name="fanl">
+<div align="center">
+ <table border="0" cellspacing="3" cellpadding="3">
+<!-- <div class="ui-widget"> -->
+ <tr><td>Laserbezeichnung *</td>
+ <td valign="top"><input type="text" name="la[lbez]" id="lbez" size="30" maxlength="250" value="<?php echo $la['lbez']; ?>"/>
+ <?php
+ if (isset($la['lbez']) && $la['lbez']<'!')
+ {
+ echo "<br><span class=\"red\">Laserbezeichnung ist erforderlich!</span>\n";
+ $okn = false;
+ }
+ else
+ if ($okn) $okn = true; else $okn=false;
+ ?>
+ </td>
+ </tr>
+ <tr><td>Laserwelle von</td>
+ <td valign="top"><input type="text" name="la[wvon]" size="10" maxlength="7" value="<?php echo $la['wvon']; ?>"/>
+ Laserwelle bis
+ <input type="text" name="la[wbis]" size="10" maxlength="7" value="<?php echo $la['wbis']; ?>"/></td>
+ </tr>
+ <tr><td>Schutzstufe</td>
+ <td><select name="la[suid]">
+ <?php
+ if ($la['suid'] == -1) $select = " selected "; else $select = "";
+ echo "<option $select value=\"-1\"></option>\n";
+ $sql = "SELECT schutzst_ID, schutzst_bez FROM Schutzstufe ORDER BY 2";
+ if ($res = $dbc -> queryObjectArray($sql))
+ {
+ $select = "";
+ foreach ($res as $row)
+ {
+ if ($row->schutzst_ID == $la['suid']) $select="selected"; else $select="";
+ echo "<option $select value='$row->schutzst_ID'>$row->schutzst_bez</option>\n";
+ }
+ }
+ ?>
+ </select></td>
+ </tr>
+ <tr><td>Laserart</td>
+ <td><select name="la[lart]">
+ <?php
+ if ($la['lart'] == -1) $select = " selected "; else $select = "";
+ echo "<option $select value=\"-1\"></option>\n";
+ $sql = "SELECT las_art_ID, las_art_bez FROM Laser_Art ORDER BY 2";
+ if ($res = $dbc -> queryObjectArray($sql))
+ {
+ $select = "";
+ foreach ($res as $row)
+ {
+ if ($row->las_art_ID == $la['lart']) $select="selected"; else $select="";
+ echo "<option $select value='$row->las_art_ID'>$row->las_art_bez</option>\n";
+ }
+ }
+ ?>
+ </select></td>
+ </tr>
+ <tr><td>Laserklasse</td>
+ <td><select name="la[lkla]">
+ <?php
+ if ($la['lkla'] == -1) $select = " selected "; else $select = "";
+ echo "<option $select value=\"-1\"></option>\n";
+ $sql = "SELECT las_klasse_ID, las_klasse_bez FROM Laser_Klasse ORDER BY 2";
+ if ($res = $dbc -> queryObjectArray($sql))
+ {
+ $select = "";
+ foreach ($res as $row)
+ {
+ if ($row->las_klasse_ID == $la['lkla']) $select="selected"; else $select="";
+ echo "<option $select value='$row->las_klasse_ID'>$row->las_klasse_bez</option>\n";
+ }
+ }
+ ?>
+ </select></td>
+ </tr>
+ <tr><td>Lasertyp</td>
+ <td><select name="la[ltyp]">
+ <?php
+ if ($la['ltyp'] == -1) $select = " selected "; else $select = "";
+ echo "<option $select value=\"-1\"></option>\n";
+ $sql = "SELECT las_typ_ID, las_typ_bez FROM Laser_Typ ORDER BY 2";
+ if ($res = $dbc -> queryObjectArray($sql))
+ {
+ $select = "";
+ foreach ($res as $row)
+ {
+ if ($row->las_typ_ID == $la['ltyp']) $select="selected"; else $select="";
+ echo "<option $select value='$row->las_typ_ID'>$row->las_typ_bez</option>\n";
+ }
+ }
+ ?>
+ </select></td>
+ </tr>
+ <tr><td>Leistung</td>
+ <td valign="top"><input type="text" name="la[leist]" size="10" maxlength="7" value="<?php echo $la['leist']; ?>"/>
+ Einheit
+ <select name="la[eleist]">
+ <?php
+ $sql = "SELECT einheit_ID,einheit,einheit_beschr FROM Einheit WHERE laser=1 ORDER BY right(einheit,1),2";
+ if ($ree = $dbc -> queryObjectArray($sql))
+ {
+ $select = "";
+ foreach ($ree as $row)
+ {
+ if ($row->einheit_ID == $la['eleist']) $select="selected"; else $select="";
+ echo "<option $select value='$row->einheit_ID'>$row->einheit ($row->einheit_beschr)</option>\n";
+ }
+ }
+ ?>
+ </select></td>
+ </tr>
+ <tr><td>Energie</td>
+ <td valign="top"><input type="text" name="la[eng]" size="10" maxlength="7" value="<?php echo $la['eng']; ?>"/>
+ Einheit
+ <select name="la[eeng]">
+ <?php
+ if ($ree)
+ {
+ $select = "";
+ foreach ($ree as $row)
+ {
+ if ($row->einheit_ID == $la['eeng']) $select="selected"; else $select="";
+ echo "<option $select value='$row->einheit_ID'>$row->einheit ($row->einheit_beschr)</option>\n";
+ }
+ }
+ ?>
+ </select></td>
+ </tr>
+ <tr><td>Apertur</td>
+ <td valign="top"><input type="text" name="la[apt]" size="10" maxlength="7" value="<?php echo $la['apt']; ?>"/>
+ Einheit
+ <select name="la[eapt]">
+ <?php
+ if ($ree)
+ {
+ $select = "";
+ foreach ($ree as $row)
+ {
+ if ($row->einheit_ID == $la['eapt']) $select="selected"; else $select="";
+ echo "<option $select value='$row->einheit_ID'>$row->einheit ($row->einheit_beschr)</option>\n";
+ }
+ }
+ ?>
+ </select></td>
+ </tr>
+ <tr><td>Frequenz</td>
+ <td valign="top"><input type="text" name="la[frq]" size="10" maxlength="7" value="<?php echo $la['frq']; ?>"/>
+ Einheit
+ <select name="la[efrq]">
+ <?php
+ if ($ree)
+ {
+ $select = "";
+ foreach ($ree as $row)
+ {
+ if ($row->einheit_ID == $la['efrq']) $select="selected"; else $select="";
+ echo "<option $select value='$row->einheit_ID'>$row->einheit ($row->einheit_beschr)</option>\n";
+ }
+ }
+ ?>
+ </select></td>
+ </tr>
+ <tr><td>Impulsbreite</td>
+ <td valign="top"><input type="text" name="la[ipb]" size="10" maxlength="7" value="<?php echo $la['ipb']; ?>"/>
+ Einheit
+ <select name="la[eipb]">
+ <?php
+ if ($ree)
+ {
+ $select = "";
+ foreach ($ree as $row)
+ {
+ if ($row->einheit_ID == $la['eipb']) $select="selected"; else $select="";
+ echo "<option $select value='$row->einheit_ID'>$row->einheit ($row->einheit_beschr)</option>\n";
+ }
+ }
+ ?>
+ </select></td>
+ </tr>
+ <tr><td>aktiv</td>
+ <td><input type="checkbox" name="la[akt] <?php echo ($la["akt"] )? "checked" : "";?>"/></td>
+ </tr>
+ <tr>
+ <td>Hersteller (Firma)</td>
+ <td>
+ <select name="la[hstid]">
+ <?php
+ if ($la['hstid'] == -1) $select = " selected "; else $select = "";
+ echo "<option $select value=\"-1\"></option>\n";
+ $sql = "SELECT las_hersteller_ID, las_hersteller_bez FROM Hersteller ORDER BY 2";
+ if ($result = $dbc->queryObjectArray($sql))
+ {
+ foreach ($result as $row)
+ {
+ if ($row->las_hersteller_ID == $la['hstid']) $select="selected"; else $select="";
+ echo "<option $select value=\"$row->las_hersteller_ID\">$row->las_hersteller_bez</option>\n";
+ }
+ }
+ ?>
+ </select> oder neu
+ <input name="la[herst]" type="text" size="30" maxlength="50" value="<?php echo $la['herst']; ?>"/>
+ </td>
+ </tr>
+ <tr><td>Standort</td>
+ <td valign="top">Haus
+ <select name="la[geb]" onchange="this.form.submit();">
+ <?php
+ $sql = "SELECT geb_ID, geb_name FROM `fhiiqm`.`Haus` ORDER BY 1";
+ if ($result = $dbc->queryObjectArray($sql))
+ {
+ foreach ($result as $row)
+ {
+ if ($row->geb_ID == $la['geb']) $select="selected"; else $select="";
+ echo "<option $select value=\"$row->geb_ID\">$row->geb_ID: $row->geb_name</option>\n";
+ }
+ }
+ ?>
+ </select>
+ Raum
+ <select name="la[raum]">
+ <?php
+ if ($la['raum'] == -1) $select = " selected "; else $select = "";
+ echo "<option $select value=\"-1\"></option>\n";
+ $sql = "SELECT raum_ID, raum_nr, raum_name FROM `fhiiqm`.`Raum` WHERE geb_ID='" . $la['geb'] ."' ORDER BY 2";
+ if ($result = $dbc->queryObjectArray($sql))
+ {
+ foreach ($result as $row)
+ {
+ if ($row->raum_ID == $la['raum']) $select="selected"; else $select="";
+ echo "<option $select value=\"$row->raum_ID\">$row->raum_nr $row->raum_name</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr><td>Verantwortlicher</td>
+ <td valign="top"><input class="long20" type="text" name="la[persknr]" id="persknr" value="<?php echo $la['persknr']; ?>"/>
+ </td>
+ </tr>
+ <tr><td>Laser-Infos</td>
+ <td><textarea name="la[linfo]" cols="50" rows="4"><?php echo $la['linfo']; ?></textarea></td>
+ </tr>
+
+ <input type="hidden" name="la[pid]" id="pid" value="<?php echo $la['pid']; ?>"/>
+ <input type="hidden" name="la[okn]" value="<?php echo $okn; ?>"/>
+<!--
+</div>
+</form>
+</table> -->
\ No newline at end of file