コード例 #1
0
include_once $root . "/backoffice/templates/functions.php";
include_once $root . "/backoffice/reservierung/tagesuebersicht.php";
include_once $root . "/include/reservierungFunctions.inc.php";
include_once $root . "/include/datumFunctions.inc.php";
$reservierung_id = $_POST["reservierung_id"];
$bisMinute = $_POST["bisMinute"];
$vonMinute = $_POST["vonMinute"];
$vonStunde = $_POST["vonStunde"];
$bisStunde = $_POST["bisStunde"];
$tisch_id = $_POST["table_id"];
$raum_id = $_POST["raum_id"];
$datumVon = $_POST["datumVon"];
$tag = getTagFromDatePicker($datumVon);
$monat = getMonatFromDatePicker($datumVon);
$jahr = getJahrFromDatePicker($datumVon);
if (isBlock($raum_id, $tisch_id, $vonMinute, $vonStunde, $tag, $monat, $jahr, $bisMinute, $bisStunde, $tag, $monat, $jahr)) {
    $fehler = true;
    $nachricht = "Wegen der Blockierung wurde die Reservierung nicht erfolgreich geändert!";
    include_once "./dispAendern.php";
    exit;
} else {
    if (hasReservierung($reservierung_id, $tisch_id, $vonMinute, $vonStunde, $tag, $monat, $jahr, $bisMinute, $bisStunde, $tag, $monat, $jahr)) {
        $fehler = true;
        $nachricht = "Im neuen Zeitraum ist andere Reservierung vorhanden!";
        include_once "./dispAendern.php";
        exit;
    }
}
changeReservationTime($reservierung_id, $tisch_id, $vonMinute, $vonStunde, $bisMinute, $bisStunde, $tag, $monat, $jahr);
?>
<script>
コード例 #2
0
 if ($anzahlRes == "true") {
     $fehler = true;
     $nachricht = "In diesem Zeitraum gibt es noch andere Reservierungen";
 } else {
     //anonymen gast eintragen:
     if ($gast_id == ANONYMER_GAST_ID) {
         //do nothing
     } else {
         if ($gast_id == NEUER_MIETER) {
             $gast_id = insertMieter($gastro_id, $anrede, $vorname, $nachname, $strasse, $plz, $ort, $land, $email, $tel, $tel2, $fax, $url, $firma, $speech, '', '');
         } else {
             //3. gast ist bereits vorhanden und wurde geändert
             updateMieter($gast_id, $anrede, $vorname, $nachname, $strasse, $plz, $ort, $land, $email, $tel, $tel2, $fax, $url, $firma, $speech);
         }
     }
     if (isBlock($raum_id, $tisch_id, $vonMinute, $vonStunde, $vonTag, $vonMonat, $vonJahr, $bisMinute, $bisStunde, $bisTag, $bisMonat, $bisJahr)) {
         $fehler = true;
         $nachricht = "Wegen einer eingetragenen Blockierung wurde die Reservierung nicht erfolgreich eingetragen!";
     } else {
         if (hasReservierung(0, $tisch_id, $vonMinute, $vonStunde, $vonTag, $vonMonat, $vonJahr, $bisMinute, $bisStunde, $bisTag, $bisMonat, $bisJahr)) {
             $fehler = true;
             $nachricht = "Zum gew�hlten Zeitraum ist andere Reservierung vorhanden!";
         }
     }
     //reservierung eintragen:
     $res = insertReservation1($tisch_id, $gast_id, $anzahlPersonen_default, $vonMinute, $vonStunde, $vonTag, $vonMonat, $vonJahr, $bisMinute, $bisStunde, $bisTag, $bisMonat, $bisJahr, $status);
     if ($res == "true") {
         $info = true;
         $fehler = false;
         $nachricht = getUebersetzung("Die Reservierung wurde erfolgreich ge&auml;ndert.");
     } else {
コード例 #3
0
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 
}