mirror of
https://github.com/JannikKoester/Tischverwaltung.git
synced 2026-01-10 06:40:07 +01:00
Compare commits
4 Commits
6600f5f381
...
jannik
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebc6a50f52 | ||
|
|
69bcdb1e00 | ||
|
|
0790b1d8e7 | ||
|
|
55cd862c24 |
2
assets/bootstrap/css/bootstrap.min.css
vendored
2
assets/bootstrap/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
background: url(../../assets/img/mountain_bg.jpg) blue;
|
background: url(../../assets/img/mountain_bg.jpg) grey;
|
||||||
height:100%;
|
height:100%;
|
||||||
padding-bottom: 80px;
|
padding-bottom: 80px;
|
||||||
background-repeat:no-repeat;
|
background-repeat:no-repeat;
|
||||||
|
|||||||
80
functions.php
Normal file
80
functions.php
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
require 'settings.php';
|
||||||
|
class Funcs
|
||||||
|
{
|
||||||
|
|
||||||
|
public static function InsertDatas($conn, $ds, $de, $n, $tisch, $tnum)
|
||||||
|
{
|
||||||
|
$day = $_SESSION["day"];
|
||||||
|
$month = $_SESSION["month"];
|
||||||
|
$year = $_SESSION["year"];
|
||||||
|
$daystart = $ds;
|
||||||
|
$dayend = $de;
|
||||||
|
$name = $n;
|
||||||
|
|
||||||
|
$besetzt = array();
|
||||||
|
$table = $tisch;
|
||||||
|
|
||||||
|
for ($daystart; $daystart <= $dayend; $daystart++) {
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$daystart'AND year='$year' AND tisch='$table'";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
$besetzt[$row['day']] = $row['reserviertvon'];
|
||||||
|
//array_push($besetzt[$row['day'] = $row['reserviertvon']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
||||||
|
VALUES ('$year', '$month', '$daystart', '1', '$name', '$table')";
|
||||||
|
$conn->query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day'AND year='$year' AND tisch='$table'";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
$_SESSION[$tnum] = array($row['uniqueid'], $row['month'], $row['day'], $row['reserviert'], $row['reserviertvon'], $row['tisch'], $row['year']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($besetzt)) {
|
||||||
|
|
||||||
|
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
||||||
|
Du hast den/die Tisch/e erfolgreich reserviert.</div>';
|
||||||
|
|
||||||
|
header("location:index.php?result=gotrecords");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$_SESSION["sucessmessage"] = '<div class="alert alert-danger">
|
||||||
|
|
||||||
|
Folgende Tische sind schon belegt von: <br>
|
||||||
|
';
|
||||||
|
|
||||||
|
foreach ($besetzt as $key => $value)
|
||||||
|
{
|
||||||
|
|
||||||
|
$_SESSION["sucessmessage"].= "Tag ".$key." belegt von: ".$value." <br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$_SESSION["sucessmessage"].='</div><br>';
|
||||||
|
$_SESSION["sucessmessage"].='<div class="alert alert-success">
|
||||||
|
|
||||||
|
Die freien Tische wurden belegt! <br>
|
||||||
|
</div><br>';
|
||||||
|
|
||||||
|
header("location:index.php?result=gotrecords");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
136
index.php
136
index.php
@@ -24,71 +24,8 @@
|
|||||||
<?php
|
<?php
|
||||||
if (isset($_GET['result'])) {
|
if (isset($_GET['result'])) {
|
||||||
if ($_GET['result'] == "gotrecords" || $_GET['result'] == "loggedin") {
|
if ($_GET['result'] == "gotrecords" || $_GET['result'] == "loggedin") {
|
||||||
$selectedjan = '';
|
|
||||||
$selectedfeb = '';
|
|
||||||
$selectedmar = '';
|
|
||||||
$selectedapr = '';
|
|
||||||
$selectedmai = '';
|
|
||||||
$selectedjun = '';
|
|
||||||
$selectedjul = '';
|
|
||||||
$selectedaug = '';
|
|
||||||
$selectedsep = '';
|
|
||||||
$selectedokt = '';
|
|
||||||
$selectednov = '';
|
|
||||||
$selecteddez = '';
|
|
||||||
|
|
||||||
switch ($_SESSION["month_string"]) {
|
|
||||||
|
|
||||||
case "Januar":
|
|
||||||
$selectedjan = 'selected';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "Februar":
|
|
||||||
$selectedfeb = 'selected';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "März":
|
|
||||||
$selectedmar = 'selected';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "April":
|
|
||||||
$selectedapr = 'selected';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "Mai":
|
|
||||||
$selectedmai = 'selected';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "Juni":
|
|
||||||
$selectedjun = 'selected';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "Juli":
|
|
||||||
$selectedjul = 'selected';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "August":
|
|
||||||
$selectedjaug = 'selected';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "September":
|
|
||||||
$selectedsep = 'selected';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "Oktober":
|
|
||||||
$selectedokt = 'selected';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "November":
|
|
||||||
$selectednov = 'selected';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "Dezember":
|
|
||||||
$selecteddez = 'selected';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
//DROPDOWN JAHRE
|
||||||
echo '<form action="getTables.php" method="post">
|
echo '<form action="getTables.php" method="post">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Jahr:</label>
|
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Jahr:</label>
|
||||||
@@ -104,26 +41,25 @@
|
|||||||
|
|
||||||
|
|
||||||
echo '</select>';
|
echo '</select>';
|
||||||
|
//DROPDOWN MONATE
|
||||||
|
$monate = array('Januar','Februar','März','April','Mai','Juni','Juli','August',
|
||||||
|
'September','Oktober','November','Dezember');
|
||||||
|
|
||||||
echo '<form action="getTables.php" method="post">
|
echo '<form action="getTables.php" method="post">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Monat:</label>
|
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Monat:</label>
|
||||||
<select class="form-control" name="month"onchange="refreshListe()">
|
<select class="form-control" name="month"onchange="refreshListe()">';
|
||||||
<option value ="Januar"' . $selectedjan . '>Januar</option>
|
for ($i=0; $i <12 ; $i++) {
|
||||||
<option value ="Februar"' . $selectedfeb . '>Februar</option>
|
if($monate[$i] == $_SESSION["month_string"])
|
||||||
<option value ="März"' . $selectedmar . '>März</option>
|
{
|
||||||
<option value ="April"' . $selectedapr . '>April</option>
|
echo ("<option value='$monate[$i]'selected>$monate[$i]</option>");
|
||||||
<option value ="Mai"' . $selectedmai . '>Mai</option>
|
}
|
||||||
<option value ="Juni"' . $selectedjun . '>Juni</option>
|
echo '<option value ='.$monate[$i].'>'.$monate[$i].'</option>';
|
||||||
<option value ="Juli"' . $selectedjul . '>Juli</option>
|
}
|
||||||
<option value ="August"' . $selectedaug . '>August</option>
|
|
||||||
<option value ="September"' . $selectedsep . '>September</option>
|
echo '</select>';
|
||||||
<option value ="Oktober"' . $selectedokt . '>Oktober</option>
|
|
||||||
<option value ="November"' . $selectednov . '>November</option>
|
|
||||||
<option value ="Dezember"' . $selecteddez . '>Dezember</option>
|
|
||||||
</select>';
|
|
||||||
|
|
||||||
|
|
||||||
|
//DROPDOWN TAGE
|
||||||
|
|
||||||
echo '<div class="form-group">
|
echo '<div class="form-group">
|
||||||
|
|
||||||
@@ -145,6 +81,7 @@
|
|||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
//DROPDOWN JAHRE
|
||||||
echo '<form action="getTables.php" method="post">
|
echo '<form action="getTables.php" method="post">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Jahr:</label>
|
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Jahr:</label>
|
||||||
@@ -158,25 +95,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo '</select>';
|
echo '</select>';
|
||||||
|
//DROPDOWN MONATE
|
||||||
|
$monate = array('Januar','Februar','März','April','Mai','Juni','Juli','August',
|
||||||
|
'September','Oktober','November','Dezember');
|
||||||
|
|
||||||
echo '<form action="getTables.php" method="post">
|
echo '<form action="getTables.php" method="post">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="sel1" style="color:white;font-family:Bitter;font-size:24px;">Monat:</label>
|
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Monat:</label>
|
||||||
<select class="form-control" name="month"onchange="refreshListe()">
|
<select class="form-control" name="month"onchange="refreshListe()">';
|
||||||
<option value ="Januar">Januar</option>
|
for ($i=0; $i <12 ; $i++) {
|
||||||
<option value ="Februar">Februar</option>
|
if($monate[$i] == $_SESSION["month_string"])
|
||||||
<option value ="März">März</option>
|
{
|
||||||
<option value ="April">April</option>
|
echo ("<option value='$monate[$i]'selected>$monate[$i]</option>");
|
||||||
<option value ="Mai">Mai</option>
|
}
|
||||||
<option value ="Juni">Juni</option>
|
echo '<option value ='.$monate[$i].'>'.$monate[$i].'</option>';
|
||||||
<option value ="Juli">Juli</option>
|
}
|
||||||
<option value ="August">August</option>
|
|
||||||
<option value ="September">September</option>
|
echo '</select>';
|
||||||
<option value ="Oktober">Oktober</option>
|
//DROPDOWN JAHRE
|
||||||
<option value ="November">November</option>
|
|
||||||
<option value ="Dezember">Dezember</option>
|
|
||||||
</select>';
|
|
||||||
|
|
||||||
echo '<div class="form-group">
|
echo '<div class="form-group">
|
||||||
|
|
||||||
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Tag:</label>
|
<label for="sel1"style="color:white;font-family:Bitter;font-size:24px;">Tag:</label>
|
||||||
|
|||||||
274
insertEntry.php
274
insertEntry.php
@@ -2,260 +2,64 @@
|
|||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
require 'settings.php';
|
require 'settings.php';
|
||||||
|
require 'functions.php';
|
||||||
|
|
||||||
if(isset($_POST['reservierenBtnTisch1'])){
|
if(isset($_POST['reservierenBtnTisch1'])){
|
||||||
$month = $_SESSION["month"];
|
$daystart=$_POST['daystart'];
|
||||||
$daystart=intval($_POST['daystart']);
|
$dayend = $_POST['dayend'];
|
||||||
$dayend = intval($_POST['dayend']);
|
$name = $_POST['reservierterName'];
|
||||||
$name = $_POST['reservierterName'];
|
funcs::InsertDatas($conn, $daystart, $dayend, $name,1,"Tisch1");
|
||||||
$year = $_SESSION["year"];
|
|
||||||
$table = 1;
|
|
||||||
|
|
||||||
|
|
||||||
if($daystart > $dayend)
|
|
||||||
{
|
|
||||||
$_SESSION["errmsg"] = '<div class="alert alert-danger">
|
|
||||||
Fehler! Der Starttag lag über dem Endtag.</div>';
|
|
||||||
header("location:index.php?result=gotrecords");
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
for ($daystart; $daystart <= $dayend ; $daystart++) {
|
|
||||||
|
|
||||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
|
||||||
VALUES ('$year', '$month', '$daystart', '1', '$name', '$table')";
|
|
||||||
$conn->query($sql);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
|
||||||
Du hast den Tisch erfolgreich reserviert.</div>';
|
|
||||||
header("location:index.php");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(isset($_POST['reservierenBtnTisch2'])){
|
else if(isset($_POST['reservierenBtnTisch2'])){
|
||||||
$month = $_SESSION["month"];
|
$daystart=$_POST['daystart'];
|
||||||
$day = $_SESSION["day"];
|
$dayend = $_POST['dayend'];
|
||||||
$name = $_POST['reservierterName'];
|
$name = $_POST['reservierterName'];
|
||||||
$year = $_SESSION["year"];
|
funcs::InsertDatas($conn, $daystart, $dayend, $name,2,"Tisch2");
|
||||||
$table = 2;
|
|
||||||
|
|
||||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
}
|
||||||
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>';
|
|
||||||
$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 {
|
|
||||||
echo "Error: " . $sql . "<br>" . $conn->error;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(isset($_POST['reservierenBtnTisch3'])){
|
else if(isset($_POST['reservierenBtnTisch3'])){
|
||||||
$month = $_SESSION["month"];
|
$daystart=$_POST['daystart'];
|
||||||
$day = $_SESSION["day"];
|
$dayend = $_POST['dayend'];
|
||||||
$name = $_POST['reservierterName'];
|
$name = $_POST['reservierterName'];
|
||||||
$year = $_SESSION["year"];
|
funcs::InsertDatas($conn, $daystart, $dayend, $name,3,"Tisch3");
|
||||||
$table = 3;
|
|
||||||
|
|
||||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
}
|
||||||
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>';
|
|
||||||
|
|
||||||
$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 {
|
|
||||||
echo "Error: " . $sql . "<br>" . $conn->error;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(isset($_POST['reservierenBtnTisch4'])){
|
else if(isset($_POST['reservierenBtnTisch4'])){
|
||||||
$month = $_SESSION["month"];
|
$daystart=$_POST['daystart'];
|
||||||
$day = $_SESSION["day"];
|
$dayend = $_POST['dayend'];
|
||||||
$name = $_POST['reservierterName'];
|
$name = $_POST['reservierterName'];
|
||||||
$year = $_SESSION["year"];
|
funcs::InsertDatas($conn, $daystart, $dayend, $name,4,"Tisch4");
|
||||||
$table = 4;
|
|
||||||
|
|
||||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
}
|
||||||
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>';
|
|
||||||
$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 {
|
|
||||||
echo "Error: " . $sql . "<br>" . $conn->error;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(isset($_POST['reservierenBtnTisch5'])){
|
else if(isset($_POST['reservierenBtnTisch5'])){
|
||||||
$month = $_SESSION["month"];
|
$daystart=$_POST['daystart'];
|
||||||
$day = $_SESSION["day"];
|
$dayend = $_POST['dayend'];
|
||||||
$name = $_POST['reservierterName'];
|
$name = $_POST['reservierterName'];
|
||||||
$year = $_SESSION["year"];
|
funcs::InsertDatas($conn, $daystart, $dayend, $name,5,"Tisch5");
|
||||||
$table = 5;
|
|
||||||
|
|
||||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
}
|
||||||
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>';
|
|
||||||
$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 {
|
|
||||||
echo "Error: " . $sql . "<br>" . $conn->error;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(isset($_POST['reservierenBtnTisch6'])){
|
else if(isset($_POST['reservierenBtnTisch6'])){
|
||||||
$month = $_SESSION["month"];
|
$daystart=$_POST['daystart'];
|
||||||
$day = $_SESSION["day"];
|
$dayend = $_POST['dayend'];
|
||||||
$name = $_POST['reservierterName'];
|
$name = $_POST['reservierterName'];
|
||||||
$year = $_SESSION["year"];
|
funcs::InsertDatas($conn, $daystart, $dayend, $name,6,"Tisch6");
|
||||||
$table = 6;
|
|
||||||
|
|
||||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
}
|
||||||
VALUES ('$year', '$month', '$day', '1', '$name', '$table')";
|
|
||||||
|
|
||||||
if ($conn->query($sql) === TRUE) {
|
else if(isset($_POST['reservierenBtnPark1'])){
|
||||||
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
$daystart=$_POST['daystart'];
|
||||||
Du hast den Tisch erfolgreich reserviert.</div>';
|
$dayend = $_POST['dayend'];
|
||||||
$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 {
|
|
||||||
echo "Error: " . $sql . "<br>" . $conn->error;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
else if(isset($_POST['reservierenBtnpark1'])){
|
|
||||||
$month = $_SESSION["month"];
|
|
||||||
$day = $_SESSION["day"];
|
|
||||||
$name = $_POST['reservierterName'];
|
$name = $_POST['reservierterName'];
|
||||||
$year = $_SESSION["year"];
|
funcs::InsertDatas($conn, $daystart, $dayend, $name,7,"Park1");
|
||||||
$table = 7;
|
|
||||||
|
|
||||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
}
|
||||||
VALUES ('$year', '$month', '$day', '1', '$name', '$table')";
|
|
||||||
|
|
||||||
if ($conn->query($sql) === TRUE) {
|
else if(isset($_POST['reservierenBtnPark2'])){
|
||||||
$_SESSION["sucessmessage"] = '<div class="alert alert-success">
|
$daystart=$_POST['daystart'];
|
||||||
Du hast den Parkplatz 1 erfolgreich reserviert.</div>';
|
$dayend = $_POST['dayend'];
|
||||||
$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 {
|
|
||||||
echo "Error: " . $sql . "<br>" . $conn->error;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
else if(isset($_POST['reservierenBtnpark2'])){
|
|
||||||
$month = $_SESSION["month"];
|
|
||||||
$day = $_SESSION["day"];
|
|
||||||
$name = $_POST['reservierterName'];
|
$name = $_POST['reservierterName'];
|
||||||
$year = $_SESSION["year"];
|
funcs::InsertDatas($conn, $daystart, $dayend, $name,8,"Park2");
|
||||||
$table = 8;
|
|
||||||
|
|
||||||
$sql = "INSERT INTO calenderplanner (year, month, day,reserviert,reserviertvon,tisch)
|
}
|
||||||
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>';
|
|
||||||
$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 {
|
|
||||||
echo "Error: " . $sql . "<br>" . $conn->error;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
257
modal.php
257
modal.php
@@ -28,9 +28,8 @@ if (session_status() == PHP_SESSION_NONE) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!-- Modals für erstes belegen-->
|
<!-- Modals für erstes belegen Mehrfachauswahl-->
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<!-- The Modal Tisch 1 -->
|
<!-- The Modal Tisch 1 -->
|
||||||
<form action="insertEntry.php" method="post">
|
<form action="insertEntry.php" method="post">
|
||||||
<div class="modal" id="myModal">
|
<div class="modal" id="myModal">
|
||||||
@@ -39,7 +38,7 @@ if (session_status() == PHP_SESSION_NONE) {
|
|||||||
|
|
||||||
<!-- Modal Header -->
|
<!-- Modal Header -->
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Tisch 1 neu</h4>
|
<h4 class="modal-title">Tisch 1</h4>
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -71,30 +70,23 @@ if (session_status() == PHP_SESSION_NONE) {
|
|||||||
echo "<option value='$i' selected>$i. $month</option>";
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
} else {
|
} else {
|
||||||
echo "<option value ='$i'> $i. $month</option>";
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
echo '</select>';
|
echo '</select>';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
||||||
<input class="btn btn-primary" type="submit" id="reservierenbutton"value="Reservieren" name="reservierenBtnTisch1" >
|
<input class="btn btn-primary" type="submit" id="reservierenbutton"value="Reservieren" name="reservierenBtnTisch1" >
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal footer -->
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<!-- The Modal Tisch 2 -->
|
<!-- The Modal Tisch 2 -->
|
||||||
@@ -109,12 +101,39 @@ if (session_status() == PHP_SESSION_NONE) {
|
|||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal body -->
|
<!-- Modal body -->
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="getTables.php">
|
<form action="getTables.php" method="post">
|
||||||
<h2>Geben Sie Ihren Namen ein:</h2>
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
<label for="lname">Name:</label>
|
<label for="lname">Name:</label>
|
||||||
<input type="text" id="lname" name="reservierterName"required><br><br>
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo '<h3>Reservieren von</h3>';
|
||||||
|
echo '<select class="form-control" name="daystart" id="daystart" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
echo '<h3>bis</h3>';
|
||||||
|
echo '<select class="form-control" name="dayend" id="dayend" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
?>
|
||||||
|
<br>
|
||||||
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnTisch2" >
|
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnTisch2" >
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -144,12 +163,39 @@ if (session_status() == PHP_SESSION_NONE) {
|
|||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal body -->
|
<!-- Modal body -->
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="getTables.php">
|
<form action="getTables.php" method="post">
|
||||||
<h2>Geben Sie Ihren Namen ein:</h2>
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
<label for="lname">Name:</label>
|
<label for="lname">Name:</label>
|
||||||
<input type="text" id="lname" name="reservierterName"required><br><br>
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo '<h3>Reservieren von</h3>';
|
||||||
|
echo '<select class="form-control" name="daystart" id="daystart" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
echo '<h3>bis</h3>';
|
||||||
|
echo '<select class="form-control" name="dayend" id="dayend" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
?>
|
||||||
|
<br>
|
||||||
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnTisch3" >
|
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnTisch3" >
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -179,12 +225,39 @@ if (session_status() == PHP_SESSION_NONE) {
|
|||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal body -->
|
<!-- Modal body -->
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="getTables.php">
|
<form action="getTables.php" method="post">
|
||||||
<h2>Geben Sie Ihren Namen ein:</h2>
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
<label for="lname">Name:</label>
|
<label for="lname">Name:</label>
|
||||||
<input type="text" id="lname" name="reservierterName"required><br><br>
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo '<h3>Reservieren von</h3>';
|
||||||
|
echo '<select class="form-control" name="daystart" id="daystart" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
echo '<h3>bis</h3>';
|
||||||
|
echo '<select class="form-control" name="dayend" id="dayend" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
?>
|
||||||
|
<br>
|
||||||
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnTisch4" >
|
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnTisch4" >
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -214,12 +287,39 @@ if (session_status() == PHP_SESSION_NONE) {
|
|||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal body -->
|
<!-- Modal body -->
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="getTables.php">
|
<form action="getTables.php" method="post">
|
||||||
<h2>Geben Sie Ihren Namen ein:</h2>
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
<label for="lname">Name:</label>
|
<label for="lname">Name:</label>
|
||||||
<input type="text" id="lname" name="reservierterName"required><br><br>
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo '<h3>Reservieren von</h3>';
|
||||||
|
echo '<select class="form-control" name="daystart" id="daystart" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
echo '<h3>bis</h3>';
|
||||||
|
echo '<select class="form-control" name="dayend" id="dayend" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
?>
|
||||||
|
<br>
|
||||||
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnTisch5" >
|
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnTisch5" >
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -249,12 +349,39 @@ if (session_status() == PHP_SESSION_NONE) {
|
|||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal body -->
|
<!-- Modal body -->
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="getTables.php">
|
<form action="getTables.php" method="post">
|
||||||
<h2>Geben Sie Ihren Namen ein:</h2>
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
<label for="lname">Name:</label>
|
<label for="lname">Name:</label>
|
||||||
<input type="text" id="lname" name="reservierterName"required><br><br>
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo '<h3>Reservieren von</h3>';
|
||||||
|
echo '<select class="form-control" name="daystart" id="daystart" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
echo '<h3>bis</h3>';
|
||||||
|
echo '<select class="form-control" name="dayend" id="dayend" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
?>
|
||||||
|
<br>
|
||||||
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnTisch6" >
|
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnTisch6" >
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -284,13 +411,40 @@ if (session_status() == PHP_SESSION_NONE) {
|
|||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal body -->
|
<!-- Modal body -->
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="/action_page.php">
|
<form action="getTables.php" method="post">
|
||||||
<h2>Geben Sie Ihren Namen ein:</h2>
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
<label for="lname">Name:</label>
|
<label for="lname">Name:</label>
|
||||||
<input type="text" id="lname" name="reservierterName"required><br><br>
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnpark1" >
|
|
||||||
|
<?php
|
||||||
|
echo '<h3>Reservieren von</h3>';
|
||||||
|
echo '<select class="form-control" name="daystart" id="daystart" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
echo '<h3>bis</h3>';
|
||||||
|
echo '<select class="form-control" name="dayend" id="dayend" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
?>
|
||||||
|
<br>
|
||||||
|
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnPark1" >
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -320,13 +474,40 @@ if (session_status() == PHP_SESSION_NONE) {
|
|||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal body -->
|
<!-- Modal body -->
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="/action_page.php">
|
<form action="getTables.php" method="post">
|
||||||
<h2>Geben Sie Ihren Namen ein:</h2>
|
<h2>Geben Sie Ihren Namen ein:</h2>
|
||||||
<label for="lname">Name:</label>
|
<label for="lname">Name:</label>
|
||||||
<input type="text" id="lname" name="reservierterName"required><br><br>
|
<input type="text" id="lname" name="reservierterName"required><br><br>
|
||||||
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnpark2" >
|
|
||||||
|
<?php
|
||||||
|
echo '<h3>Reservieren von</h3>';
|
||||||
|
echo '<select class="form-control" name="daystart" id="daystart" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
echo '<h3>bis</h3>';
|
||||||
|
echo '<select class="form-control" name="dayend" id="dayend" onchange="ValidInputs()">';
|
||||||
|
for ($i=1; $i <32 ; $i++) {
|
||||||
|
$month = $_SESSION['month_string'];
|
||||||
|
if ($i == 1) {
|
||||||
|
echo "<option value='$i' selected>$i. $month</option>";
|
||||||
|
} else {
|
||||||
|
echo "<option value ='$i'> $i. $month</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
?>
|
||||||
|
<br>
|
||||||
|
<input class="btn btn-primary" type="submit" value="Reservieren" name="reservierenBtnPark2" >
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -14,10 +14,9 @@
|
|||||||
|
|
||||||
$("#refresh").click();
|
$("#refresh").click();
|
||||||
}
|
}
|
||||||
function ValidInputs(){
|
$(function () {
|
||||||
//var daystart = $( "#daystart:selected" ).text();
|
$('[data-toggle="popover"]').popover()
|
||||||
alert("daystart");
|
})
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
36
test.php
36
test.php
@@ -1,16 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
require './required/header.php';
|
/*
|
||||||
?>
|
for ($i=0; $i <12 ; $i++) {
|
||||||
<label for="cars">Choose a car:</label>
|
echo $monate[$i]."\n";
|
||||||
|
|
||||||
<select id="cars" onchange="test()">
|
|
||||||
<option value="volvo">Volvo</option>
|
|
||||||
<option value="saab">Saab</option>
|
|
||||||
<option value="vw">VW</option>
|
|
||||||
<option value="audi" selected>Audi</option>
|
|
||||||
</select>
|
|
||||||
<script>
|
|
||||||
function test() {
|
|
||||||
alert( "ready!" );
|
|
||||||
}
|
}
|
||||||
</script>
|
*/
|
||||||
|
$monate = array('Januar','Februar','März','April','Mai','Juni','Juli','August',
|
||||||
|
'September','Oktober','November','Dezember');
|
||||||
|
|
||||||
|
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"onchange="refreshListe()">';
|
||||||
|
for ($i=0; $i <12 ; $i++) {
|
||||||
|
if($monate[$i] == $_SESSION["month_string"])
|
||||||
|
{
|
||||||
|
echo '<option value ='.$monate[$i].'selected>'.$monate[$i].'</option>';
|
||||||
|
}
|
||||||
|
echo '<option value ='.$monate[$i].'>'.$monate[$i].'</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</select>';
|
||||||
|
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user