mirror of
https://github.com/JannikKoester/Tischverwaltung.git
synced 2026-01-09 14:20:08 +01:00
test
Test
This commit is contained in:
12
bootstrap.min.css
vendored
Normal file
12
bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
73
calender.css
Normal file
73
calender.css
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
ul {list-style-type: none;}
|
||||||
|
body {font-family: Verdana, sans-serif;}
|
||||||
|
|
||||||
|
/* Month header */
|
||||||
|
.month {
|
||||||
|
padding: 70px 25px;
|
||||||
|
width: 100%;
|
||||||
|
background: #1abc9c;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Month list */
|
||||||
|
.month ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.month ul li {
|
||||||
|
color: white;
|
||||||
|
font-size: 20px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Previous button inside month header */
|
||||||
|
.month .prev {
|
||||||
|
float: left;
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Next button */
|
||||||
|
.month .next {
|
||||||
|
float: right;
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Weekdays (Mon-Sun) */
|
||||||
|
.weekdays {
|
||||||
|
margin: 0;
|
||||||
|
padding: 10px 0;
|
||||||
|
background-color:#ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekdays li {
|
||||||
|
display: inline-block;
|
||||||
|
width: 13.6%;
|
||||||
|
color: #666;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Days (1-31) */
|
||||||
|
.days {
|
||||||
|
padding: 10px 0;
|
||||||
|
background: #eee;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.days li {
|
||||||
|
list-style-type: none;
|
||||||
|
display: inline-block;
|
||||||
|
width: 13.6%;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
font-size:12px;
|
||||||
|
color: #777;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Highlight the "current" day */
|
||||||
|
.days li .active {
|
||||||
|
padding: 5px;
|
||||||
|
background: #1abc9c;
|
||||||
|
color: white !important
|
||||||
|
}
|
||||||
161
getTables.php
Normal file
161
getTables.php
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
require 'settings.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(isset($_POST['getTables'])){
|
||||||
|
|
||||||
|
|
||||||
|
$_SESSION["month"] = $_POST['month'];
|
||||||
|
$_SESSION["month_string"] = $_POST['month'];
|
||||||
|
|
||||||
|
$_SESSION["day"] = $_POST['day'];
|
||||||
|
$_SESSION["day_string"] = $_POST['day'];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
switch($_SESSION["month"])
|
||||||
|
{
|
||||||
|
case 'Januar':
|
||||||
|
$_SESSION["month"] = 1;
|
||||||
|
break;
|
||||||
|
case 'Februar':
|
||||||
|
$_SESSION["month"] = 2;
|
||||||
|
break;
|
||||||
|
case 'März':
|
||||||
|
$_SESSION["month"] = 3;
|
||||||
|
break;
|
||||||
|
case 'April':
|
||||||
|
$_SESSION["month"] = 4;
|
||||||
|
break;
|
||||||
|
case 'Mai':
|
||||||
|
$_SESSION["month"] = 5;
|
||||||
|
break;
|
||||||
|
case 'Juni':
|
||||||
|
$_SESSION["month"] = 6;
|
||||||
|
break;
|
||||||
|
case 'Juli':
|
||||||
|
$_SESSION["month"] = 7;
|
||||||
|
break;
|
||||||
|
case 'August':
|
||||||
|
$_SESSION["month"] = 8;
|
||||||
|
break;
|
||||||
|
case 'September':
|
||||||
|
$_SESSION["month"] = 9;
|
||||||
|
break;
|
||||||
|
case 'Oktober':
|
||||||
|
$_SESSION["month"] = 10;
|
||||||
|
break;
|
||||||
|
case 'November':
|
||||||
|
$_SESSION["month"] = 11;
|
||||||
|
break;
|
||||||
|
case 'Dezember':
|
||||||
|
$_SESSION["month"] = 12;
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$month = $_SESSION["month"];
|
||||||
|
$day = $_SESSION["day"];
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='1'";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
// output data of each row
|
||||||
|
while($row = $result->fetch_assoc()) {
|
||||||
|
echo $row['uniqueid'].$row['year'].$row['month'].$row['day'].$row['reserviert'].$row['reserviertvon'].$row['tisch']."<br>" ;
|
||||||
|
$_SESSION["Tisch1"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
$_SESSION["Tisch1"] = "FREI";
|
||||||
|
echo $_SESSION["Tisch1"]."<br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='2'";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
// output data of each row
|
||||||
|
while($row = $result->fetch_assoc()) {
|
||||||
|
echo $row['uniqueid'].$row['year'].$row['month'].$row['day'].$row['reserviert'].$row['reserviertvon'].$row['tisch']."<br>" ;
|
||||||
|
$_SESSION["Tisch2"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
$_SESSION["Tisch2"] = "FREI";
|
||||||
|
echo $_SESSION["Tisch2"]."<br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='3'";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
// output data of each row
|
||||||
|
while($row = $result->fetch_assoc()) {
|
||||||
|
echo $row['uniqueid'].$row['year'].$row['month'].$row['day'].$row['reserviert'].$row['reserviertvon'].$row['tisch']."<br>" ;
|
||||||
|
$_SESSION["Tisch3"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
$_SESSION["Tisch3"] = "FREI";
|
||||||
|
echo $_SESSION["Tisch3"]."<br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='4'";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
// output data of each row
|
||||||
|
while($row = $result->fetch_assoc()) {
|
||||||
|
echo $row['uniqueid'].$row['year'].$row['month'].$row['day'].$row['reserviert'].$row['reserviertvon'].$row['tisch']."<br>" ;
|
||||||
|
$_SESSION["Tisch4"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
$_SESSION["Tisch4"] = "FREI";
|
||||||
|
echo $_SESSION["Tisch4"]."<br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='5'";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
// output data of each row
|
||||||
|
while($row = $result->fetch_assoc()) {
|
||||||
|
echo $row['uniqueid'].$row['year'].$row['month'].$row['day'].$row['reserviert'].$row['reserviertvon'].$row['tisch']."<br>" ;
|
||||||
|
$_SESSION["Tisch5"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
$_SESSION["Tisch5"] = "FREI";
|
||||||
|
echo $_SESSION["Tisch5"]."<br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='6'";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
// output data of each row
|
||||||
|
while($row = $result->fetch_assoc()) {
|
||||||
|
echo $row['uniqueid'].$row['year'].$row['month'].$row['day'].$row['reserviert'].$row['reserviertvon'].$row['tisch']."<br>" ;
|
||||||
|
$_SESSION["Tisch6"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
$_SESSION["Tisch6"] = "FREI";
|
||||||
|
echo $_SESSION["Tisch6"]."<br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
header("location:index.php?result=gotrecords");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
411
index.php
Normal file
411
index.php
Normal file
@@ -0,0 +1,411 @@
|
|||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (session_status() == PHP_SESSION_NONE) {
|
||||||
|
session_start();
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
session_destroy();
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
require 'settings.php';
|
||||||
|
require 'modal.php';
|
||||||
|
|
||||||
|
?>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Document</title>
|
||||||
|
<!-- Latest compiled and minified CSS -->
|
||||||
|
<link rel="stylesheet" href="bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="calender.css">
|
||||||
|
<script src="tables.js"></script>
|
||||||
|
|
||||||
|
<!-- jQuery library -->
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Popper JS -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Latest compiled JavaScript -->
|
||||||
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if(isset($_GET['result']))
|
||||||
|
{
|
||||||
|
if($_GET['result'] == "gotrecords")
|
||||||
|
{
|
||||||
|
echo '<form action="getTables.php" method="post">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="sel1">Monat:</label>
|
||||||
|
<select class="form-control" name="month">
|
||||||
|
<option value ="Januar">Januar</option>
|
||||||
|
<option value ="Februar">Februar</option>
|
||||||
|
<option value ="März">März</option>
|
||||||
|
<option value ="April">April</option>
|
||||||
|
<option value ="Mai">Mai</option>
|
||||||
|
<option value ="Juni">Juni</option>
|
||||||
|
<option value ="Juli">Juli</option>
|
||||||
|
<option value ="August">August</option>
|
||||||
|
<option value ="September">September</option>
|
||||||
|
<option value ="Oktober">Oktober</option>
|
||||||
|
<option value ="November">November</option>
|
||||||
|
<option value ="Dezember">Dezember</option>
|
||||||
|
</select>';
|
||||||
|
echo '<div class="form-group">
|
||||||
|
|
||||||
|
<label for="sel1">Tag:</label>
|
||||||
|
<select class="form-control" name="day">
|
||||||
|
<option value ="1">1</option>
|
||||||
|
<option value ="2">2</option>
|
||||||
|
<option value ="3">3</option>
|
||||||
|
<option value ="4">4</option>
|
||||||
|
<option value ="5">5</option>
|
||||||
|
<option value ="6">6</option>
|
||||||
|
<option value ="7">7</option>
|
||||||
|
<option value ="8">8</option>
|
||||||
|
<option value ="9">9</option>
|
||||||
|
<option value ="10">10</option>
|
||||||
|
<option value ="11">11</option>
|
||||||
|
<option value ="12">12</option>
|
||||||
|
<option value ="13">13</option>
|
||||||
|
<option value ="14">14</option>
|
||||||
|
<option value ="15">15</option>
|
||||||
|
<option value ="16">16</option>
|
||||||
|
<option value ="17">17</option>
|
||||||
|
<option value ="18">18</option>
|
||||||
|
<option value ="19">19</option>
|
||||||
|
<option value ="20">20</option>
|
||||||
|
<option value ="21">21</option>
|
||||||
|
<option value ="22">22</option>
|
||||||
|
<option value ="23">23</option>
|
||||||
|
<option value ="24">24</option>
|
||||||
|
<option value ="25">25</option>
|
||||||
|
<option value ="26">26</option>
|
||||||
|
<option value ="27">27</option>
|
||||||
|
<option value ="28">28</option>
|
||||||
|
<option value ="29">29</option>
|
||||||
|
<option value ="30">30</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<button name="getTables" type="submit" class="btn btn-primary">Aktualisiere erneut</button>
|
||||||
|
</form>
|
||||||
|
<h2>'.$_SESSION["day_string"].'. '.$_SESSION["month_string"].' </h2>';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo '<form action="getTables.php" method="post">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="sel1">Monat:</label>
|
||||||
|
<select class="form-control" name="month">
|
||||||
|
<option value ="Januar">Januar</option>
|
||||||
|
<option value ="Februar">Februar</option>
|
||||||
|
<option value ="März">März</option>
|
||||||
|
<option value ="April">April</option>
|
||||||
|
<option value ="Mai">Mai</option>
|
||||||
|
<option value ="Juni">Juni</option>
|
||||||
|
<option value ="Juli">Juli</option>
|
||||||
|
<option value ="August">August</option>
|
||||||
|
<option value ="September">September</option>
|
||||||
|
<option value ="Oktober">Oktober</option>
|
||||||
|
<option value ="November">November</option>
|
||||||
|
<option value ="Dezember">Dezember</option>
|
||||||
|
</select>';
|
||||||
|
echo '<div class="form-group">
|
||||||
|
|
||||||
|
<label for="sel1">Tag:</label>
|
||||||
|
<select class="form-control" name="day">
|
||||||
|
<option value ="1">1</option>
|
||||||
|
<option value ="2">2</option>
|
||||||
|
<option value ="3">3</option>
|
||||||
|
<option value ="4">4</option>
|
||||||
|
<option value ="5">5</option>
|
||||||
|
<option value ="6">6</option>
|
||||||
|
<option value ="7">7</option>
|
||||||
|
<option value ="8">8</option>
|
||||||
|
<option value ="9">9</option>
|
||||||
|
<option value ="10">10</option>
|
||||||
|
<option value ="11">11</option>
|
||||||
|
<option value ="12">12</option>
|
||||||
|
<option value ="13">13</option>
|
||||||
|
<option value ="14">14</option>
|
||||||
|
<option value ="15">15</option>
|
||||||
|
<option value ="16">16</option>
|
||||||
|
<option value ="17">17</option>
|
||||||
|
<option value ="18">18</option>
|
||||||
|
<option value ="19">19</option>
|
||||||
|
<option value ="20">20</option>
|
||||||
|
<option value ="21">21</option>
|
||||||
|
<option value ="22">22</option>
|
||||||
|
<option value ="23">23</option>
|
||||||
|
<option value ="24">24</option>
|
||||||
|
<option value ="25">25</option>
|
||||||
|
<option value ="26">26</option>
|
||||||
|
<option value ="27">27</option>
|
||||||
|
<option value ="28">28</option>
|
||||||
|
<option value ="29">29</option>
|
||||||
|
<option value ="30">30</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<button name="getTables" type="submit" class="btn btn-primary">Aktualisieren</button>
|
||||||
|
</form>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container" style="border:solid;">
|
||||||
|
|
||||||
|
<div class="right-tables">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div id="table3">
|
||||||
|
<?php
|
||||||
|
if(isset($_GET['result']))
|
||||||
|
{
|
||||||
|
if($_GET['result'] == "gotrecords")
|
||||||
|
{
|
||||||
|
if($_SESSION["Tisch3"] == "FREI")
|
||||||
|
{
|
||||||
|
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal3" style="color:green;">Tisch 3 <br> ist frei.</button>';
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal3" style="color:red;"disabled>Tisch 3 ist belegt durch <br>'.$_SESSION["Tisch3"][4].'.</button>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal3">Tisch 3</button>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<div id="table2">
|
||||||
|
<?php
|
||||||
|
if(isset($_GET['result']))
|
||||||
|
{
|
||||||
|
if($_GET['result'] == "gotrecords")
|
||||||
|
{
|
||||||
|
if($_SESSION["Tisch2"] == "FREI")
|
||||||
|
{
|
||||||
|
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal2" style="color:green;">Tisch 2 <br> ist frei.</button>';
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal2" style="color:red;"disabled>Tisch 2 ist belegt durch <br>'.$_SESSION["Tisch2"][4].'.</button>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal2">Tisch 2</button>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<div id="table1">
|
||||||
|
<?php
|
||||||
|
if(isset($_GET['result']))
|
||||||
|
{
|
||||||
|
if($_GET['result'] == "gotrecords")
|
||||||
|
{
|
||||||
|
if($_SESSION["Tisch1"] == "FREI")
|
||||||
|
{
|
||||||
|
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal" style="color:green;">Tisch 1 <br> ist frei.</button>';
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal" style="color:red;"disabled>Tisch 1 ist belegt durch <br>'.$_SESSION["Tisch1"][4].'</button>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal">Tisch 1</button>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="left-tables">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div id="table4">
|
||||||
|
<?php
|
||||||
|
if(isset($_GET['result']))
|
||||||
|
{
|
||||||
|
if($_GET['result'] == "gotrecords")
|
||||||
|
{
|
||||||
|
if($_SESSION["Tisch4"] == "FREI")
|
||||||
|
{
|
||||||
|
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal4" style="color:green;">Tisch 4 <br> ist frei.</button>';
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal4" style="color:red;" disabled>Tisch 4 ist belegt durch <br>'.$_SESSION["Tisch4"][4].'.</button>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal4">Tisch 4 ist belegt.</button>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<div id="table5">
|
||||||
|
<?php
|
||||||
|
if(isset($_GET['result']))
|
||||||
|
{
|
||||||
|
if($_GET['result'] == "gotrecords")
|
||||||
|
{
|
||||||
|
if($_SESSION["Tisch5"] == "FREI")
|
||||||
|
{
|
||||||
|
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal5" style="color:green;">Tisch 5 <br> ist frei.</button>';
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal5" style="color:red;"disabled>Tisch 5 ist belegt durch <br>'.$_SESSION["Tisch5"][4].'.</button>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal5">Tisch 5</button>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<div id="table6">
|
||||||
|
<?php
|
||||||
|
if(isset($_GET['result']))
|
||||||
|
{
|
||||||
|
if($_GET['result'] == "gotrecords")
|
||||||
|
{
|
||||||
|
if($_SESSION["Tisch6"] == "FREI")
|
||||||
|
{
|
||||||
|
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal6" style="color:green;">Tisch 6 <br> ist frei.</button>';
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal6" style="color:red;"disabled>Tisch 6 ist belegt durch <br>'.$_SESSION["Tisch6"][4].'.</button>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal6">Tisch 6</button>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if(isset( $_SESSION["sucessmessage"])){
|
||||||
|
echo $_SESSION["sucessmessage"];
|
||||||
|
$_SESSION["sucessmessage"]="";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.left-tables button {
|
||||||
|
width: 220px;
|
||||||
|
height: 130px;
|
||||||
|
border: solid;
|
||||||
|
|
||||||
|
}
|
||||||
|
.left-tables ul li {
|
||||||
|
|
||||||
|
list-style-type: none;
|
||||||
|
padding-top: 5px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-tables button {
|
||||||
|
width: 225px;
|
||||||
|
height: 130px;
|
||||||
|
border: solid;
|
||||||
|
|
||||||
|
}
|
||||||
|
.right-tables ul li {
|
||||||
|
list-style-type: none;
|
||||||
|
display: inline-block;
|
||||||
|
padding-top: 10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
button:disabled,
|
||||||
|
button[disabled]{
|
||||||
|
border: 3px solid red !important;
|
||||||
|
|
||||||
|
color: red !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</html>
|
||||||
123
insertEntry.php
Normal file
123
insertEntry.php
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
require 'settings.php';
|
||||||
|
|
||||||
|
if(isset($_POST['reservierenBtnTisch1'])){
|
||||||
|
$month = $_SESSION["month"];
|
||||||
|
$day = $_SESSION["day"];
|
||||||
|
$name = $_POST['reservierterName'];;
|
||||||
|
$table = 1;
|
||||||
|
|
||||||
|
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||||
|
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === TRUE) {
|
||||||
|
echo "New record created successfully";
|
||||||
|
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||||
|
Du hast den Tisch erfolgreich reserviert.</div>';
|
||||||
|
header("location:index.php");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
echo "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(isset($_POST['reservierenBtnTisch2'])){
|
||||||
|
$month = $_SESSION["month"];
|
||||||
|
$day = $_SESSION["day"];
|
||||||
|
$name = $_POST['reservierterName'];;
|
||||||
|
$table = 2;
|
||||||
|
|
||||||
|
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||||
|
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === TRUE) {
|
||||||
|
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||||
|
Du hast den Tisch erfolgreich reserviert.</div>';
|
||||||
|
header("location:index.php");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
echo "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(isset($_POST['reservierenBtnTisch3'])){
|
||||||
|
$month = $_SESSION["month"];
|
||||||
|
$day = $_SESSION["day"];
|
||||||
|
$name = $_POST['reservierterName'];;
|
||||||
|
$table = 3;
|
||||||
|
|
||||||
|
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||||
|
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === TRUE) {
|
||||||
|
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||||
|
Du hast den Tisch erfolgreich reserviert.</div>';
|
||||||
|
header("location:index.php");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
echo "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(isset($_POST['reservierenBtnTisch4'])){
|
||||||
|
$month = $_SESSION["month"];
|
||||||
|
$day = $_SESSION["day"];
|
||||||
|
$name = $_POST['reservierterName'];;
|
||||||
|
$table = 4;
|
||||||
|
|
||||||
|
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||||
|
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === TRUE) {
|
||||||
|
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||||
|
Du hast den Tisch erfolgreich reserviert.</div>';
|
||||||
|
header("location:index.php");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
echo "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(isset($_POST['reservierenBtnTisch5'])){
|
||||||
|
$month = $_SESSION["month"];
|
||||||
|
$day = $_SESSION["day"];
|
||||||
|
$name = $_POST['reservierterName'];;
|
||||||
|
$table = 5;
|
||||||
|
|
||||||
|
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||||
|
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === TRUE) {
|
||||||
|
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||||
|
Du hast den Tisch erfolgreich reserviert.</div>';
|
||||||
|
header("location:index.php");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
echo "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(isset($_POST['reservierenBtnTisch6'])){
|
||||||
|
$month = $_SESSION["month"];
|
||||||
|
$day = $_SESSION["day"];
|
||||||
|
$name = $_POST['reservierterName'];;
|
||||||
|
$table = 6;
|
||||||
|
|
||||||
|
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||||
|
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === TRUE) {
|
||||||
|
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||||
|
Du hast den Tisch erfolgreich reserviert.</div>';
|
||||||
|
header("location:index.php");
|
||||||
|
} else {
|
||||||
|
echo "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
218
modal.php
Normal file
218
modal.php
Normal file
@@ -0,0 +1,218 @@
|
|||||||
|
<?php
|
||||||
|
if (session_status() == PHP_SESSION_NONE) {
|
||||||
|
session_start();
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<!-- The Modal Tisch 1 -->
|
||||||
|
<form action="insertEntry.php" method="post">
|
||||||
|
<div class="modal" id="myModal">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
|
||||||
|
<!-- Modal Header -->
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Tisch 1</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal body -->
|
||||||
|
<div class="modal-body">
|
||||||
|
<form action="getTables.php" method="post">
|
||||||
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
|
<label for="lname">Name:</label>
|
||||||
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
|
<input type="submit" value="Reservieren" name="reservierenBtnTisch1" >
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal footer -->
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<!-- The Modal Tisch 2 -->
|
||||||
|
<form action="insertEntry.php" method="post">
|
||||||
|
<div class="modal" id="myModal2">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
|
||||||
|
<!-- Modal Header -->
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Tisch 2</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal body -->
|
||||||
|
<div class="modal-body">
|
||||||
|
<form action="getTables.php">
|
||||||
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
|
<label for="lname">Name:</label>
|
||||||
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
|
<input type="submit" value="Reservieren" name="reservierenBtnTisch2" >
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal footer -->
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<!-- The Modal Tisch 3 -->
|
||||||
|
<form action="insertEntry.php" method="post">
|
||||||
|
<div class="modal" id="myModal3">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
|
||||||
|
<!-- Modal Header -->
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Tisch 3</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal body -->
|
||||||
|
<div class="modal-body">
|
||||||
|
<form action="getTables.php">
|
||||||
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
|
<label for="lname">Name:</label>
|
||||||
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
|
<input type="submit" value="Reservieren" name="reservierenBtnTisch3" >
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal footer -->
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<!-- The Modal Tisch 4 -->
|
||||||
|
<form action="insertEntry.php" method="post">
|
||||||
|
<div class="modal" id="myModal4">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
|
||||||
|
<!-- Modal Header -->
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Tisch 4</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal body -->
|
||||||
|
<div class="modal-body">
|
||||||
|
<form action="getTables.php">
|
||||||
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
|
<label for="lname">Name:</label>
|
||||||
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
|
<input type="submit" value="Reservieren" name="reservierenBtnTisch4" >
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal footer -->
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<!-- The Modal Tisch 5 -->
|
||||||
|
<form action="insertEntry.php" method="post">
|
||||||
|
<div class="modal" id="myModal5">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
|
||||||
|
<!-- Modal Header -->
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Tisch 5</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal body -->
|
||||||
|
<div class="modal-body">
|
||||||
|
<form action="getTables.php">
|
||||||
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
|
<label for="lname">Name:</label>
|
||||||
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
|
<input type="submit" value="Reservieren" name="reservierenBtnTisch5" >
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal footer -->
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<!-- The Modal Tisch 6 -->
|
||||||
|
<form action="insertEntry.php" method="post">
|
||||||
|
<div class="modal" id="myModal6">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
|
||||||
|
<!-- Modal Header -->
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Tisch 6</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal body -->
|
||||||
|
<div class="modal-body">
|
||||||
|
<form action="/action_page.php">
|
||||||
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
|
<label for="lname">Name:</label>
|
||||||
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
|
<input type="submit" value="Reservieren" name="reservierenBtnTisch6" >
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal footer -->
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
13
sdsd
Normal file
13
sdsd
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#table1 {
|
||||||
|
position: absolute;
|
||||||
|
left:680px;
|
||||||
|
}
|
||||||
|
#table2 {
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
left:480px;
|
||||||
|
}
|
||||||
|
#table3 {
|
||||||
|
position: absolute;
|
||||||
|
left:280px;
|
||||||
|
}
|
||||||
16
settings.php
Normal file
16
settings.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$servername = "localhost";
|
||||||
|
$username = "root";
|
||||||
|
$password = "";
|
||||||
|
$db = "calender";
|
||||||
|
|
||||||
|
// Create connection
|
||||||
|
$conn = new mysqli($servername, $username, $password,$db);
|
||||||
|
|
||||||
|
// Check connection
|
||||||
|
if ($conn->connect_error) {
|
||||||
|
die("Connection failed: " . $conn->connect_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
111
tables.js
Normal file
111
tables.js
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
/*tisch1 = {
|
||||||
|
"name":"",
|
||||||
|
"tag":30
|
||||||
|
};
|
||||||
|
tisch2 = {
|
||||||
|
"name":"Ernst",
|
||||||
|
"tag":30
|
||||||
|
};
|
||||||
|
tisch3 = {
|
||||||
|
"name":"Daniel",
|
||||||
|
"tag":30
|
||||||
|
};
|
||||||
|
tisch4 = {
|
||||||
|
"name":"",
|
||||||
|
"tag":30
|
||||||
|
};
|
||||||
|
tisch5 = {
|
||||||
|
"name":"Siggi",
|
||||||
|
"tag":30
|
||||||
|
};
|
||||||
|
tisch6 = {
|
||||||
|
"name":"Holga",
|
||||||
|
"tag":30
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
//alert(Object.values(tisch1));
|
||||||
|
$('#table1 p').text(tisch1.name);
|
||||||
|
$('#table2 p').text(tisch2.name);
|
||||||
|
$('#table3 p').text(tisch3.name);
|
||||||
|
$('#table4 p').text(tisch4.name);
|
||||||
|
$('#table5 p').text(tisch5.name);
|
||||||
|
$('#table6 p').text(tisch6.name);
|
||||||
|
|
||||||
|
checkForFreeTables();
|
||||||
|
});
|
||||||
|
|
||||||
|
function checkForFreeTables()
|
||||||
|
{
|
||||||
|
|
||||||
|
if(tisch1.name ==="")
|
||||||
|
{
|
||||||
|
document.getElementById("buttonTable1").style.background='green';
|
||||||
|
$('#table1 p').text("Dieser Platz ist noch frei!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.getElementById("buttonTable1").style.background='red';
|
||||||
|
$('#table1 p').text("Besetzt von " + tisch1.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tisch2.name ==="")
|
||||||
|
{
|
||||||
|
document.getElementById("buttonTable2").style.background='green';
|
||||||
|
$('#table2 p').text("Dieser Platz ist noch frei!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.getElementById("buttonTable2").style.background='red';
|
||||||
|
$('#table2 p').text("Besetzt von " + tisch2.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tisch3.name ==="")
|
||||||
|
{
|
||||||
|
document.getElementById("buttonTable3").style.background='green';
|
||||||
|
$('#table3 p').text("Dieser Platz ist noch frei!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.getElementById("buttonTable3").style.background='red';
|
||||||
|
$('#table3 p').text("Besetzt von " + tisch3.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tisch4.name ==="")
|
||||||
|
{
|
||||||
|
document.getElementById("buttonTable4").style.background='green';
|
||||||
|
$('#table4 p').text("Dieser Platz ist noch frei!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.getElementById("buttonTable4").style.background='red';
|
||||||
|
$('#table4 p').text("Besetzt von " + tisch4.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tisch5.name ==="")
|
||||||
|
{
|
||||||
|
document.getElementById("buttonTable5").style.background='green';
|
||||||
|
$('#table5 p').text("Dieser Platz ist noch frei!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.getElementById("buttonTable5").style.background='red';
|
||||||
|
$('#table5 p').text("Besetzt von " + tisch5.name);
|
||||||
|
}
|
||||||
|
if(tisch6.name ==="")
|
||||||
|
{
|
||||||
|
document.getElementById("buttonTable6").style.background='green';
|
||||||
|
$('#table6 p').text("Besetzt von " + tisch6.name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.getElementById("buttonTable6").style.background='red';
|
||||||
|
$('#table6 p').text("Dieser Platz ist besetzt!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user