fhiiqm/deprecated/ap_massn_flist.php
changeset 43 70cea8f0e807
parent 33 f1a8785434e4
--- a/fhiiqm/deprecated/ap_massn_flist.php	Fri Jan 17 08:50:55 2014 +0100
+++ b/fhiiqm/deprecated/ap_massn_flist.php	Wed Aug 06 09:42:40 2014 +0200
@@ -1,187 +1,187 @@
-<?php
-
-/**
- * @author Bettina Schwarzer, Fritz-Haber-Institut
- * @copyright 05/2012
- * 
- * Liste Arbeitsplatztyp - AS Massnahme 
- * Tabelle 'AS_Massnahme_Arbplatz' wird nicht mehr genutzt (19.06.2012, bs)
- * 
- */
-
-    error_reporting(E_ALL ^ E_NOTICE);
-    
-    session_start();
-    if (! isset($_SESSION["userid"]))
-    { 
-        include_once ($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/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;
-    }    
-
-?>
-<!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"/> 
-
-    <link type="text/css" href="/fhiiqm/css/jquery/ui-lightness-1.8.21/jquery-ui-1.8.21.custom.css" rel="Stylesheet" />	
-    <script type="text/javascript" src="/fhiiqm/js/jquery/jquery-1.7.2.min.js"></script>
-    <script type="text/javascript" src="/fhiiqm/js/jquery/jquery-ui-1.8.21.custom.min.js"></script>
-
-	<title>Arbplatztyp-AS-Ma&szlig;nahme-Liste</title>
-</head>
-
-<body onload="document.ffilter.filter.focus();">
-
-    <script>
-      $(document).ready(function() {
-        $("#dialog").dialog({
-            	bgiframe: true,
-            	autoOpen: false,
-            	height: 300,
-                width: 400,
-                resizable: true,
-            	modal: true
-                });
-        $('#open0').click(function() {
-    	       $('#dialog').dialog("open");
-                });
-        $('#open1').click(function() {
-    	       $('#dialog').dialog("open");
-                });
-        });
-    </script>
-    
-<?php
-    include_once ($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/func_lib.inc.php");
-	include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
-	$dbc = new dbconnection();
-
-    echo "&nbsp;";  
-    echo "<div class=\"float-br smaller\" valign='top'>";
-    echo "&nbsp;&nbsp;&nbsp;user: " . $_SESSION["userid"];
-    echo "&nbsp;&nbsp;&nbsp;<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=\"Arbeitsplatztypen-AS Massnahmen\" title=\"Arbeitsplatztypen-AS Massnahmen\"/></div>\n";
-    
-    // Felder, nach denen gefiltert werden kann
-    $fields = array(2=>"Gefärdungs-Nr.");
-
-	$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 = "";
-
-
-    $sql = "SELECT ma.arbplatz_typ,arbplatz_typ_bez, ma.asm_ID, m.asm_bez, asm_bem 
-            FROM fhiiqm.AS_Massnahme_Arbplatz ma 
-            LEFT OUTER JOIN Arbplatz_Typ t ON ma.arbplatz_typ=t.arbplatz_typ
-            LEFT OUTER JOIN AS_Massnahme m ON ma.asm_ID=m.asm_ID ";
-    if ($fnum == 4 & $filter > " ")
-        $sql .= " WHERE asm_bez LIKE '%$filter%' ";
-    $sql .= " ORDER BY $sort $dir";
-    
-    $result = $dbc ->queryObjectArray($sql);
-    
-    echo "<div align='center'>\n";
-    echo "<p><b>Liste Arbeitsplatztypen - Ma&szlig;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 jeder Spalte auf- bzw. absteigend sortieren</td></tr>
-            <td class='bigger'>'<img src='/fhiiqm/img/filter.gif' border='0' width='14' hight='11' />' erm&ouml;glicht das Filtern nach Ma&szlig;nahmen</td></tr>\n
-                <tr><td class='bigger'>Klick auf '<img src='/fhiiqm/img/edit.gif' border='0' width='11' hight='11'>' - Bearbeiten Arbeitsplatztyp - Ma&szlig;nahmen</td></tr>\n
-                <tr><td class='bigger'>&nbsp;</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>&nbsp;&nbsp;&nbsp;</p>\n";
-        }
-        echo "<table border='0'>\n";
-        // Listenkopf generieren
-        echo "<tr bgcolor='#68ACBF'>";
-        tab_column(1,"Arbeitsplatz-Typ",$sort,$dir,0,$fnum,$filter,0,9999);
-        tab_column(4,"Ma&szlig;nahmen",$sort,$dir,4,$fnum,$filter,0,9999);
-        echo "<th>Bemerkung</th>";
-        echo "<th>&nbsp;</th></tr>";
-   
-        $vt = "?"; $i=0;
-        if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
-        
-        foreach ($result as $row)
-        {
-            if ($row->arbplatz_typ != $vt)
-            {    
-                if ($vt != "?")
-                { 
-                    echo "</td><td><a href='/fhiiqm/ap_massn_ed.php?i=$vt'><img src=\"/fhiiqm/img/edit.gif\" alt='edit' title='edit' border='0'/></a></td></tr>\n";
-                    if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
-                }
-                echo "<tr bgcolor='" . $bg . "'>";
-                echo "<td>$row->arbplatz_typ - $row->arbplatz_typ_bez</td>";
-            }
-            else echo "<tr bgcolor='" . $bg . "'><td>&nbsp;</td>";
-                
-            echo "<td>$row->asm_bez</td>";
-            if (strlen($row->asm_bem) > 100) 
-            {   
-                $plus = "<a href='#' id='open$i'>...(weiter)</a>";
-                $bem[$i] = $row->asm_bem;
-                $i++;
-            }
-            else $plus = "";    
-            echo "<td>". nl2br(substr($row->asm_bem,0,100)). $plus;  
-            $vt = $row->arbplatz_typ;
-        }
-        echo "</td><td><a href='/fhiiqm/ap_massn_ed.php?i=$vt'><img src=\"/fhiiqm/img/edit.gif\" alt='edit' title='edit' border='0'/></a></td></tr>\n";
-        echo "</table>\n</div>\n";
-    }
-    else
-    {
-            echo "<p class='red'>&nbsp;&nbsp;&nbsp;Leider nichts gefunden f&uuml;r ". $fields["$fnum"] . " wie '$filter'!</p><br /></div>";
-            echo "&nbsp;&nbsp;&nbsp;<a href=\"" . $_SERVER["PHP_SELF"] . "\" target=\"_self\" title=\"Massnahmengen Arbeitsplatztyp\" class=\"sc\">Liste AS-Ma&szlig;nahmen Arbeitsplatztyp</a></p>\n";
-    }
-                echo "<div id='dialog' title='Erl&auml;uterung Ma&szlig;nahme' style='display:none'>";
-                echo nl2br($bem[$i]);
-                echo "</div>";
-?>
-</body>
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 05/2012
+ * 
+ * Liste Arbeitsplatztyp - AS Massnahme 
+ * Tabelle 'AS_Massnahme_Arbplatz' wird nicht mehr genutzt (19.06.2012, bs)
+ * 
+ */
+
+    error_reporting(E_ALL ^ E_NOTICE);
+    
+    session_start();
+    if (! isset($_SESSION["userid"]))
+    { 
+        include_once ($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/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;
+    }    
+
+?>
+<!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"/> 
+
+    <link type="text/css" href="/fhiiqm/css/jquery/ui-lightness-1.8.21/jquery-ui-1.8.21.custom.css" rel="Stylesheet" />	
+    <script type="text/javascript" src="/fhiiqm/js/jquery/jquery-1.7.2.min.js"></script>
+    <script type="text/javascript" src="/fhiiqm/js/jquery/jquery-ui-1.8.21.custom.min.js"></script>
+
+	<title>Arbplatztyp-AS-Ma&szlig;nahme-Liste</title>
+</head>
+
+<body onload="document.ffilter.filter.focus();">
+
+    <script>
+      $(document).ready(function() {
+        $("#dialog").dialog({
+            	bgiframe: true,
+            	autoOpen: false,
+            	height: 300,
+                width: 400,
+                resizable: true,
+            	modal: true
+                });
+        $('#open0').click(function() {
+    	       $('#dialog').dialog("open");
+                });
+        $('#open1').click(function() {
+    	       $('#dialog').dialog("open");
+                });
+        });
+    </script>
+    
+<?php
+    include_once ($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/func_lib.inc.php");
+	include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
+	$dbc = new dbconnection();
+
+    echo "&nbsp;";  
+    echo "<div class=\"float-br smaller\" valign='top'>";
+    echo "&nbsp;&nbsp;&nbsp;user: " . $_SESSION["userid"];
+    echo "&nbsp;&nbsp;&nbsp;<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=\"Arbeitsplatztypen-AS Massnahmen\" title=\"Arbeitsplatztypen-AS Massnahmen\"/></div>\n";
+    
+    // Felder, nach denen gefiltert werden kann
+    $fields = array(2=>"Gefärdungs-Nr.");
+
+	$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 = "";
+
+
+    $sql = "SELECT ma.arbplatz_typ,arbplatz_typ_bez, ma.asm_ID, m.asm_bez, asm_bem 
+            FROM fhiiqm.AS_Massnahme_Arbplatz ma 
+            LEFT OUTER JOIN Arbplatz_Typ t ON ma.arbplatz_typ=t.arbplatz_typ
+            LEFT OUTER JOIN AS_Massnahme m ON ma.asm_ID=m.asm_ID ";
+    if ($fnum == 4 & $filter > " ")
+        $sql .= " WHERE asm_bez LIKE '%$filter%' ";
+    $sql .= " ORDER BY $sort $dir";
+    
+    $result = $dbc ->queryObjectArray($sql);
+    
+    echo "<div align='center'>\n";
+    echo "<p><b>Liste Arbeitsplatztypen - Ma&szlig;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 jeder Spalte auf- bzw. absteigend sortieren</td></tr>
+            <td class='bigger'>'<img src='/fhiiqm/img/filter.gif' border='0' width='14' hight='11' />' erm&ouml;glicht das Filtern nach Ma&szlig;nahmen</td></tr>\n
+                <tr><td class='bigger'>Klick auf '<img src='/fhiiqm/img/edit.gif' border='0' width='11' hight='11'>' - Bearbeiten Arbeitsplatztyp - Ma&szlig;nahmen</td></tr>\n
+                <tr><td class='bigger'>&nbsp;</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>&nbsp;&nbsp;&nbsp;</p>\n";
+        }
+        echo "<table border='0'>\n";
+        // Listenkopf generieren
+        echo "<tr bgcolor='#68ACBF'>";
+        tab_column(1,"Arbeitsplatz-Typ",$sort,$dir,0,$fnum,$filter,0,9999);
+        tab_column(4,"Ma&szlig;nahmen",$sort,$dir,4,$fnum,$filter,0,9999);
+        echo "<th>Bemerkung</th>";
+        echo "<th>&nbsp;</th></tr>";
+   
+        $vt = "?"; $i=0;
+        if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
+        
+        foreach ($result as $row)
+        {
+            if ($row->arbplatz_typ != $vt)
+            {    
+                if ($vt != "?")
+                { 
+                    echo "</td><td><a href='/fhiiqm/ap_massn_ed.php?i=$vt'><img src=\"/fhiiqm/img/edit.gif\" alt='edit' title='edit' border='0'/></a></td></tr>\n";
+                    if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
+                }
+                echo "<tr bgcolor='" . $bg . "'>";
+                echo "<td>$row->arbplatz_typ - $row->arbplatz_typ_bez</td>";
+            }
+            else echo "<tr bgcolor='" . $bg . "'><td>&nbsp;</td>";
+                
+            echo "<td>$row->asm_bez</td>";
+            if (strlen($row->asm_bem) > 100) 
+            {   
+                $plus = "<a href='#' id='open$i'>...(weiter)</a>";
+                $bem[$i] = $row->asm_bem;
+                $i++;
+            }
+            else $plus = "";    
+            echo "<td>". nl2br(substr($row->asm_bem,0,100)). $plus;  
+            $vt = $row->arbplatz_typ;
+        }
+        echo "</td><td><a href='/fhiiqm/ap_massn_ed.php?i=$vt'><img src=\"/fhiiqm/img/edit.gif\" alt='edit' title='edit' border='0'/></a></td></tr>\n";
+        echo "</table>\n</div>\n";
+    }
+    else
+    {
+            echo "<p class='red'>&nbsp;&nbsp;&nbsp;Leider nichts gefunden f&uuml;r ". $fields["$fnum"] . " wie '$filter'!</p><br /></div>";
+            echo "&nbsp;&nbsp;&nbsp;<a href=\"" . $_SERVER["PHP_SELF"] . "\" target=\"_self\" title=\"Massnahmengen Arbeitsplatztyp\" class=\"sc\">Liste AS-Ma&szlig;nahmen Arbeitsplatztyp</a></p>\n";
+    }
+                echo "<div id='dialog' title='Erl&auml;uterung Ma&szlig;nahme' style='display:none'>";
+                echo nl2br($bem[$i]);
+                echo "</div>";
+?>
+</body>
 </html>
\ No newline at end of file