mirror of
https://github.com/JannikKoester/Tischverwaltung.git
synced 2026-01-10 23:00:08 +01:00
Autorefresh
This commit is contained in:
@@ -494,3 +494,4 @@ if(isset($_POST['getTables']))
|
|||||||
}
|
}
|
||||||
//Parkplatz 2 Ende
|
//Parkplatz 2 Ende
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
21
index.php
21
index.php
@@ -98,7 +98,7 @@ require 'modal.php';
|
|||||||
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>
|
||||||
<select class="form-control" name="year">';
|
<select class="form-control" name="year" onchange="refreshListe()">';
|
||||||
for ($i=2020; $i <2030 ; $i++) {
|
for ($i=2020; $i <2030 ; $i++) {
|
||||||
|
|
||||||
if ($i == $_SESSION["year"]) {
|
if ($i == $_SESSION["year"]) {
|
||||||
@@ -115,7 +115,7 @@ require 'modal.php';
|
|||||||
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">
|
<select class="form-control" name="month"onchange="refreshListe()">
|
||||||
<option value ="Januar"'. $selectedjan.'>Januar</option>
|
<option value ="Januar"'. $selectedjan.'>Januar</option>
|
||||||
<option value ="Februar"'. $selectedfeb.'>Februar</option>
|
<option value ="Februar"'. $selectedfeb.'>Februar</option>
|
||||||
<option value ="März"'. $selectedmar.'>März</option>
|
<option value ="März"'. $selectedmar.'>März</option>
|
||||||
@@ -135,7 +135,7 @@ require 'modal.php';
|
|||||||
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>
|
||||||
<select class="form-control" name="day">';
|
<select class="form-control" name="day" onchange="refreshListe()">';
|
||||||
|
|
||||||
for ($i = 1; $i < 32; $i++) {
|
for ($i = 1; $i < 32; $i++) {
|
||||||
if ($i == $_SESSION["day"]) {
|
if ($i == $_SESSION["day"]) {
|
||||||
@@ -146,7 +146,7 @@ require 'modal.php';
|
|||||||
}
|
}
|
||||||
echo '</select>
|
echo '</select>
|
||||||
</div>
|
</div>
|
||||||
<button id="trigger" name="getTables" type="submit" class="btnchange" id="aktualisiere">Aktualisiere erneut</button>
|
<button id="refresh" name="getTables" type="submit" class="btnchange"style="display:none;" >Aktualisiere erneut</button>
|
||||||
</form>
|
</form>
|
||||||
<h2 style="color:white;font-family:Bitter; text-align:center;">'.$_SESSION["day_string"].'. '.$_SESSION["month_string"].' '.$_SESSION["year"].' </h2>';
|
<h2 style="color:white;font-family:Bitter; text-align:center;">'.$_SESSION["day_string"].'. '.$_SESSION["month_string"].' '.$_SESSION["year"].' </h2>';
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ require 'modal.php';
|
|||||||
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>
|
||||||
<select class="form-control" name="year">';
|
<select class="form-control" name="year" onchange="refreshListe()">';
|
||||||
for ($i=2020; $i <2030 ; $i++) {
|
for ($i=2020; $i <2030 ; $i++) {
|
||||||
|
|
||||||
if ($i == $_SESSION["year"]) {
|
if ($i == $_SESSION["year"]) {
|
||||||
@@ -176,7 +176,7 @@ require 'modal.php';
|
|||||||
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">
|
<select class="form-control" name="month"onchange="refreshListe()">
|
||||||
<option value ="Januar">Januar</option>
|
<option value ="Januar">Januar</option>
|
||||||
<option value ="Februar">Februar</option>
|
<option value ="Februar">Februar</option>
|
||||||
<option value ="März">März</option>
|
<option value ="März">März</option>
|
||||||
@@ -194,7 +194,7 @@ require 'modal.php';
|
|||||||
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>
|
||||||
<select class="form-control" name="day">';
|
<select class="form-control" name="day" onchange="refreshListe()">';
|
||||||
|
|
||||||
for ($i = 1; $i < 32; $i++) {
|
for ($i = 1; $i < 32; $i++) {
|
||||||
if ($i == $_SESSION["day"]) {
|
if ($i == $_SESSION["day"]) {
|
||||||
@@ -205,8 +205,8 @@ require 'modal.php';
|
|||||||
}
|
}
|
||||||
echo '</select>
|
echo '</select>
|
||||||
</div>
|
</div>
|
||||||
<button name="getTables" type="submit" class="btnchange">Aktualisieren</button>
|
<button id="refresh" name="getTables" type="submit" class="btnchange style="display:none;"" >Aktualisiere</button>
|
||||||
</form>';
|
</form>';
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -471,10 +471,13 @@ require 'modal.php';
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require 'required/footer.php';
|
require 'required/footer.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,15 @@
|
|||||||
<link rel="stylesheet" href="assets/css/Footer-Dark.css">
|
<link rel="stylesheet" href="assets/css/Footer-Dark.css">
|
||||||
<link rel="stylesheet" href="assets/css/Header-Dark.css">
|
<link rel="stylesheet" href="assets/css/Header-Dark.css">
|
||||||
<link rel="stylesheet" href="assets/css/styles.css">
|
<link rel="stylesheet" href="assets/css/styles.css">
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||||
|
<script>
|
||||||
|
function refreshListe() {
|
||||||
|
|
||||||
|
$("#refresh").click();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
@@ -20,17 +29,6 @@
|
|||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li class="nav-item" role="presentation"><a class="nav-link" href="#">Tischverwaltung</a></li>
|
<li class="nav-item" role="presentation"><a class="nav-link" href="#">Tischverwaltung</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<!--
|
|
||||||
<div class="navbar-collapse collapse w-100 order-3 dual-collapse2">
|
|
||||||
<ul class="navbar-nav ml-auto">
|
|
||||||
<form class="form-inline" action="/action_page.php">
|
|
||||||
<input type="text" class="form-control" placeholder="Username" style="margin-right:10px;">
|
|
||||||
<input type="password" class="form-control" placeholder="Password"style="margin-right:10px;">
|
|
||||||
<button type="submit" class="btnheader">Einloggen</button>
|
|
||||||
</form>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
-->
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
16
test.php
Normal file
16
test.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
require './required/header.php';
|
||||||
|
?>
|
||||||
|
<label for="cars">Choose a car:</label>
|
||||||
|
|
||||||
|
<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>
|
||||||
Reference in New Issue
Block a user