--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fhiiqm/deprecated/as_massn_flist.php Fri Dec 21 15:31:50 2012 +0100
@@ -0,0 +1,141 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 06/2012
+ *
+ * Liste Arbeitssicherheit - Massnahmen
+ *
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ("inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("asr",$_SESSION["recht"]) && !in_array("ase",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
+ include_once ($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/func_lib.inc.php");
+ include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
+ if (!isset($dbc) || !$dbc) $dbc = new dbconnection();
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+ <link href="css/db.css" rel="STYLESHEET" type="TEXT/CSS" media="screen"/>
+ <link href="css/db_print.css" rel="STYLESHEET" type="TEXT/CSS" media="print"/>
+
+ <title>Arbeitssicherheit-Maßnahmen-Liste</title>
+</head>
+
+<body onload="document.ffilter.filter.focus();">
+
+<?php
+
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"img/role.png\" border=\"0\" alt=\"AS Massnahmen\" title=\"AS Massnahmen\"/></div>\n";
+
+ // Felder, nach denen gefiltert werden kann
+ $fields = array(2=>"Maßnahme-Bezeichnung");
+
+ $sort = $_GET["s"]; // Sortierung nach Spalte
+ if (!isset($sort) && !$sort) $sort = $_POST["s"];
+
+ $dir = $_GET["d"]; // Sortierrichtung
+ if (!isset($dir) && !$dir) $dir = $_POST["d"];
+
+ $fnum = $_GET["f"]; // Spaltennummer, nach der aktuell gefiltert wird
+ if (!isset($fnum) && !$fnum) $fnum = $_POST["f"];
+
+ $filter = $_POST["filter"];
+ if (!isset($filter) && !$filter) $filter = $_GET["b"];
+
+ $subf = $_POST["subf"]; // submit
+
+ if (!isset($fnum) && !$fnum) $fnum = 1;
+ if (!isset($filter) && !$filter) $filter = "";
+ if (!isset($sort) && !$sort) $sort = 1;
+ if (!isset($dir) && !$dir) $dir = "";
+
+ if ($fnum == 2 && $filter>" ") $where = " WHERE asm_bez LIKE '%" . $filter ."%'"; else $where = "";
+ $sql = "SELECT asm_ID,asm_bez,asm_bem FROM fhiiqm.AS_Massnahme $where ";
+ $sql .= " ORDER BY $sort $dir";
+
+ $result = $dbc ->queryObjectArray($sql);
+
+ echo "<div align='center'>\n";
+ echo "<p><b>Liste Arbeitssicherheit - Maßnahmen</b></p>\n";
+
+ if ($result)
+ {
+ $bg1 = "#F8F8F8";
+ $bg2 = "#DEDFE1";
+ $bg = "#FFFFFF";
+
+ echo "<table border='0' cellspacing='0'>\n";
+ echo "<tr><td class='bigger'>Mittels '<img src='/fhiiqm/img/auf.gif' border='0' width='11' hight='11' />' / '<img src='/fhiiqm/img/ab.gif' border='0' width='11' hight='11' />'
+ können Sie nach Maßnahmen auf- bzw. absteigend sortieren</td></tr>
+ <tr><td class='bigger'>'<img src='/fhiiqm/img/filter.gif' border='0' width='14' hight='11' />' ermöglicht das Filtern nach Maßnahmen</td></tr>\n
+ <tr><td class='bigger'>Klick auf '<img src='/fhiiqm/img/edit.gif' border='0' width='11' hight='11'>' - Bearbeiten Maßnahme</td></tr>\n
+ <tr><td class='bigger'> </td></tr>";
+ echo "</table>\n";
+
+ if (isset($fnum) && $fnum>1 && !$filter && !$subf)
+ {
+ // Formular anzeigen fuer Filterbegriff
+ $text = $fields[$fnum];
+ echo "<form action=" . $_SERVER['PHP_SELF'] . " method='post' enctype='application/x-www-form-urlencoded' id='ffilter' name='ffilter' target='_self'>\n";
+ echo "<input type='hidden' name='f' value='$fnum'>";
+ echo "<table width=\"30%\" border=\"0\">\n";
+ echo "<tr><td>filtern nach $text: </td>";
+ echo "<td><input id='filter' name='filter' type=\"text\" size=\"30\" maxlength=\"30\" value=\"$filter\"/></td>";
+ echo "<td><input class=\"button\" type=\"submit\" value=\"finden\" name=\"subf\" title=\"subf\" /></td></tr></table>\n";
+ echo "</form>\n";
+ echo "<p> </p>\n";
+ }
+
+ echo "<table border='0'>\n";
+ if ($fnum == 2) $filt = "filter_activ"; else $filt = "filter";
+ echo "<tr bgcolor='#68ACBF'>";
+// <th>Massnahme <a href='".$_SERVER['PHP_SELF']."?f=2'><img src='/fhiiqm/img/$filt.gif' border='0' width='14' hight='11' alt='Filter Massnahme' title='Filter Massnahme'></a></th>";
+ tab_column(2,"Maßnahme",$sort,$dir,2,$fnum,$filter,0,9999);
+ echo "<th>Bemerkung</th>";
+ echo "<th> </th></tr>";
+
+ if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
+ foreach ($result as $row)
+ {
+ echo "<tr bgcolor='" . $bg . "'>";
+ echo "<td>$row->asm_bez</td>";
+ echo "<td>".nl2br($row->asm_bem) ."</td>";
+ echo "</td><td><a href='/fhiiqm/as_massn_ed.php?i=$row->asm_ID'><img src=\"/fhiiqm/img/edit.gif\" alt='edit' title='edit' border='0'/></a></td>
+ </tr>\n";
+ }
+ echo "</table>\n";
+ echo "</div>\n";
+ }
+ else
+ {
+ echo "<p class='red'> Leider nichts gefunden für ". $fields["$fnum"] . " wie '$filter'!</p><br /></div>";
+ echo " <a href=\"" . $_SERVER["PHP_SELF"] . "\" target=\"_self\" title=\"AS Massnahme\" class=\"sc\">Liste AS Maßnahmen</a></p>\n";
+ }
+ echo " <a href=\"/fhiiqm/as_massn_ed.php\" target=\"_self\" title=\"AS Maßnahme erfassen\" class=\"sc\">weitere AS Maßnahme erfassen</a></p>\n";
+?>
+
+</body>
+</html>
\ No newline at end of file