Files
bm/public_html/public/neue-tabelle.php
2025-09-24 13:26:28 +02:00

155 lines
3.3 KiB
PHP

@extends('layout')
@section('content')
<?php
error_reporting (0);
$pas = $_GET[pas];
if ($pas != 1234)
{
echo "<html><body>Passwort:</h2>";
echo '<form action="neue-tabelle.php" Method="get">
<input type="text" Name="pas"> <input type="submit"></form>';
}
else
{
$con = new mysqli("localhost", "shzvhcsvsv", "RAPa9EUcn9", "shzvhcsvsv");
if( $con->connect_error){
die('Error: ' . $con->connect_error);
}
//----SEHR WICHTIG! WEGEN UMLAUTE-----
mysqli_set_charset($con, 'utf8');
$sql = "SELECT * FROM all_events ORDER BY id DESC";
if( isset($_GET['search']) ){
$name = mysqli_real_escape_string($con, htmlspecialchars($_GET['search']));
$sql = "SELECT * FROM all_events WHERE date like '%$name%' OR artist like '%$name%' OR title like '%$name%' OR genre like '%$name%' OR director like '%$name%' OR images like '%$name%' ORDER BY id DESC";
}
$result = $con->query($sql);
?>
<!DOCTYPE html>
<html lang="de">
<head>
<!-------link rel="stylesheet" type="text/css" href="kunstundko.css"------->
<link href="fotos/css/lightbox.css" rel="stylesheet" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Language" content="de-at">
<title>ARCHIV 25 Jahre Bruckmuehle</title>
<meta http-equiv="Content-Language" content="de">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
<script src="fotos/js/jquery-1.7.2.min.js"></script>
<script src="fotos/js/lightbox.js"></script>
<div class="container">
<label>Suche</label>
<form action="" method="GET">
<input type="text" placeholder="Was suchst Du" name="search">&nbsp;
<input type="submit" value="SUCHEN" name="btn" class="btn btn-sm btn-primary">
<input type="hidden" name="pas" value="1234">
</form>
<h2>ARCHIV 25 Jahre Bruckmühle</h2>
<?php
$ergebnis = mysqli_query($con, $sql);
$menge = mysqli_num_rows($ergebnis); ?>
<h5><?php echo $menge ?> Einträge zum Suchbegriff: <?php echo $name ?></h5>
<table cellpadding="5">
<tr><td colspan="3"><hr></td></tr>
<tr>
<td><b>Datum</b></td>
<td><b>Titel</b></td>
<!----td><b>Künstler</b></td----->
<td><b>Genre und Geschaftsführer</b></td>
</tr>
<tr><td colspan="3"><hr></td></tr>
<?php
while($row = $result->fetch_assoc()){
?>
<tr>
<td nowrap>
<?php
$datum = $row['date'];
$teile = explode("-", $datum);
echo "<b>";
echo $teile[0]; // Jahr
echo "</b><br>";
echo $teile[2]; // Tag
echo ".";
echo $teile[1]; // Monat
?>
</td>
<td nowrap><b><?php echo $row['title']; ?></b><br> <?php echo $row['artist']; ?></td>
<td nowrap>Genre: <?php echo $row['genre']; ?><br>Leitung: <?php echo $row['director']; ?></td></tr>
<tr><td></td>
<td nowrap>
<?php
if ($row['images']==""){echo "Kein Foto vorhanden";}
else
{
//$foto = "<img src='https://www.bruckmuehle.at/imgs/events/" . $row['images'] . "' height='150'>";
$foto = "<a href='https://www.bruckmuehle.at/imgs/events/" . $row['images'] . "' rel='lightbox[bruckmuehle]' title='bruckmuehle'><img src='https://www.bruckmuehle.at/imgs/events/" . $row['images'] . "' height='150'></a>";
echo $foto;
}
?>
</td><td></td>
</tr>
<tr><td colspan="3"><hr></td></tr>
<?php
}
}
?>
</table>
</div>
<br>
</body>
</html>
@endsection