--- a/fhiiqm/form/ma_fkt_form.inc.php Fri Jan 17 08:50:55 2014 +0100
+++ b/fhiiqm/form/ma_fkt_form.inc.php Wed Aug 06 09:42:40 2014 +0200
@@ -1,144 +1,144 @@
-<?php
-
-/**
- * @author Bettina Schwarzer, Fritz-Haber-Institut
- * @copyright 09/2011
- */
-
-
-
-?>
-<div align="center">
-<table>
-<tr><td class="bigger">Die Auswahl eines Mitarbeiters geschieht durch<br />Eingeben von mindesten 2 Zeichen in das Mitarbeiter-Feld.
-</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="fmafkt">
-<div align="center">
- <table border="0" cellspacing="3" cellpadding="3">
-<!-- <div class="ui-widget"> -->
- <tr><td>Mitarbeiter *</td>
- <td valign="top"><input class="long20" type="text" name="fkt[persknr]" id="persknr" value="<?php echo $fkt['persknr']; ?>"/>
- </td>
- </tr>
- <tr><td>Funktion *</td>
- <td valign="top">
- <!--<input class="long20" type="text" name="fkt[func]" id="func" value="<?php echo $fkt['func']; ?>"/> -->
- <select name="fkt[func]" onchange="this.form.submit();">
- <!--<select name="fkt[func]"> -->
- <?php
- $sql = "SELECT fkt_bez, fkt_ID FROM `fhiiqm`.`Funktion` ORDER BY 1";
- if ($result = $dbc->queryObjectArray($sql))
- {
- foreach ($result as $row)
- {
- if ($row->fkt_ID == $fkt['func'])
- echo "<option selected value=\"$row->fkt_ID\">$row->fkt_bez</option>\n";
- else
- echo "<option value=\"$row->fkt_ID\">$row->fkt_bez</option>\n";
- }
- }
- ?>
- </select>
- </td>
- </tr>
- <tr><td>Geltungsbereich
- <?php if ($fkt["func"]=='KST') echo "<span> = Kostenstelle</span>"; ?>
- </td>
- <td valign="top">
- <?php
- if (isset($fkt['func']) && $fkt["func"]=='AL')
- {
- echo "<select name='fkt[ber]'>\n";
- $sql = "SELECT abt_ID,abt_name,abt_long FROM `fhiiqm`.`Abteilung`";
- if ($result = $dbc->queryObjectArray($sql))
- {
- foreach ($result as $row)
- {
- if ($row->abt_name == $fkt['ber'])
- echo "<option selected value=\"$row->abt_name\">$row->abt_name</option>\n";
- else
- echo "<option value=\"$row->abt_name\">$row->abt_name</option>\n";
- }
- }
- echo "</select>";
- }
- elseif (isset($fkt['func']) && $fkt["func"]=='AGL')
- {
- echo "<select name='fkt[ber]'>\n";
- $sql = "SELECT ag_name, abt_name FROM `fhiiqm`.`Arbeitsgruppe` ag INNER JOIN fhiiqm.Abteilung a
- ON ag.abt_ID=a.abt_ID ORDER BY ag.abt_ID, ag_ID";
- if ($result = $dbc->queryObjectArray($sql))
- {
- foreach ($result as $row)
- {
- if ($row->ag_name == $fkt['ber'])
- echo "<option selected value=\"$row->ag_name\">$row->ag_name, $row->abt_name</option>\n";
- else
- echo "<option value=\"$row->ag_name\">$row->ag_name, $row->abt_name</option>\n";
- }
- }
- echo "</select>";
- }
- else
- {
- ?>
- <input class="long20" type="text" name="fkt[ber]" id="ber" maxlength="50" value="<?php echo $fkt['ber']; ?>" onfocus="this.select();"/>
- <?php } ?>
- </td>
- </tr>
- <tr><td>Beginn</td>
- <td valign="top"><input class="long10" type="text" name="fkt[von]" id="von" value="<?php echo $fkt['von']; ?>"/>
- </td>
- </tr>
- <tr><td>Ende</td>
- <td valign="top"><input class="long10" type="text" name="fkt[bis]" id="bis" value="<?php echo $fkt['bis']; ?>"/>
- </td>
- </tr>
- <tr><td>Bemerkung</td>
- <td valign="top"><textarea name="fkt[bem]" id="bem" rows="3" cols="33"><?php echo $fkt['bem']; ?></textarea>
- </td>
- </tr>
- <?php
- if ($sub || $del)
- {
- if ($sub)
- $frage = "Alle Angaben ok?";
- elseif ($del)
- $frage = "Beauftragung wirklich löschen?";
- echo "<tr>
- <td class=\"red\" valign=\"top\" align=\"left\">$frage</td>
- <td><input type=\"checkbox\" name=\"ok\" value=\"1\"";
- if ($ok) echo "checked";
- echo "></td>\n</tr>\n";
- }
- if (!is_null($_SESSION["recht"]) && in_array("fme",$_SESSION["recht"]))
- {
- ?>
- <tr><td> </td>
- <td><input class="button" type="submit" name="eintragen" value=" eintragen " />
- <?php
- if ($mfid)
- {
- echo " <input class=\"buttonr\" type=\"submit\" value=\"löschen\" name=\"del\" title=\"delete\" />";
- echo " <input class=\"button\" type=\"submit\" value=\"duplizieren\" name=\"dup\" title=\"delete\" />";
- }
- ?>
- </td>
- </tr>
- <?php
- }
- ?>
-<!-- </div> -->
- </table>
- <input type="hidden" name="fkt[pid]" id="pid" value="<?php echo $fkt['pid']; ?>"/>
- <input type="hidden" name="fkt[fid]" id="fid" value="<?php echo $fkt['fid']; ?>"/>
-
-<?php
- echo "</div>\n";
-// if (!is_null($_SESSION["recht"]) && !in_array("fme", $_SESSION["recht"]))
- echo "<p class='sc'> <a href=\"ma_fkt_flist.php?$getp\" target=\"_self\" title=\"Funktionen\">« zur Funktionenliste</a></p>\n";
- echo "</form>\n";
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 09/2011
+ */
+
+
+
+?>
+<div align="center">
+<table>
+<tr><td class="bigger">Die Auswahl eines Mitarbeiters geschieht durch<br />Eingeben von mindesten 2 Zeichen in das Mitarbeiter-Feld.
+</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="fmafkt">
+<div align="center">
+ <table border="0" cellspacing="3" cellpadding="3">
+<!-- <div class="ui-widget"> -->
+ <tr><td>Mitarbeiter *</td>
+ <td valign="top"><input class="long20" type="text" name="fkt[persknr]" id="persknr" value="<?php echo $fkt['persknr']; ?>"/>
+ </td>
+ </tr>
+ <tr><td>Funktion *</td>
+ <td valign="top">
+ <!--<input class="long20" type="text" name="fkt[func]" id="func" value="<?php echo $fkt['func']; ?>"/> -->
+ <select name="fkt[func]" onchange="this.form.submit();">
+ <!--<select name="fkt[func]"> -->
+ <?php
+ $sql = "SELECT fkt_bez, fkt_ID FROM `fhiiqm`.`Funktion` ORDER BY 1";
+ if ($result = $dbc->queryObjectArray($sql))
+ {
+ foreach ($result as $row)
+ {
+ if ($row->fkt_ID == $fkt['func'])
+ echo "<option selected value=\"$row->fkt_ID\">$row->fkt_bez</option>\n";
+ else
+ echo "<option value=\"$row->fkt_ID\">$row->fkt_bez</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr><td>Geltungsbereich
+ <?php if ($fkt["func"]=='KST') echo "<span> = Kostenstelle</span>"; ?>
+ </td>
+ <td valign="top">
+ <?php
+ if (isset($fkt['func']) && $fkt["func"]=='AL')
+ {
+ echo "<select name='fkt[ber]'>\n";
+ $sql = "SELECT abt_ID,abt_name,abt_long FROM `fhiiqm`.`Abteilung`";
+ if ($result = $dbc->queryObjectArray($sql))
+ {
+ foreach ($result as $row)
+ {
+ if ($row->abt_name == $fkt['ber'])
+ echo "<option selected value=\"$row->abt_name\">$row->abt_name</option>\n";
+ else
+ echo "<option value=\"$row->abt_name\">$row->abt_name</option>\n";
+ }
+ }
+ echo "</select>";
+ }
+ elseif (isset($fkt['func']) && $fkt["func"]=='AGL')
+ {
+ echo "<select name='fkt[ber]'>\n";
+ $sql = "SELECT rag_bez, abt_name FROM `fhiiqm`.`RaumArb_Gruppe` rag INNER JOIN fhiiqm.Abteilung a
+ ON rag.abt_ID=a.abt_ID ORDER BY rag.abt_ID, rag_ID";
+ if ($result = $dbc->queryObjectArray($sql))
+ {
+ foreach ($result as $row)
+ {
+ if ($row->rag_bez == $fkt['ber'])
+ echo "<option selected value=\"$row->rag_bez\">$row->rag_bez, $row->abt_name</option>\n";
+ else
+ echo "<option value=\"$row->rag_bez\">$row->rag_bez, $row->abt_name</option>\n";
+ }
+ }
+ echo "</select>";
+ }
+ else
+ {
+ ?>
+ <input class="long20" type="text" name="fkt[ber]" id="ber" maxlength="50" value="<?php echo $fkt['ber']; ?>" onfocus="this.select();"/>
+ <?php } ?>
+ </td>
+ </tr>
+ <tr><td>Beginn</td>
+ <td valign="top"><input class="long10" type="text" name="fkt[von]" id="von" value="<?php echo $fkt['von']; ?>"/>
+ </td>
+ </tr>
+ <tr><td>Ende</td>
+ <td valign="top"><input class="long10" type="text" name="fkt[bis]" id="bis" value="<?php echo $fkt['bis']; ?>"/>
+ </td>
+ </tr>
+ <tr><td>Bemerkung</td>
+ <td valign="top"><textarea name="fkt[bem]" id="bem" rows="3" cols="33"><?php echo $fkt['bem']; ?></textarea>
+ </td>
+ </tr>
+ <?php
+ if ($sub || $del)
+ {
+ if ($sub)
+ $frage = "Alle Angaben ok?";
+ elseif ($del)
+ $frage = "Beauftragung wirklich löschen?";
+ echo "<tr>
+ <td class=\"red\" valign=\"top\" align=\"left\">$frage</td>
+ <td><input type=\"checkbox\" name=\"ok\" value=\"1\"";
+ if ($ok) echo "checked";
+ echo "></td>\n</tr>\n";
+ }
+ if (!is_null($_SESSION["recht"]) && in_array("fme",$_SESSION["recht"]))
+ {
+ ?>
+ <tr><td> </td>
+ <td><input class="button" type="submit" name="eintragen" value=" eintragen " />
+ <?php
+ if ($mfid)
+ {
+ echo " <input class=\"buttonr\" type=\"submit\" value=\"löschen\" name=\"del\" title=\"delete\" />";
+ echo " <input class=\"button\" type=\"submit\" value=\"duplizieren\" name=\"dup\" title=\"delete\" />";
+ }
+ ?>
+ </td>
+ </tr>
+ <?php
+ }
+ ?>
+<!-- </div> -->
+ </table>
+ <input type="hidden" name="fkt[pid]" id="pid" value="<?php echo $fkt['pid']; ?>"/>
+ <input type="hidden" name="fkt[fid]" id="fid" value="<?php echo $fkt['fid']; ?>"/>
+
+<?php
+ echo "</div>\n";
+// if (!is_null($_SESSION["recht"]) && !in_array("fme", $_SESSION["recht"]))
+ echo "<p class='sc'> <a href=\"ma_fkt_flist.php?$getp\" target=\"_self\" title=\"Funktionen\">« zur Funktionenliste</a></p>\n";
+ echo "</form>\n";
?>
\ No newline at end of file