fhiiqm/test/raum_list.php
changeset 1 6288d5685bff
child 24 15f33315f045
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fhiiqm/test/raum_list.php	Wed Aug 31 14:22:19 2011 +0200
@@ -0,0 +1,63 @@
+<!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" /> 
+
+	<title>Raumliste</title>
+</head>
+
+<body>
+
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 07/2011
+ * 
+ * Liste Raeume
+ */
+
+    error_reporting(E_ALL ^ E_NOTICE);
+    
+	include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
+	$dbc = new dbconnection();
+
+    if (!$start) $start=0;
+    $sql = "SELECT raum_ID, raum_nr, raum_name, geb_ID, r.raumtyp_ID, raumtyp_bez, raum_flaeche, raum_file 
+            FROM `fhiiqm`.`Raum` r LEFT OUTER JOIN fhiiqm.Raum_Typ t ON r.raumtyp_ID = t.raumtyp_ID
+            ORDER BY geb_ID, raum_nr ";  // LIMIT $start,20 ;";
+    $result = $dbc ->queryObjectArray($sql);
+    if ($result)
+    {
+		$bg1 = "#F8F8F8";
+		$bg2 = "#DEDFE1";
+		$bg = "#FFFFFF";
+        
+     
+        echo "<div align='center'>\n";
+        echo "<p><b>Liste der erfassten R&auml;ume</b></p>\n";
+        printf ("<p>Es wurden %s R&auml;ume gefunden.</p>", $dbc->numrows($sql));
+        echo "<table>\n";
+        echo "<tr bgcolor='#68ACBF'><th>Raum-Nr.</th><th>Bezeichnung</th><th>Haus</th><th>Typ</th><th>Fl&auml;che (m<sup>2</sup>)</th><th>Raumplan</th><th>&nbsp;</th>
+                </tr>\n";
+        foreach ($result as $row)
+        {
+			if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
+            echo "<tr bgcolor='" . $bg . "'><td><b>$row->raum_nr</b></td>";    
+            echo "<td>$row->raum_name</td>";
+            echo "<td>$row->geb_ID</td>";
+            echo "<td>$row->raumtyp_bez</td>";
+            echo "<td>" . str_replace(".",",",$row->raum_flaeche) . "</td>";
+            echo "<td><a href=\"raeume/$row->raum_file\">$row->raum_file</td>";
+            echo "<td><a href='/fhiiqm/raum_upd.php?uid=$row->raum_ID'><img src=\"/fhiiqm/img/edit.gif\" alt='edit' title='edit' border='0'/></a></td></tr>\n";
+        }
+        echo "</table></div>\n";
+    }
+    $dbc -> close();
+    echo "<p>&nbsp;&nbsp;&nbsp;<a href=\"/fhiiqm/raum_ins.php\" target=\"_self\" title=\"Raum erfassen\">Weiteren Raum erfassen</a></p>\n";    
+
+?>
+</body>
+</html>
\ No newline at end of file