fhiiqm/test/raum_list.php
changeset 1 6288d5685bff
child 24 15f33315f045
equal deleted inserted replaced
0:ef68113ff309 1:6288d5685bff
       
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       
     3 
       
     4 <head>
       
     5 	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
       
     6    	<link href="css/db.css" rel="STYLESHEET" type="TEXT/CSS" /> 
       
     7 
       
     8 	<title>Raumliste</title>
       
     9 </head>
       
    10 
       
    11 <body>
       
    12 
       
    13 <?php
       
    14 
       
    15 /**
       
    16  * @author Bettina Schwarzer, Fritz-Haber-Institut
       
    17  * @copyright 07/2011
       
    18  * 
       
    19  * Liste Raeume
       
    20  */
       
    21 
       
    22     error_reporting(E_ALL ^ E_NOTICE);
       
    23     
       
    24 	include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
       
    25 	$dbc = new dbconnection();
       
    26 
       
    27     if (!$start) $start=0;
       
    28     $sql = "SELECT raum_ID, raum_nr, raum_name, geb_ID, r.raumtyp_ID, raumtyp_bez, raum_flaeche, raum_file 
       
    29             FROM `fhiiqm`.`Raum` r LEFT OUTER JOIN fhiiqm.Raum_Typ t ON r.raumtyp_ID = t.raumtyp_ID
       
    30             ORDER BY geb_ID, raum_nr ";  // LIMIT $start,20 ;";
       
    31     $result = $dbc ->queryObjectArray($sql);
       
    32     if ($result)
       
    33     {
       
    34 		$bg1 = "#F8F8F8";
       
    35 		$bg2 = "#DEDFE1";
       
    36 		$bg = "#FFFFFF";
       
    37         
       
    38      
       
    39         echo "<div align='center'>\n";
       
    40         echo "<p><b>Liste der erfassten R&auml;ume</b></p>\n";
       
    41         printf ("<p>Es wurden %s R&auml;ume gefunden.</p>", $dbc->numrows($sql));
       
    42         echo "<table>\n";
       
    43         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>
       
    44                 </tr>\n";
       
    45         foreach ($result as $row)
       
    46         {
       
    47 			if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
       
    48             echo "<tr bgcolor='" . $bg . "'><td><b>$row->raum_nr</b></td>";    
       
    49             echo "<td>$row->raum_name</td>";
       
    50             echo "<td>$row->geb_ID</td>";
       
    51             echo "<td>$row->raumtyp_bez</td>";
       
    52             echo "<td>" . str_replace(".",",",$row->raum_flaeche) . "</td>";
       
    53             echo "<td><a href=\"raeume/$row->raum_file\">$row->raum_file</td>";
       
    54             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";
       
    55         }
       
    56         echo "</table></div>\n";
       
    57     }
       
    58     $dbc -> close();
       
    59     echo "<p>&nbsp;&nbsp;&nbsp;<a href=\"/fhiiqm/raum_ins.php\" target=\"_self\" title=\"Raum erfassen\">Weiteren Raum erfassen</a></p>\n";    
       
    60 
       
    61 ?>
       
    62 </body>
       
    63 </html>