mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <[email protected]>,
|
||||
* Andreas Oesterreicher <[email protected]> and
|
||||
* Rudolf Hangl <[email protected]>.
|
||||
*/
|
||||
require_once('../../config.inc.php');
|
||||
require_once('../../../include/ort.class.php');
|
||||
require_once('../../../include/raumtyp.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
|
||||
if(!$conn = pg_pconnect(CONN_STRING))
|
||||
die('Fehler beim Connecten zur Datenbank');
|
||||
|
||||
$datum = (isset($_POST['datum'])?$_POST['datum']:date('d.m.Y'));
|
||||
$vonzeit = (isset($_POST['vonzeit'])?$_POST['vonzeit']:date('H:i'));
|
||||
$biszeit = (isset($_POST['biszeit'])?$_POST['biszeit']:date('H:i', mktime(date('H')+1,date('i'))));
|
||||
$raumtyp = (isset($_POST['raumtyp'])?$_POST['raumtyp']:'');
|
||||
$anzahlpersonen = (isset($_POST['anzahlpersonen'])?$_POST['anzahlpersonen']:'');
|
||||
$sent = true; //isset($_POST['sent']);
|
||||
$datum_obj = new datum();
|
||||
|
||||
echo '
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Reservierungsliste</title>
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" type="text/css">
|
||||
</head>
|
||||
<body id="inhalt">
|
||||
<H2><table class="tabcontent">
|
||||
<tr>
|
||||
<td> <a class="Item" href="index.php">Lehrveranstaltungsplan</a> >> Raumsuche</td>
|
||||
<td align="right"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</H2>
|
||||
';
|
||||
|
||||
echo '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">
|
||||
Datum* <input type="text" name="datum" size="10" value="'.$datum.'">
|
||||
Von* <input type="text" name="vonzeit" size="5" value="'.$vonzeit.'">
|
||||
Bis* <input type="text" name="biszeit" size="5" value="'.$biszeit.'">
|
||||
Raumtyp: <SELECT name="raumtyp">
|
||||
<OPTION value="">Alle</OPTION>';
|
||||
$raumtyp_obj = new raumtyp($conn);
|
||||
$raumtyp_obj->getAll();
|
||||
|
||||
foreach ($raumtyp_obj->result as $row)
|
||||
{
|
||||
if($raumtyp==$row->raumtyp_kurzbz)
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
|
||||
echo '<OPTION value="'.$row->raumtyp_kurzbz.'" '.$selected.'>'.$row->raumtyp_kurzbz.'</OPTION>';
|
||||
}
|
||||
echo ' </SELECT>
|
||||
Anzahl Personen <input type="text" size="3" name="anzahlpersonen" value="'.$anzahlpersonen.'">
|
||||
<input type="submit" name="sent" value="Suchen" />
|
||||
</form>';
|
||||
if($sent)
|
||||
{
|
||||
$ort = new ort($conn);
|
||||
$ort->search($datum, $vonzeit, $biszeit, $raumtyp, $anzahlpersonen, true);
|
||||
|
||||
echo '<br><table>';
|
||||
echo '<tr class="liste"><td>Raum</td><td>Bezeichnung</td><td>Nummer</td><td>Personen</td><td>Reservieren</td></tr>';
|
||||
$i=0;
|
||||
$datum_sec = $datum_obj->mktime_datum($datum);
|
||||
foreach ($ort->result as $row)
|
||||
{
|
||||
$i++;
|
||||
echo '<tr class="liste'.($i%2).'">';
|
||||
echo "<td>$row->ort_kurzbz</td>";
|
||||
echo "<td>$row->bezeichnung</td>";
|
||||
echo "<td>$row->planbezeichnung</td>";
|
||||
echo "<td>$row->max_person</td>";
|
||||
echo "<td><a href='stpl_week.php?type=ort&ort_kurzbz=$row->ort_kurzbz&datum=".$datum_sec."' class='Item'>Reservieren</a></td>";
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user