135 lines
2.5 KiB
PHP
135 lines
2.5 KiB
PHP
<?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 tabelle WHERE ort ='$name'";
|
|
$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>
|
|
|
|
<title>ARCHIV 25 Jahre Bruckmuehle</title>
|
|
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<label>Suche</label>
|
|
<form action="" method="GET">
|
|
<input type="text" placeholder="Was suchst Du" name="search">
|
|
<input type="submit" value="Search" name="btn" class="btn btn-sm btn-primary">
|
|
<input type="hidden" name="pas" value="1234">
|
|
</form>
|
|
<h2>ARCHIV 25 Jahre Bruckmuehle</h2>
|
|
<?php
|
|
|
|
$ergebnis = mysqli_query($con, $sql);
|
|
$menge = mysqli_num_rows($ergebnis); ?>
|
|
<h5><?php echo $menge ?> Eintraege</h5>
|
|
<table cellpadding="5">
|
|
<tr><td colspan="3"><hr></td></tr>
|
|
<tr>
|
|
<td><b>Datum</b></td>
|
|
<td><b>Titel</b></td>
|
|
<!----td><b>Kunstler</b></td----->
|
|
<td><b>Genre und Geschaftsfuehrer</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";}
|
|
else
|
|
{
|
|
$foto = "<img src='https://www.bruckmuehle.at/imgs/events/".$row['images']."' height='150'>";
|
|
echo $foto;
|
|
}
|
|
?>
|
|
</td><td></td>
|
|
</tr>
|
|
<tr><td colspan="3"><hr></td></tr>
|
|
|
|
|
|
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
</table>
|
|
</div>
|
|
<br>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|