<div name="footer" id="footer" class="<?php 
echo SCHRIFT_KLEIN;
?>
"
			 
			align="center">
			<a href="http://www.utilo.eu/" class="<?php 
echo SCHRIFT_KLEIN;
?>
">
				Rezervi Table V 0.1 &copy; UTILO 2008 
			</a>
		</div>
		<?php 
//fuer jeden tisch einen eigenen layer vorbereiten:
$res = getTische($raum_id);
while ($d = $res->FetchNextObject()) {
    $id = $d->TISCHNUMMER;
    $beschreibung = $d->BESCHREIBUNG;
    $maxBelegung = $d->MAXIMALE_BELEGUNG;
    $minBelegung = $d->MINIMALE_BELEGUNG;
    ?>
						<div name="tischInfo_<?php 
    echo $id;
    ?>
" id="tischInfo_<?php 
    echo $id;
    ?>
" 
							style="visibility:hidden;z-index:<?php 
    echo $zindex++;
<?php

$root = "../..";
$ueberschrift = "Reservierungen bearbeiten";
/*
 * Created on 24.09.2007
 * Author: LI Haitao
 * Company: Alpstein-Austria
 * Anzeige die Reservierungslist in einem Tag  
 */
include_once $root . "/backoffice/reservierung/tagesuebersicht.php";
include_once $root . "/include/mietobjektFunctions.inc.php";
include_once $root . "/templates/constants.inc.php";
$tischs = getTische($raum_id);
$vorhanden = "false";
while ($tisch = $tischs->FetchNextObject()) {
    $hasRes = showReservierungen(0, 59, 0, 23, $tag, $monate, $jahr, $gastro_id, $tisch->TISCHNUMMER, MODUS_WEBINTERFACE, true, "index.php", "", $raum_id, $tag . "/" . $monate . "/" . $jahr, $ansicht);
    if ($vorhanden == "false") {
        $vorhanden = $hasRes;
    }
}
if ($vorhanden == "false") {
    ?>
	<table class="frei">
		<tr>
			<td><?php 
    echo getUebersetzung("Keine Reservierungen an diesem Tag vorhanden");
    ?>
.</td>
		</tr>
	</table><?php 
echo $typ;
?>
" />
  			<tr>
  				<td>
					<select name="moId" id="moId">
							<option value="alle"><?php 
echo getUebersetzung("alle");
?>
</option>
							<?php 
$raum_res = getRaeume($gastro_id);
while ($l = $raum_res->FetchNextObject()) {
    $raum_bez = $l->BEZEICHNUNG;
    $raum_id = $l->RAUM_ID;
    $tisch_res = getTische($raum_id);
    while ($t = $tisch_res->FetchNextObject()) {
        $tisch_id = $t->TISCHNUMMER;
        $raum_tisch = $raum_bez . "/" . $tisch_id;
        ?>
									<option value="<?php 
        echo $tisch_id;
        ?>
"><?php 
        echo $raum_tisch;
        ?>
</option>			  						
								<?php 
    }
}
?>
/**
 * author:coster
 * date: 29.9.06
 * löscht einen raum
 * */
function deleteRaum($mietobjekt_id)
{
    global $db;
    $res = getTische($mietobjekt_id);
    while ($d = $res->FetchNextObject()) {
        $id = $d->TISCH_ID;
    }
    //mietobjekt selbst löschen
    $query = "DELETE FROM \n\t\t\t\tBOOKLINE_RAUM\n\t\t\t\twhere\n\t\t\t\tRAUM_ID = '{$mietobjekt_id}'\n\t\t   ";
    $res = $db->Execute($query);
    if (!$res) {
        print $db->ErrorMsg();
        return false;
    } else {
        return true;
    }
}
?>
"/>
		<input name="sprache" type="hidden" id="sprache" value="<?php 
echo $sprache;
?>
"/>
		<input name="doChangeReservation" type="hidden" value="true"/>
		<tr>
			<td align="left"><?php 
echo getUebersetzung("Tisch");
?>
:</td>
			<td><select name="table_id"  id="table_id"> <?php 
$rooms = getRaeume($gastro_id);
while ($room = $rooms->FetchNextObject()) {
    $tables = getTische($room->RAUM_ID);
    while ($table = $tables->FetchNextObject()) {
        ?>
					<option value="<?php 
        echo $table->TISCHNUMMER;
        ?>
"<?php 
        if ($tisch_id == $table->TISCHNUMMER) {
            echo " selected=\"selected\"";
        }
        ?>
>
							<?php 
        echo $table->TISCHNUMMER;
        ?>
					</option> 
function showDayDetail($ansicht, $tag, $monate, $jahr, $raum_id, $gastro_id, $modus)
{
    global $root;
    include_once $root . "/include/reservierungFunctions.inc.php";
    include_once $root . "/include/mieterFunctions.inc.php";
    include_once $root . "/include/oeffnungszeitenFunktions.inc.php";
    ?>
	
	<table class="moduletable_reservierung" id="show">
		<tr>
		<th width=80 scope="col" onclick="javascript:newload(0, 0, 0, 0, 0, 0)"> &nbsp;<?php 
    echo getRaumBezeichnung($raum_id);
    ?>
&nbsp; </th>
	  	<?php 
    $time = getOeffnungszeit(1)->FetchNextObject();
    $timeVon = 7;
    $timeBis = 23;
    $lang = $timeBis - $timeVon + 2;
    for ($i = $timeVon; $i <= $timeBis; $i++) {
        ?>
	  		 <th scope="col" colspan="2" onclick="javascript:newload(0, 0, 0, 0, 0, 0)">
	  		 	<?php 
        echo $i;
        ?>
</th><?php 
    }
    ?>
  		</tr> <?php 
    //get tables to the room:
    $res = getTische($raum_id);
    while ($d = $res->FetchNextObject()) {
        ?>
  		<tr>
    		<td align="middle" scope="row" onclick="javascript:newload(0, 0, 0, 0, 0, 0)" > &nbsp;
    		<?php 
        echo getUebersetzung("Tisch") . " " . ($tisch_id = $d->TISCHNUMMER);
        ?>
</td><?php 
        for ($i = $timeVon; $i <= $timeBis + 0.5; $i = $i + 0.5) {
            $colspan = 1;
            $vonStunde = (int) $i;
            $vonMinute = ($i - $vonStunde) * 60;
            $isFree = true;
            if (isBlock($raum_id, $tisch_id, $vonMinute, $vonStunde, $tag, $monate, $jahr, $vonMinute + 29, $vonStunde, $tag, $monate, $jahr)) {
                ?>
<td id="<?php 
                echo getID("2", $tisch_id, $vonStunde, $vonMinute);
                ?>
" scope="col" colspan="<?php 
                echo $colspan;
                ?>
" class="block"
			 				onclick="javascript:newload(2, 0, 0, 0, 0, 0)" >
					</td> <?php 
                $isFree = false;
            } else {
                $status = getStatus($tisch_id, $vonMinute, $vonStunde, $tag, $monate, $jahr, $vonMinute + 29, $vonStunde, $tag, $monate, $jahr);
                if (isset($status) && sizeof($status) >= 1) {
                    $statusString = BELEGT;
                    $resId = getReservierungID($tisch_id, $vonMinute + 15, $vonStunde, $tag, $monate, $jahr);
                    $colspan = getDurationOfReservierung($resId) / 0.5;
                    if ($colspan > 0) {
                        $isFree = false;
                        $i = $i + $colspan / 2 - 0.5;
                        ?>
<td id="<?php 
                        echo getID("1", $tisch_id, $vonStunde, $vonMinute + 15);
                        ?>
" title="<?php 
                        echo showInfo($resId);
                        ?>
" scope="col" colspan="<?php 
                        echo $colspan;
                        ?>
" class="<?php 
                        echo $statusString;
                        ?>
"
				 				onclick="javascript:newload(this.id, <?php 
                        echo $gastro_id;
                        ?>
, <?php 
                        echo $raum_id;
                        ?>
, <?php 
                        echo $tag;
                        ?>
, <?php 
                        echo $monate;
                        ?>
, <?php 
                        echo $jahr;
                        ?>
)" >
							</td> <?php 
                    } else {
                        $isFree = true;
                    }
                }
                if ($isFree) {
                    $statusString = FREI;
                    ?>
<td id="<?php 
                    echo getID("0", $tisch_id, $vonStunde, $vonMinute);
                    ?>
" scope="col" colspan="<?php 
                    echo $colspan;
                    ?>
" class="<?php 
                    echo $statusString;
                    ?>
"
								onclick="javascript:newload(this.id, <?php 
                    echo $gastro_id;
                    ?>
, <?php 
                    echo $raum_id;
                    ?>
, <?php 
                    echo $tag;
                    ?>
, <?php 
                    echo $monate;
                    ?>
, <?php 
                    echo $jahr;
                    ?>
)" >
							
						</td><?php 
                }
                ?>
	<?php 
            }
        }
        ?>
  		<?php 
    }
    ?>
</tr>
  		<div id="panel1">
			<div id="panel1_hd" class="hd"></div>
			<div id="panel1_bd" class="bd" style="height:0px">
			</div>
		</div>
  </table>
  <table  width="100%">
  <tr> 
    <td> 
      <?php 
    $newTag1 = $tag - 1;
    $mon = $monate;
    $jah = $jahr;
    if ($newTag1 < 1) {
        $newTag1 = getNumberOfDaysOfMonth($mon - 1, $jahr);
        $mon = $mon - 1;
    }
    if ($mon < 1) {
        $mon = 12;
        $jah = $jah - 1;
    }
    ?>
      <form action="./index.php" method="post" name="tagZurueck" target="_self" id="monatZurueck">
        <div align="right">           
          <input name="raum_id" type="hidden" id="raum_id" value="<?php 
    echo $raum_id;
    ?>
">
          <input name="tag" type="hidden" id="tag" value="<?php 
    echo $newTag1;
    ?>
">
          <input name="monat" type="hidden" id="monat" value="<?php 
    echo $mon;
    ?>
">
          <input name="ansicht" type="hidden" id="monat" value="<?php 
    echo TAGESANSICHT;
    ?>
">
          <input name="jahr" type="hidden" id="jahr" value="<?php 
    echo $jah;
    ?>
">
          <input name="zurueck" type="submit"  class="button"
       		id="zurueck" value="<?php 
    echo getUebersetzung("einen Tag zurück");
    ?>
">
        </div>
      </form>
	</td>
    <td> 
		<div  align="middle"> 
      	<?php 
    echo getFullDayName($tag, $monate, $jahr) . ", " . $tag . "." . $monate . "." . $jahr;
    ?>
        </div>
	</td>
    <td> 
      <?php 
    $newTag2 = $tag + 1;
    $mon = $monate;
    $jah = $jahr;
    if ($newTag2 > getNumberOfDaysOfMonth($monate, $jahr)) {
        $mon = $mon + 1;
        $newTag2 = 1;
    }
    if ($mon > 12) {
        $mon = 1;
        $jah = $jah + 1;
    }
    ?>
      <form action="./index.php" method="post" name="tagWeiter" target="_self" id="monatWeiter">
        <input name="raum_id" type="hidden" id="raum_id" value="<?php 
    echo $raum_id;
    ?>
">
        <input name="tag" type="hidden" id="tag" value="<?php 
    echo $newTag2;
    ?>
">
        <input name="monat" type="hidden" id="monat" value="<?php 
    echo $mon;
    ?>
">
        <input name="ansicht" type="hidden" id="monat" value="<?php 
    echo TAGESANSICHT;
    ?>
">
        <input name="jahr" type="hidden" id="jahr" value="<?php 
    echo $jah;
    ?>
">
        <input name="weiter" type="submit"  class="button"
       		id="weiter" value="<?php 
    echo getUebersetzung("einen Tag weiter");
    ?>
">
      </form></td>
  </tr>   
</table>
 <?php 
}