1
0
Fork 0
This repository has been archived on 2024-06-28. You can view files and clone it, but cannot push or open issues or pull requests.
veranstaltung/veranstaltungen.php

41 lines
1.8 KiB
PHP
Raw Normal View History

2013-12-27 10:20:00 +01:00
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title>Veranstaltungen</title>
2013-12-27 10:20:00 +01:00
<meta name="author" content="Lukas" >
2013-12-27 13:25:13 +01:00
<link rel="stylesheet" href="./style.css" />
2013-12-27 10:20:00 +01:00
</head>
<body>
<?php
require_once "verbindungsaufbau.php"; //mit Server verbinden
$ergebnis = $mysqli->query("SELECT * FROM orte, veranstaltungen WHERE orte.ort_id = veranstaltungen.ort_id"); //SQL Befehl ausführen
echo "<table border='1'>\n";
2013-12-27 14:56:43 +01:00
echo "<tr><th>Veranstaltungsname</th><th>Beschreibung</th><th>Zeit</th><th>Ort</th><th>Adresse</th><th>Teinehmen</th><th>Ändern</th><th>Löschen</th>"; //Zeile mit Überschriften
2014-01-10 17:02:12 +01:00
while ($zeile = $ergebnis->fetch_array()) { // für jeden Wert in der Datenbank eine Tabellenzeile
2013-12-27 10:20:00 +01:00
echo "<tr><td>" . htmlspecialchars($zeile["name"]) . "</td>"
. "<td>" . htmlspecialchars($zeile['beschreibung']) . "</td>"
. "<td>" . date( 'd.m.Y H:i', strtotime(htmlspecialchars($zeile['zeit'])))
. "<td>" . htmlspecialchars($zeile['ort_name']) . "</td>"
. "<td>" . htmlspecialchars($zeile['plz']) . " " . htmlspecialchars($zeile['stadt']) . "<br /> " . htmlspecialchars($zeile['strasse']) . " " . htmlspecialchars($zeile['hausnummer']) . "</td>"
2013-12-29 11:26:32 +01:00
. "<td><a class='tabelle' href='./teilnahme.php?id=" . htmlspecialchars($zeile['veranstaltungs_id']) . "'><b>teilnehmen</b></a></td>"
. "<td><a class='tabelle' href='./veranstaltung_aendern.php?id=" . htmlspecialchars($zeile['veranstaltungs_id']) . "'>ändern</a></td>"
. "<td><a class='tabelle' href='./veranstaltung_loeschen.php?id=" . htmlspecialchars($zeile['veranstaltungs_id']) . "'>löschen</a></td>"
2013-12-27 10:20:00 +01:00
."</td></tr>\n" ;
}
echo "</table>";
$ergebnis->close();
$mysqli->close();
?>
<a href="veranstaltung_erstellen.php">Veranstaltung erstellen</a>
2013-12-27 10:51:12 +01:00
<br /><a href="orte.php">alle Orte anzeigen</a>
2013-12-27 10:20:00 +01:00
</body>
</html>