First Commit
This commit is contained in:
35
html/sternwarte/fdatum.php
Normal file
35
html/sternwarte/fdatum.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<h3>Nächste Führung</h3>
|
||||
<p class="textklein90">
|
||||
<?php include 'config_stern.php';
|
||||
$datu = 0;
|
||||
$datum_heute = date("Ymd");
|
||||
$sql_sel = "SELECT id, wtag, datum, uhrzeit FROM fdatum1 where datum >='$datum_heute' and datum >='20220402' order by datum ASC LIMIT 1";
|
||||
$result = mysqli_query($db, $sql_sel) or die(mysqli_error($db));
|
||||
if (mysqli_num_rows($result)) {
|
||||
while ($row = mysqli_fetch_row($result)) {
|
||||
$dat = preg_replace('#^(\d{4})(\d{2})(\d{2})$#', '\3.\2.\1', $row[2]);
|
||||
$datu = $row[2];
|
||||
echo $row[1] . ", " . $dat . ", " . $row[3] . "<br />";
|
||||
}
|
||||
} else {
|
||||
echo " Es liegt kein Führungstermin vor<br />";
|
||||
}
|
||||
?>
|
||||
<span class="textklein">(Führungen finden nur bei klarem Wetter statt)</span>
|
||||
<?php
|
||||
$addtxt = "";
|
||||
$sql_stmt = "SELECT count FROM fdatum1 where datum = $datu";
|
||||
$result = mysqli_query($db, $sql_stmt) or die(mysqli_error($db));
|
||||
$data = mysqli_fetch_assoc($result);
|
||||
$count = $data['count'] ;
|
||||
|
||||
if ( $count >= $maxBesucher) {
|
||||
echo " <strong>-AUSGEBUCHT-</strong>";
|
||||
} else {
|
||||
if ($datu == $datum_heute) {
|
||||
echo "<strong> ANMELDESCHLUSS </strong>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<br /><br /><a href="anmeldung.php">Zur Anmeldung</a>
|
||||
</p>
|
||||
Reference in New Issue
Block a user