2013-12-27 10:20:00 +01:00
<! DOCTYPE html >
< html lang = " de " >
< head >
< meta charset = " utf-8 " />
2013-12-27 10:42:55 +01:00
< 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
2013-12-27 14:30:54 +01:00
// require_once "angemeldet.php";
2013-12-27 10:20:00 +01:00
require_once " verbindungsaufbau.php " ; //mit Server verbinden
2013-12-27 13:25:13 +01:00
2013-12-27 10:20:00 +01:00
$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
2013-12-27 10:20:00 +01:00
while ( $zeile = $ergebnis -> fetch_array ()) {
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 >