mirror of
https://github.com/JannikKoester/Tischverwaltung.git
synced 2026-01-08 05:54:20 +01:00
jahr hinzugefügt
This commit is contained in:
@@ -1,18 +1,13 @@
|
||||
.footer-dark {
|
||||
margin-top:25px;
|
||||
margin-left:-520px;
|
||||
margin-left:-530px;
|
||||
color: #f0f9ff;
|
||||
background-color: #282d32;
|
||||
position: fixed;
|
||||
height: 130px;
|
||||
height: 60px;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.footer-dark .row {
|
||||
margin-top:30px;
|
||||
|
||||
}
|
||||
|
||||
.footer-dark h3 {
|
||||
margin-top: 0;
|
||||
|
||||
@@ -7,7 +7,7 @@ body {
|
||||
|
||||
@media (min-width:768px) {
|
||||
.header-dark {
|
||||
padding-bottom: 120px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ body {
|
||||
|
||||
.header-dark .navbar .navbar-brand:hover {
|
||||
color: #f0f0f0;
|
||||
|
||||
}
|
||||
|
||||
.header-dark .navbar .navbar-collapse span {
|
||||
|
||||
@@ -14,6 +14,7 @@ if(isset($_POST['getTables']))
|
||||
$_SESSION["month_string"] = $_POST['month'];
|
||||
|
||||
$_SESSION["day"] = $_POST['day'];
|
||||
$_SESSION["year"] = $_POST['year'];
|
||||
$_SESSION["day_string"] = $_POST['day'];
|
||||
|
||||
|
||||
@@ -63,126 +64,128 @@ if(isset($_POST['getTables']))
|
||||
|
||||
$month = $_SESSION["month"];
|
||||
$day = $_SESSION["day"];
|
||||
$year = $_SESSION["year"];
|
||||
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='1'";
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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']);
|
||||
$_SESSION["Tisch1"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch'],$row['year']);
|
||||
}
|
||||
} else
|
||||
{
|
||||
$_SESSION["Tisch1"] = "FREI";
|
||||
echo $_SESSION["Tisch1"]."<br>";
|
||||
//echo $_SESSION["Tisch1"]."<br>";
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='2'";
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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']);
|
||||
$_SESSION["Tisch2"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch'],$row['year']);
|
||||
}
|
||||
} else
|
||||
{
|
||||
$_SESSION["Tisch2"] = "FREI";
|
||||
echo $_SESSION["Tisch2"]."<br>";
|
||||
//echo $_SESSION["Tisch2"]."<br>";
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='3'";
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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']);
|
||||
//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'],$row['year']);
|
||||
//echo $_SESSION["Tisch3"][6];
|
||||
}
|
||||
} else
|
||||
{
|
||||
$_SESSION["Tisch3"] = "FREI";
|
||||
echo $_SESSION["Tisch3"]."<br>";
|
||||
//echo $_SESSION["Tisch3"]."<br>";
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='4'";
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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']);
|
||||
$_SESSION["Tisch4"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch'],$row['year']);
|
||||
}
|
||||
} else
|
||||
{
|
||||
$_SESSION["Tisch4"] = "FREI";
|
||||
echo $_SESSION["Tisch4"]."<br>";
|
||||
// echo $_SESSION["Tisch4"]."<br>";
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='5'";
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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']);
|
||||
$_SESSION["Tisch5"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch'],$row['year']);
|
||||
}
|
||||
} else
|
||||
{
|
||||
$_SESSION["Tisch5"] = "FREI";
|
||||
echo $_SESSION["Tisch5"]."<br>";
|
||||
//echo $_SESSION["Tisch5"]."<br>";
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='6'";
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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']);
|
||||
$_SESSION["Tisch6"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch'],$row['year']);
|
||||
}
|
||||
} else
|
||||
{
|
||||
$_SESSION["Tisch6"] = "FREI";
|
||||
echo $_SESSION["Tisch6"]."<br>";
|
||||
//echo $_SESSION["Tisch6"]."<br>";
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='7'";
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' AND tisch='7'";
|
||||
$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["Park1"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
|
||||
$_SESSION["Park1"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch'],$row['year']);
|
||||
}
|
||||
} else
|
||||
{
|
||||
$_SESSION["Park1"] = "FREI";
|
||||
echo $_SESSION["Park1"]."<br>";
|
||||
// echo $_SESSION["Park1"]."<br>";
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='8'";
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' AND tisch='8'";
|
||||
$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["Park2"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
|
||||
$_SESSION["Park2"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch'],$row['year']);
|
||||
}
|
||||
} else
|
||||
{
|
||||
$_SESSION["Park2"] = "FREI";
|
||||
echo $_SESSION["Park2"]."<br>";
|
||||
//echo $_SESSION["Park2"]."<br>";
|
||||
}
|
||||
|
||||
header("location:index.php?result=gotrecords");
|
||||
|
||||
125
index.php
125
index.php
@@ -89,11 +89,26 @@ require 'modal.php';
|
||||
}
|
||||
|
||||
|
||||
echo '<form action="getTables.php" method="post">
|
||||
<div class="form-group">
|
||||
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Jahr:</label>
|
||||
<select class="form-control" name="year">';
|
||||
for ($i=2020; $i <2030 ; $i++) {
|
||||
|
||||
if ($i == $_SESSION["year"]) {
|
||||
echo ("<option value='$i' selected>$i</option>");
|
||||
} else {
|
||||
echo '<option value ='.$i.'>'. $i.'</option>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
echo '</select>';
|
||||
|
||||
echo '<form action="getTables.php" method="post">
|
||||
<div class="form-group">
|
||||
<label for="sel1"style="color:white;font-family:Bitter;font-size:32px;">Monat:</label>
|
||||
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Monat:</label>
|
||||
<select class="form-control" name="month">
|
||||
<option value ="Januar"'. $selectedjan.'>Januar</option>
|
||||
<option value ="Februar"'. $selectedfeb.'>Februar</option>
|
||||
@@ -113,7 +128,7 @@ require 'modal.php';
|
||||
|
||||
echo '<div class="form-group">
|
||||
|
||||
<label for="sel1"style="color:white;font-family:Bitter;font-size:32px;">Tag:</label>
|
||||
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Tag:</label>
|
||||
<select class="form-control" name="day">';
|
||||
|
||||
for ($i = 1; $i < 32; $i++) {
|
||||
@@ -123,43 +138,11 @@ require 'modal.php';
|
||||
echo ("<option value='$i'>$i</option>");
|
||||
}
|
||||
}
|
||||
|
||||
/*echo '<option value = '.$_SESSION["day"].' selected>'.$_SESSION["day"].'</option>
|
||||
<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>*/
|
||||
echo '</select>
|
||||
</div>
|
||||
<button id="trigger" name="getTables" type="submit" class="btnchange" id="aktualisiere">Aktualisiere erneut</button>
|
||||
</form>
|
||||
<h2 style="color:white;font-family:Bitter; text-align:center;">'.$_SESSION["day_string"].'. '.$_SESSION["month_string"].' </h2>';
|
||||
<h2 style="color:white;font-family:Bitter; text-align:center;">'.$_SESSION["day_string"].'. '.$_SESSION["month_string"].' '.$_SESSION["year"].' </h2>';
|
||||
|
||||
|
||||
|
||||
@@ -171,7 +154,22 @@ require 'modal.php';
|
||||
else{
|
||||
echo '<form action="getTables.php" method="post">
|
||||
<div class="form-group">
|
||||
<label for="sel1" style="color:white;font-family:Bitter;font-size:32px;">Monat:</label>
|
||||
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Jahr:</label>
|
||||
<select class="form-control" name="year">';
|
||||
for ($i=2020; $i <2030 ; $i++) {
|
||||
|
||||
if ($i == $_SESSION["year"]) {
|
||||
echo ("<option value='$i' selected>$i</option>");
|
||||
} else {
|
||||
echo '<option value ='.$i.'>'. $i.'</option>';
|
||||
}
|
||||
|
||||
}
|
||||
echo '</select>';
|
||||
|
||||
echo '<form action="getTables.php" method="post">
|
||||
<div class="form-group">
|
||||
<label for="sel1" style="color:white;font-family:Bitter;font-size:24px;">Monat:</label>
|
||||
<select class="form-control" name="month">
|
||||
<option value ="Januar">Januar</option>
|
||||
<option value ="Februar">Februar</option>
|
||||
@@ -186,42 +184,21 @@ require 'modal.php';
|
||||
<option value ="November">November</option>
|
||||
<option value ="Dezember">Dezember</option>
|
||||
</select>';
|
||||
echo '<div class="form-group">
|
||||
|
||||
<label for="sel1"style="color:white;font-family:Bitter;font-size:32px;">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>
|
||||
|
||||
echo '<div class="form-group">
|
||||
|
||||
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Tag:</label>
|
||||
<select class="form-control" name="day">';
|
||||
|
||||
for ($i = 1; $i < 32; $i++) {
|
||||
if ($i == $_SESSION["day"]) {
|
||||
echo ("<option value='$i' selected>$i</option>");
|
||||
} else {
|
||||
echo ("<option value='$i'>$i</option>");
|
||||
}
|
||||
}
|
||||
echo '</select>
|
||||
</div>
|
||||
<button name="getTables" type="submit" class="btnchange">Aktualisieren</button>
|
||||
</form>';
|
||||
|
||||
@@ -249,7 +226,7 @@ require 'modal.php';
|
||||
{
|
||||
if($_GET['result'] == "gotrecords")
|
||||
{
|
||||
if($_SESSION["Tisch3"] == "FREI")
|
||||
if($_SESSION["Tisch3"] == "FREI" || $_SESSION["Tisch3"][6] != $_SESSION["year"] )
|
||||
{
|
||||
echo '<button id="buttonTable1" type="button" class="btn btn-light" data-toggle="modal" data-target="#myModal3" style="color:green;opacity: 1.5;">Tisch 3 <br> ist frei.</button>';
|
||||
|
||||
@@ -535,7 +512,7 @@ require 'modal.php';
|
||||
text-shadow: none;
|
||||
padding: .5rem .8rem;
|
||||
transition: background-color 0.25s;
|
||||
height:90px;
|
||||
height:50px;
|
||||
width:200px;
|
||||
}
|
||||
.btnchange:hover {
|
||||
|
||||
121
insertEntry.php
121
insertEntry.php
@@ -7,16 +7,27 @@ if(isset($_POST['reservierenBtnTisch1'])){
|
||||
$month = $_SESSION["month"];
|
||||
$day = $_SESSION["day"];
|
||||
$name = $_POST['reservierterName'];
|
||||
$year = $_SESSION["year"];
|
||||
$table = 1;
|
||||
|
||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||
VALUES ('$year', '$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>';
|
||||
$_SESSION["Tisch1"] = array(1,2,3,4,$name);
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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'],$row['year']);
|
||||
//echo $_SESSION["Tisch3"][6];
|
||||
}
|
||||
}
|
||||
header("location:index.php?result=gotrecords");
|
||||
|
||||
} else {
|
||||
@@ -28,15 +39,26 @@ else if(isset($_POST['reservierenBtnTisch2'])){
|
||||
$month = $_SESSION["month"];
|
||||
$day = $_SESSION["day"];
|
||||
$name = $_POST['reservierterName'];
|
||||
$year = $_SESSION["year"];
|
||||
$table = 2;
|
||||
|
||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||
VALUES ('$year', '$month', '$day', '1', '$name', '$table')";
|
||||
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||
Du hast den Tisch erfolgreich reserviert.</div>';
|
||||
$_SESSION["Tisch2"] = array(1,2,3,4,$name);
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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'],$row['year']);
|
||||
//echo $_SESSION["Tisch3"][6];
|
||||
}
|
||||
}
|
||||
header("location:index.php?result=gotrecords");
|
||||
|
||||
} else {
|
||||
@@ -48,15 +70,27 @@ else if(isset($_POST['reservierenBtnTisch3'])){
|
||||
$month = $_SESSION["month"];
|
||||
$day = $_SESSION["day"];
|
||||
$name = $_POST['reservierterName'];
|
||||
$year = $_SESSION["year"];
|
||||
$table = 3;
|
||||
|
||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||
VALUES ('$year', '$month', '$day', '1', '$name', '$table')";
|
||||
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||
Du hast den Tisch erfolgreich reserviert.</div>';
|
||||
$_SESSION["Tisch3"] = array(1,2,3,4,$name);
|
||||
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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'],$row['year']);
|
||||
//echo $_SESSION["Tisch3"][6];
|
||||
}
|
||||
}
|
||||
header("location:index.php?result=gotrecords");
|
||||
|
||||
} else {
|
||||
@@ -68,15 +102,26 @@ else if(isset($_POST['reservierenBtnTisch4'])){
|
||||
$month = $_SESSION["month"];
|
||||
$day = $_SESSION["day"];
|
||||
$name = $_POST['reservierterName'];
|
||||
$year = $_SESSION["year"];
|
||||
$table = 4;
|
||||
|
||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||
VALUES ('$year', '$month', '$day', '1', '$name', '$table')";
|
||||
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||
Du hast den Tisch erfolgreich reserviert.</div>';
|
||||
$_SESSION["Tisch4"] = array(1,2,3,4,$name);
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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'],$row['year']);
|
||||
//echo $_SESSION["Tisch3"][6];
|
||||
}
|
||||
}
|
||||
header("location:index.php?result=gotrecords");
|
||||
|
||||
} else {
|
||||
@@ -88,15 +133,26 @@ else if(isset($_POST['reservierenBtnTisch5'])){
|
||||
$month = $_SESSION["month"];
|
||||
$day = $_SESSION["day"];
|
||||
$name = $_POST['reservierterName'];
|
||||
$year = $_SESSION["year"];
|
||||
$table = 5;
|
||||
|
||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||
VALUES ('$year', '$month', '$day', '1', '$name', '$table')";
|
||||
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||
Du hast den Tisch erfolgreich reserviert.</div>';
|
||||
$_SESSION["Tisch5"] = array(1,2,3,4,$name);
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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'],$row['year']);
|
||||
//echo $_SESSION["Tisch3"][6];
|
||||
}
|
||||
}
|
||||
header("location:index.php?result=gotrecords");
|
||||
|
||||
} else {
|
||||
@@ -108,15 +164,26 @@ else if(isset($_POST['reservierenBtnTisch6'])){
|
||||
$month = $_SESSION["month"];
|
||||
$day = $_SESSION["day"];
|
||||
$name = $_POST['reservierterName'];
|
||||
$year = $_SESSION["year"];
|
||||
$table = 6;
|
||||
|
||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||
VALUES ('$year', '$month', '$day', '1', '$name', '$table')";
|
||||
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||
Du hast den Tisch erfolgreich reserviert.</div>';
|
||||
$_SESSION["Tisch6"] = array(1,2,3,4,$name);
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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'],$row['year']);
|
||||
//echo $_SESSION["Tisch3"][6];
|
||||
}
|
||||
}
|
||||
header("location:index.php?result=gotrecords");
|
||||
|
||||
} else {
|
||||
@@ -129,15 +196,26 @@ else if(isset($_POST['reservierenBtnpark1'])){
|
||||
$month = $_SESSION["month"];
|
||||
$day = $_SESSION["day"];
|
||||
$name = $_POST['reservierterName'];
|
||||
$year = $_SESSION["year"];
|
||||
$table = 7;
|
||||
|
||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||
VALUES ('$year', '$month', '$day', '1', '$name', '$table')";
|
||||
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||
Du hast den Parkplatz 1 erfolgreich reserviert.</div>';
|
||||
$_SESSION["Park1"] = array(1,2,3,4,$name);
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' AND tisch='7'";
|
||||
$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["Park1"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch'],$row['year']);
|
||||
//echo $_SESSION["Tisch3"][6];
|
||||
}
|
||||
}
|
||||
header("location:index.php?result=gotrecords");
|
||||
|
||||
} else {
|
||||
@@ -150,15 +228,26 @@ else if(isset($_POST['reservierenBtnpark2'])){
|
||||
$month = $_SESSION["month"];
|
||||
$day = $_SESSION["day"];
|
||||
$name = $_POST['reservierterName'];
|
||||
$year = $_SESSION["year"];
|
||||
$table = 8;
|
||||
|
||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||
VALUES ('2020', '$month', '$day', '1', '$name', '$table')";
|
||||
VALUES ('$year', '$month', '$day', '1', '$name', '$table')";
|
||||
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||
Du hast den Parkplatz 2 erfolgreich reserviert.</div>';
|
||||
$_SESSION["Park2"] = array(1,2,3,4,$name);
|
||||
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' 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["Park2"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch'],$row['year']);
|
||||
//echo $_SESSION["Tisch3"][6];
|
||||
}
|
||||
}
|
||||
header("location:index.php?result=gotrecords");
|
||||
|
||||
} else {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col item social"><a href="#"><i class="icon ion-social-facebook"></i></a><a href="#"><i class="icon ion-social-twitter"></i></a><a href="#"><i class="icon ion-social-snapchat"></i></a><a href="#"><i class="icon ion-social-instagram"></i></a></div>
|
||||
</div>
|
||||
<p class="copyright">Rene Knipschild © 2020</p>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
<div>
|
||||
<div class="header-dark">
|
||||
<div class="header-dark" style="padding-bottom:-90px;">
|
||||
<nav class="navbar navbar-dark navbar-expand-lg navigation-clean-search">
|
||||
<div class="container"><a class="navbar-brand" href="#">rkCSD</a><button data-toggle="collapse" class="navbar-toggler" data-target="#navcol-1"><span class="sr-only">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
|
||||
<div class="collapse navbar-collapse"
|
||||
|
||||
Reference in New Issue
Block a user