Voll Upload SGD Fachinformatiker PHP
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Buchung Bearbeiten</title>
|
||||
<?php
|
||||
require_once("buchung.class.php");
|
||||
?>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
require_once("navigation.inc.php");
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<?php // Klasse Istanzieren (Buchung)
|
||||
$buchung = new Buchung();
|
||||
//Prüfung ob das Fomular einmal ausgeführt wurde
|
||||
if (isset($_POST["mode"])){
|
||||
// hier wird geprüft ob ein neuer Datensatz angelegt oder bearbeitet wird
|
||||
if($_POST["mode" == "null"]) {
|
||||
$buchung->anlegen();
|
||||
}
|
||||
else {
|
||||
$buchung->bearbeiten();
|
||||
}
|
||||
|
||||
header("refresh:3;url=buchung.php");
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
?>
|
||||
<div class="ausgabe">
|
||||
|
||||
<?php
|
||||
|
||||
//hier wird ein array vorbereitet um die Ausgabe vom SQL zu speichern
|
||||
$tData = array();
|
||||
|
||||
// SQL abfrage in das array als ASSOC speichern und abrufen anhand der Buchungsnummer bnummer
|
||||
if (isset($_POST["bnummer"])) {
|
||||
$tData = $buchung->lesenDatensatz($_GET["bnummer"]);
|
||||
$bnummer = $_GET["bnummer"];
|
||||
|
||||
?>
|
||||
<!-- Formularfelder erstellen -->
|
||||
<form method="post">
|
||||
<input type="hidden" name="mode" id="mode" value="<?php echo $bnummer; ?>">
|
||||
<label for="bnummer">Buchungsnummer: </label>
|
||||
<input type="text" name="bnummer" id="bnummer" value="<?php echo $bnummer; ?>" disabled>
|
||||
<br>
|
||||
<label for="termnr">Termin: </label>
|
||||
<?php echo $buchung->einfuegenSelect("termine","termnr", "beginn", $tData['termnr']); ?>
|
||||
<br>
|
||||
<label for="tnummer">Teilnehmer: </label>
|
||||
<?php echo $buchung->einfuegenSelect("teilnehmer", "tnummer", "name", $tData['tnummer']); ?>
|
||||
<br>
|
||||
<p>
|
||||
<input type="submit" value="Änderung speichern">
|
||||
</p>
|
||||
</form>
|
||||
<p>
|
||||
<a class="button" href="bloeschen.php?bnummer=<?php echo $bnummer; ?>">Buchung löschen</a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
else {
|
||||
?>
|
||||
<form action="bbearbeiten.php" method="post">
|
||||
<input type="hidden" name="mode" id="mode" value="null">
|
||||
<label for="bnummer">Buchungsnummer</label>
|
||||
<input type="text" name="bnummer" id="bnummer" value="AUTO" disabled>
|
||||
<br>
|
||||
<label for="termnr">Termin: </label>
|
||||
<?php echo $buchung->einfuegenSelect("termine", "termnr", "beginn", NULL); ?>
|
||||
<br>
|
||||
<label for="tnummer">Teilnehmer: </label>
|
||||
<?php echo $buchung->einfuegenSelect("teilnehmer", "tnummer", "name", NULL); ?>
|
||||
<br>
|
||||
<p>
|
||||
<input type="submit" value="Änderung Speichern">
|
||||
</p>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,196 @@
|
||||
<?php
|
||||
class Buchung {
|
||||
private $tabelle = "buchung";
|
||||
|
||||
public function lesenAlleDaten() {
|
||||
$sql = "SELECT buchung.bnummer, kurs.titel AS kursTitel, dozenten.name AS dozentenName, termine.beginn, termine.ende, teilnehmer.name AS teilnehmerName, teilnehmer.vname AS teilnehmerVorname FROM buchung
|
||||
JOIN termine ON buchung.termnr = termine.termnr
|
||||
JOIN teilnehmer ON buchung.tnummer = teilnehmer.tnummer
|
||||
JOIN kurs ON termine.kursnr = kurs.kursnr
|
||||
JOIN dozenten ON termine.doznr = dozenten.doznr
|
||||
ORDER BY buchung.bnummer";
|
||||
|
||||
$this->baueBuchungTabelle($sql);
|
||||
}
|
||||
|
||||
private function baueBuchungTabelle($sql) {
|
||||
require("db.inc.php");
|
||||
|
||||
if ($stmt = $pdo -> prepare($sql)) {
|
||||
$stmt -> execute();
|
||||
|
||||
echo "<table id=\"zebra\">\n\t";
|
||||
echo "<thead>
|
||||
|
||||
<tr>
|
||||
<th>Nummer</th><th>Kurs</th><th>Dozent</th><th>Beginn</th><th>Ende</th><th>Name</th><th>Vorname</th><th>Bearbeiten</th>
|
||||
</tr>
|
||||
</thead>";
|
||||
|
||||
echo "<tbody>\n\t";
|
||||
$count = 0;
|
||||
|
||||
while ($z = $stmt -> fetch()) {
|
||||
$count += 1;
|
||||
|
||||
$zebratyp = "ungerade";
|
||||
|
||||
echo "<tr ";
|
||||
|
||||
if($count % 2 == 0) {
|
||||
$zebratyp = "gerade";
|
||||
}
|
||||
|
||||
echo "class=\"" .$zebratyp
|
||||
|
||||
."\">\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['bnummer'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['kursTitel'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['dozentenName'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['beginn'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['ende'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['teilnehmerName'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['teilnehmerVorname'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
."<a href=\"bbearbeiten.php?bnummer="
|
||||
|
||||
.htmlspecialchars($z['bnummer'])
|
||||
|
||||
."\">bearbeiten</a>"
|
||||
|
||||
."</td>\n</tr>";
|
||||
|
||||
}
|
||||
|
||||
echo "</tbody>\n</table>";
|
||||
}
|
||||
}
|
||||
|
||||
public function lesenDatensatz($id) {
|
||||
require("db.inc.php");
|
||||
|
||||
$sql = "SELECT buchung.bnummer, termine.termnr, kurs.titel, dozenten.name, termine.beginn, termine.ende, teilnehmer.name, teilnehmer.vname FROM $this->tabelle
|
||||
JOIN termine ON buchung.termnr = termine.termnr
|
||||
JOIN teilnehmer ON buchung.tnummer = teilnehmer.tnummer
|
||||
JOIN kurs ON termine.kursnr = kurs.kursnr
|
||||
JOIN dozenten ON termine.doznr = dozenten.doznr
|
||||
WHERE buchung.bnummer=:bnummer";
|
||||
|
||||
if($stmt = $pdo->prepare($sql)) {
|
||||
$stmt->bindParam(':bnummer', $id);
|
||||
$stmt->execute();
|
||||
return($stmt->fetch(PDO::FETCH_ASSOC));
|
||||
} else {
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
|
||||
public function einfuegenSelect($tab, $val, $text, $def) {
|
||||
$s = "<select name =\"" .$val . "\" id= \"" . $val . "\">";
|
||||
|
||||
require("db.inc.php");
|
||||
|
||||
$sql = "SELECT " .$val . ", " . $text . " FROM " .$tab;
|
||||
|
||||
if ($stmt = $pdo->prepare($sql)) {
|
||||
$stmt->execute();
|
||||
|
||||
while ($z = $stmt->fetch()) {
|
||||
$s = $s . "<option value=\"" . $z[0] . "\"";
|
||||
|
||||
if($z[0] == $def) {
|
||||
$s = $s . " selected";
|
||||
}
|
||||
|
||||
$s = $s . ">" . $z[0] ." | " . $z[1] ."</option>";
|
||||
}
|
||||
$s = $s . "</select>";
|
||||
|
||||
return $s;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function anlegen() {
|
||||
require("db.inc.php");
|
||||
|
||||
$bnummer = NULL;
|
||||
$termnr = $_POST["termnr"];
|
||||
$tnummer = $_POST["tnummer"];
|
||||
|
||||
$sql= "INSERT INTO .$this->tabelle (bnummer,
|
||||
termnr,
|
||||
tnummer)
|
||||
VALUES (:bnummer, :termnr, :tnummer)";
|
||||
|
||||
if($stmt = $pdo->prepare($sql)) {
|
||||
|
||||
$param = array(
|
||||
':bnummer' => $bnummer,
|
||||
':termnr' => $termnr,
|
||||
':tnummer' => $tnummer,
|
||||
);
|
||||
|
||||
if($stmt->execute($param)) {
|
||||
echo "<h2>Datensatz gespeichert</h2>";
|
||||
} else {
|
||||
echo "<h2>Fehler beim speichern!</h2>";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public function bearbeiten(){
|
||||
require("db.inc.php");
|
||||
|
||||
$bnummer = $_POST["mode"];
|
||||
$termnr = $_POST["termnr"];
|
||||
$tnummer = $_POST["tnummer"];
|
||||
|
||||
$sql= "UPDATE " . $this->tabelle . " SET termnr = :termnr, tnummer = :tnummer WHERE bnummer = :bnummer";
|
||||
|
||||
if($stmt = $pdo->prepare($sql)) {
|
||||
|
||||
$param = array(
|
||||
':bnummer' => $bnummer,
|
||||
':termnr' => $termnr,
|
||||
':tnummer' => $tnummer,
|
||||
);
|
||||
|
||||
if($stmt->execute($param)) {
|
||||
echo "<h2>Datensatz gespeichert</h2>";
|
||||
}
|
||||
else {
|
||||
echo "<h2>Fehler beim speichern!</h2>";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Buchungsliste ausgeben</title>
|
||||
|
||||
<?php
|
||||
require_once("buchung.class.php")
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
require_once("navigation.inc.php")
|
||||
?>
|
||||
<h1>Buchungen</h1>
|
||||
|
||||
|
||||
<div class="ausgabe">
|
||||
<?php
|
||||
|
||||
$teilnehmer = new Buchung();
|
||||
|
||||
$teilnehmer->lesenAlleDaten();
|
||||
|
||||
?>
|
||||
</div>
|
||||
<p>
|
||||
<a class="button" href="bbearbeiten.php">Neue Buchung anlegen</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,173 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Dozenten Bearbeiten</title>
|
||||
<?php
|
||||
require_once("dozenten.class.php");
|
||||
?>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
require_once("navigation.inc.php")
|
||||
?>
|
||||
|
||||
<?php
|
||||
$teilnehmer = new Dozenten();
|
||||
|
||||
if(isset($_POST["mode"])) {
|
||||
|
||||
if($_POST["mode"] == "null") {
|
||||
$teilnehmer->anlegen();
|
||||
}
|
||||
else {
|
||||
$teilnehmer->bearbeiten();
|
||||
}
|
||||
|
||||
header("refresh:3;url=dozent.php");
|
||||
}
|
||||
|
||||
else {
|
||||
?>
|
||||
<div class="ausgabe">
|
||||
<?php
|
||||
|
||||
$tData = array();
|
||||
|
||||
if(isset($_GET["doznr"])) {
|
||||
$tData = $teilnehmer->lesenDatensatz($_GET["doznr"]);
|
||||
$doznr=$_GET["doznr"]
|
||||
|
||||
?>
|
||||
|
||||
<form method="post">
|
||||
<input type="hidden" name="mode" id="mode" value="<?php echo $doznr; ?>">
|
||||
<label for="doznr">Dozentennummer: </label>
|
||||
<input type="text" name="doznr" id="doznr" value="<?php echo $doznr; ?>" disabled>
|
||||
|
||||
<br>
|
||||
|
||||
<label for="name">Name: </label>
|
||||
<input type="text" name="name" id="name" value="<?php echo $tData['name']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="vname">Vorname: </label>
|
||||
<input type="text" name="vname" id="vname" value="<?php echo $tData['vname']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="plz">Postleitzahl: </label>
|
||||
<input type="text" name="plz" id="plz" value="<?php echo $tData['plz']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="ort">Ort: </label>
|
||||
<input type="text" name="ort" id="ort" value="<?php echo $tData['ort']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="strasse">Strasse: </label>
|
||||
<input type="text" name="strasse" id="strasse" <?php echo $tData['strasse']; ?>>
|
||||
|
||||
<br>
|
||||
|
||||
<label for="hausnr">Hausnummer: </label>
|
||||
<input type="text" name="hausnr" id="hausnr" value="<?php echo $tData['hausnr']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="telefon1">Telefon 1: </label>
|
||||
<input type="text" name="telefon1" id="telefon1" value="<?php echo $tData['telefon1']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="telefon2">Telefon 2: </label>
|
||||
<input type="text" name="telefon2" id="telefon2" value="<?php echo $tData['telefon2']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="email">E-Mail: </label>
|
||||
<input type="text" name="email" id="e-mail" value="<?php echo $tData['email']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<input type="submit" value="Änderung speichern">
|
||||
</form>
|
||||
<p>
|
||||
<a class="button" href="dloeschen.php?doznr= <?php echo $doznr; ?>">Dozent Löschen</a>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
}
|
||||
else {
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form method="POST">
|
||||
|
||||
<input type="hidden" name="mode" id="mode" value="null">
|
||||
<label for="doznr">Dozentennummer:</label>
|
||||
<input type="text" name="doznr" id="doznr" value="AUTO" disabled>
|
||||
|
||||
<br>
|
||||
|
||||
<label for="name">Name: </label>
|
||||
<input type="text" name="name" id="name" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="vname">Vorname: </label>
|
||||
<input type="text" name="vname" id="vname" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="plz">Postleitzahl: </label>
|
||||
<input type="text" name="plz" id="plz" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="ort">Ort: </label>
|
||||
<input type="text" name="ort" id="ort" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="strasse">Strasse: </label>
|
||||
<input type="text" name="strasse" id="strasse" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="hausnr">Hausnummer: </label>
|
||||
<input type="text" name="hausnr" id="hausnr" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="telefon1">Telefon 1: </label>
|
||||
<input type="text" name="telefon1" id="telefon1" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="telefon2">Telefon 2: </label>
|
||||
<input type="text" name="telefon2" id="telefon2" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="email">E-Mail: </label>
|
||||
<input type="text" name="email" id="email" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<input type="submit" value="Änderung Speichern" value="">
|
||||
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Dozentenliste ausgeben</title>
|
||||
|
||||
<?php
|
||||
require_once("dozenten.class.php")
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
require_once("navigation.inc.php")
|
||||
?>
|
||||
<h1>Dozenten</h1>
|
||||
|
||||
|
||||
<div class="ausgabe">
|
||||
<?php
|
||||
|
||||
$teilnehmer = new Dozenten();
|
||||
|
||||
$teilnehmer->lesenAlleDaten();
|
||||
|
||||
?>
|
||||
</div>
|
||||
<p>
|
||||
<a class="button" href="dbearbeiten.php">Neuen Dozenten Anlegen</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,228 @@
|
||||
<?php
|
||||
|
||||
class Dozenten {
|
||||
private $tabelle = "dozenten";
|
||||
|
||||
public function lesenAlleDaten() {
|
||||
$sql = "SELECT doznr, name, vname, plz,
|
||||
ort, strasse, hausnr,
|
||||
telefon1, telefon2, email
|
||||
FROM " .$this->tabelle ."
|
||||
ORDER BY name";
|
||||
|
||||
$this->baueDozentenTabelle($sql);
|
||||
}
|
||||
|
||||
private function baueDozentenTabelle($sql) {
|
||||
require_once("db.inc.php");
|
||||
|
||||
if ($stmt = $pdo -> prepare($sql)) {
|
||||
$stmt -> execute();
|
||||
|
||||
echo "<table id=\"zebra\">\n\t";
|
||||
echo "<thead>
|
||||
|
||||
<tr>
|
||||
<th>Nummer</th><th>Name</th><th>Vorname</th><th>Plz</th><th>Ort</th><th>Straße</th><th>Haus-Nr.</th><th>Telefon 1</th><th>Telefon 2</th><th>E-Mail</th><th>Bearbeiten</th>
|
||||
</tr>
|
||||
</thead>";
|
||||
|
||||
echo "<tbody>\n\t";
|
||||
$count = 0;
|
||||
|
||||
while ($z = $stmt -> fetch()) {
|
||||
$count += 1;
|
||||
|
||||
$zebratyp = "ungerade";
|
||||
|
||||
echo "<tr ";
|
||||
|
||||
if($count % 2 == 0) {
|
||||
$zebratyp = "gerade";
|
||||
}
|
||||
|
||||
echo "class=\"" .$zebratyp
|
||||
|
||||
."\">\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['doznr'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['name'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['vname'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['plz'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['ort'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['strasse'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['hausnr'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['telefon1'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['telefon2'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['email'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
."<a href=\"dbearbeiten.php?doznr="
|
||||
|
||||
.htmlspecialchars($z['doznr'])
|
||||
|
||||
."\">bearbeiten</a>"
|
||||
|
||||
."</td>\n</tr>";
|
||||
|
||||
}
|
||||
|
||||
echo "</tbody>\n</table>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function lesenDatensatz($id) {
|
||||
require("db.inc.php");
|
||||
|
||||
$sql = "SELECT name, vname, plz, ort, strasse,
|
||||
hausnr,telefon1, telefon2, email
|
||||
FROM " .$this->tabelle ."
|
||||
WHERE doznr=:doznr";
|
||||
|
||||
if($stmt = $pdo->prepare($sql)) {
|
||||
$stmt->bindParam(':doznr', $id);
|
||||
$stmt->execute();
|
||||
return($stmt->fetch(PDO::FETCH_ASSOC));
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
public function bearbeiten(){
|
||||
require("db.inc.php");
|
||||
|
||||
$doznr = $_GET['mode'];
|
||||
$name = $_GET['name'];
|
||||
$vname = $_GET['vname'];
|
||||
$plz = $_GET['plz'];
|
||||
$ort = $_GET['ort'];
|
||||
$strasse = $_GET['strasse'];
|
||||
$hausnr = $_GET['hausnr'];
|
||||
$telefon1 = $_GET['telefon1'];
|
||||
$telefon2 = $_GET['telefon2'];
|
||||
$email = $_GET['email'];
|
||||
|
||||
$sql = "UPDATE ".$this->tabelle . "SET
|
||||
name = :name,
|
||||
vname = :vname,
|
||||
plz = :plz,
|
||||
ort = :ort,
|
||||
strasse = :strasse,
|
||||
hausnr = :hausnr,
|
||||
telefon1 = :telefon1,
|
||||
telefon2 = :telefon2
|
||||
email = :email
|
||||
WHERE doznr = :doznr";
|
||||
|
||||
if($stmt = $pdo->prepare($sql)) {
|
||||
$param = array(
|
||||
':doznr' => $doznr,
|
||||
':name' => $name,
|
||||
':vname' => $vname,
|
||||
':plz' => $plz,
|
||||
':ort' => $ort,
|
||||
':strasse' => $strasse,
|
||||
':hausnr' => $hausnr,
|
||||
':telefon1' => $telefon1,
|
||||
':telefon2' => $telefon2,
|
||||
':email' => $email,
|
||||
);
|
||||
if($stmt->execute($param)) {
|
||||
echo "<h2>Datensatz erfolgreich gespeichert</h2>";
|
||||
}
|
||||
else {
|
||||
echo "<h2>Fehler beim Speichern!</h2>";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function anlegen() {
|
||||
require("db.inc.php");
|
||||
|
||||
$doznr = $_GET['mode'];
|
||||
$name = $_GET['name'];
|
||||
$vname = $_GET['vname'];
|
||||
$plz = $_GET['plz'];
|
||||
$ort = $_GET['ort'];
|
||||
$strasse = $_GET['strasse'];
|
||||
$hausnr = $_GET['hausnr'];
|
||||
$telefon1 = $_GET['telefon1'];
|
||||
$telefon2 = $_GET['telefon2'];
|
||||
$email = $_GET['email'];
|
||||
|
||||
$sql = "INSERT INTO " .$this->tabelle ." (
|
||||
doznr, name, vname,
|
||||
plz, ort, strasse, hausnr,
|
||||
telefon1, telefon2, email)
|
||||
VALUES (
|
||||
:doznr, :name, :vname,
|
||||
:plz, :ort, :strasse, :hausnr,
|
||||
:telefon1, :telefon2, :email)";
|
||||
|
||||
if($stmt = $pdo->prepare($sql)) {
|
||||
$param = array(
|
||||
':doznr' => $doznr,
|
||||
':name' => $name,
|
||||
':vname' => $vname,
|
||||
':plz' => $plz,
|
||||
':ort' => $ort,
|
||||
':strasse' => $strasse,
|
||||
':hausnr' => $hausnr,
|
||||
':telefon1' => $telefon1,
|
||||
':telefon2' => $telefon2,
|
||||
':email' => $email,
|
||||
);
|
||||
if($stmt->execute($param)) {
|
||||
echo "<h2>Datensatz erfolgreich gespeichert</h2>";
|
||||
}
|
||||
else {
|
||||
echo "<h2>Fehler beim Speichern!</h2>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function loeschen($id){
|
||||
require("db.inc.php");
|
||||
|
||||
$sql = "DELETE FROM " .$this->tabelle ." WHERE doznr = :doznr";
|
||||
|
||||
if($stmt = $pdo->prepare($sql)) {
|
||||
$stmt->bindParam(':doznr', $id);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Kursverwaltung</title>
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
require_once("navigation.inc.php")
|
||||
?>
|
||||
<h1>Kursverwaltung</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
<div>
|
||||
<a class="button" href="index.php">Kursverwaltung</a>
|
||||
<a class="button" href="teilnehmer.php">Teilnehmer</a>
|
||||
<a class="button" href="termine.php">Termine</a>
|
||||
<a class="button" href="kurse.php">Kurse</a>
|
||||
<a class="button" href="dozent.php">Dozenten</a>
|
||||
<a class="button" href="buchung.php">Buchungen</a>
|
||||
</div>
|
||||
@@ -0,0 +1,79 @@
|
||||
body {
|
||||
background-color: #324873;
|
||||
color: #F2EB80;
|
||||
}
|
||||
|
||||
.button {
|
||||
color: #F2EB80;
|
||||
background-color: #324873;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
min-width: 110px;
|
||||
height: 25px;
|
||||
text-align: center;
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
border-style: groove;
|
||||
border-width: 1px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#zebra {
|
||||
color: #F2EB80;
|
||||
border-collapse: collapse;
|
||||
border: 2px solid;
|
||||
border-color: #D94E4E;
|
||||
}
|
||||
|
||||
#zebra thead {
|
||||
background-color: #F2EB80;
|
||||
color: #324873;
|
||||
}
|
||||
|
||||
#zebra td {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
#zebra tbody tr.gerade td {
|
||||
background-color: #A6333D;
|
||||
}
|
||||
#zebra tbody tr.ungerade td {
|
||||
background-color: #D96B2B;
|
||||
}
|
||||
|
||||
.ausgabe {
|
||||
display: inline-block;
|
||||
margin: 15px 5p0x 5px 5px;
|
||||
padding: 5px;
|
||||
border-style: groove;
|
||||
border-width: 1px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
form {
|
||||
background-color: #324873;
|
||||
color: #F2EB80;
|
||||
margin: 5px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
input {
|
||||
margin: 5px;
|
||||
padding: 2px;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
min-width: 150px;
|
||||
}
|
||||
|
||||
select {
|
||||
margin: 5px;
|
||||
padding: 2px;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Teilnehmer Bearbeiten</title>
|
||||
<?php
|
||||
require_once("teilnehmer.class.php");
|
||||
?>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
require_once("navigation.inc.php")
|
||||
?>
|
||||
|
||||
<?php
|
||||
$teilnehmer = new Teilnehmer();
|
||||
|
||||
if(isset($_POST["mode"])) {
|
||||
|
||||
if($_POST["mode"] == "null") {
|
||||
$teilnehmer->anlegen();
|
||||
}
|
||||
else {
|
||||
$teilnehmer->bearbeiten();
|
||||
}
|
||||
|
||||
header("refresh:3;url=teilnehmer.php");
|
||||
}
|
||||
|
||||
else {
|
||||
?>
|
||||
<div class="ausgabe">
|
||||
<?php
|
||||
|
||||
$tData = array();
|
||||
|
||||
if(isset($_GET["tnummer"])) {
|
||||
$tData = $teilnehmer->lesenDatensatz($_GET["tnummer"]);
|
||||
$tnummer=$_GET["tnummer"]
|
||||
|
||||
?>
|
||||
|
||||
<form method="post">
|
||||
<input type="hidden" name="mode" id="mode" value="<?php echo $tnummer; ?>">
|
||||
<label for="tnummer">Teilnehmernummer: </label>
|
||||
<input type="text" name="tnummer" id="tnummer" value="<?php echo $tnummer; ?>" disabled>
|
||||
|
||||
<br>
|
||||
|
||||
<label for="name">Name: </label>
|
||||
<input type="text" name="name" id="name" value="<?php echo $tData['name']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="vname">Vorname: </label>
|
||||
<input type="text" name="vname" id="vname" value="<?php echo $tData['vname']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="plz">Postleitzahl: </label>
|
||||
<input type="text" name="plz" id="plz" value="<?php echo $tData['plz']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="ort">Ort: </label>
|
||||
<input type="text" name="ort" id="ort" value="<?php echo $tData['ort']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="strasse">Strasse: </label>
|
||||
<input type="text" name="strasse" id="strasse" <?php echo $tData['strasse']; ?>>
|
||||
|
||||
<br>
|
||||
|
||||
<label for="hausnr">Hausnummer: </label>
|
||||
<input type="text" name="hausnr" id="hausnr" value="<?php echo $tData['hausnr']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="telefon1">Telefon 1: </label>
|
||||
<input type="text" name="telefon1" id="telefon1" value="<?php echo $tData['telefon1']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="telefon2">Telefon 2: </label>
|
||||
<input type="text" name="telefon2" id="telefon2" value="<?php echo $tData['telefon2']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="email">E-Mail: </label>
|
||||
<input type="text" name="email" id="e-mail" value="<?php echo $tData['email']; ?>">
|
||||
|
||||
<br>
|
||||
|
||||
<input type="submit" value="Änderung speichern">
|
||||
</form>
|
||||
<p>
|
||||
<a class="button" href="tloeschen.php?tnummer= <?php echo $tnummer; ?>">Teilnehmer Löschen</a>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
}
|
||||
else {
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<form method="POST">
|
||||
|
||||
<input type="hidden" name="mode" id="mode" value="null">
|
||||
<label for="tnummer">Teilnehmernummer:</label>
|
||||
<input type="text" name="tnummer" id="tnummer" value="AUTO" disabled>
|
||||
|
||||
<br>
|
||||
|
||||
<label for="name">Name: </label>
|
||||
<input type="text" name="name" id="name" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="vname">Vorname: </label>
|
||||
<input type="text" name="vname" id="vname" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="plz">Postleitzahl: </label>
|
||||
<input type="text" name="plz" id="plz" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="ort">Ort: </label>
|
||||
<input type="text" name="ort" id="ort" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="strasse">Strasse: </label>
|
||||
<input type="text" name="strasse" id="strasse" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="hausnr">Hausnummer: </label>
|
||||
<input type="text" name="hausnr" id="hausnr" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="telefon1">Telefon 1: </label>
|
||||
<input type="text" name="telefon1" id="telefon1" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="telefon2">Telefon 2: </label>
|
||||
<input type="text" name="telefon2" id="telefon2" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="email">E-Mail: </label>
|
||||
<input type="text" name="email" id="email" value="">
|
||||
|
||||
<br>
|
||||
|
||||
<input type="submit" value="Änderung Speichern" value="">
|
||||
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,226 @@
|
||||
<?php
|
||||
|
||||
class Teilnehmer {
|
||||
private $tabelle = "teilnehmer";
|
||||
|
||||
public function lesenAlleDaten() {
|
||||
$sql = "SELECT tnummer, name, vname, plz,
|
||||
ort, strasse, hausnr,
|
||||
telefon1, telefon2, email
|
||||
FROM " .$this->tabelle ."
|
||||
ORDER BY name";
|
||||
|
||||
$this->baueTeilnehmerTabelle($sql);
|
||||
}
|
||||
|
||||
private function baueTeilnehmerTabelle($sql) {
|
||||
require_once("db.inc.php");
|
||||
|
||||
if ($stmt = $pdo -> prepare($sql)) {
|
||||
$stmt -> execute();
|
||||
|
||||
echo "<table id=\"zebra\">\n\t";
|
||||
echo "<thead>
|
||||
|
||||
<tr>
|
||||
<th>Nummer</th><th>Name</th><th>Vorname</th><th>Plz</th><th>Ort</th><th>Straße</th><th>Haus-Nr.</th><th>Telefon 1</th><th>Telefon 2</th><th>E-Mail</th><th>Bearbeiten</th>
|
||||
</tr>
|
||||
</thead>";
|
||||
|
||||
echo "<tbody>\n\t";
|
||||
$count = 0;
|
||||
|
||||
while ($z = $stmt -> fetch()) {
|
||||
$count += 1;
|
||||
|
||||
$zebratyp = "ungerade";
|
||||
|
||||
echo "<tr ";
|
||||
|
||||
if($count % 2 == 0) {
|
||||
$zebratyp = "gerade";
|
||||
}
|
||||
|
||||
echo "class=\"" .$zebratyp
|
||||
|
||||
."\">\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['tnummer'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['name'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['vname'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['plz'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['ort'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['strasse'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['hausnr'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['telefon1'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['telefon2'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['email'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
."<a href=\"tbearbeiten.php?tnummer="
|
||||
|
||||
.htmlspecialchars($z['tnummer'])
|
||||
|
||||
."\">bearbeiten</a>"
|
||||
|
||||
."</td>\n</tr>";
|
||||
|
||||
}
|
||||
|
||||
echo "</tbody>\n</table>";
|
||||
}
|
||||
}
|
||||
|
||||
public function lesenDatensatz($id) {
|
||||
require("db.inc.php");
|
||||
|
||||
$sql = "SELECT name, vname, plz, ort, strasse,
|
||||
hausnr,telefon1, telefon2, email
|
||||
FROM " .$this->tabelle ."
|
||||
WHERE tnummer=:tnummer";
|
||||
|
||||
if($stmt = $pdo->prepare($sql)) {
|
||||
$stmt->bindParam(':tnummer', $id);
|
||||
$stmt->execute();
|
||||
return($stmt->fetch(PDO::FETCH_ASSOC));
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
public function bearbeiten(){
|
||||
require("db.inc.php");
|
||||
|
||||
$tnummer = $_GET['mode'];
|
||||
$name = $_GET['name'];
|
||||
$vname = $_GET['vname'];
|
||||
$plz = $_GET['plz'];
|
||||
$ort = $_GET['ort'];
|
||||
$strasse = $_GET['strasse'];
|
||||
$hausnr = $_GET['hausnr'];
|
||||
$telefon1 = $_GET['telefon1'];
|
||||
$telefon2 = $_GET['telefon2'];
|
||||
$email = $_GET['email'];
|
||||
|
||||
$sql = "UPDATE ".$this->tabelle . "SET
|
||||
name = :name,
|
||||
vname = :vname,
|
||||
plz = :plz,
|
||||
ort = :ort,
|
||||
strasse = :strasse,
|
||||
hausnr = :hausnr,
|
||||
telefon1 = :telefon1,
|
||||
telefon2 = :telefon2
|
||||
email = :email
|
||||
WHERE tnummer = :tnummer";
|
||||
|
||||
if($stmt = $pdo->prepare($sql)) {
|
||||
$param = array(
|
||||
':tnummer' => $tnummer,
|
||||
':name' => $name,
|
||||
':vname' => $vname,
|
||||
':plz' => $plz,
|
||||
':ort' => $ort,
|
||||
':strasse' => $strasse,
|
||||
':hausnr' => $hausnr,
|
||||
':telefon1' => $telefon1,
|
||||
':telefon2' => $telefon2,
|
||||
':email' => $email,
|
||||
);
|
||||
if($stmt->execute($param)) {
|
||||
echo "<h2>Datensatz erfolgreich gespeichert</h2>";
|
||||
}
|
||||
else {
|
||||
echo "<h2>Fehler beim Speichern!</h2>";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function anlegen() {
|
||||
require("db.inc.php");
|
||||
|
||||
$tnummer = $_GET['mode'];
|
||||
$name = $_GET['name'];
|
||||
$vname = $_GET['vname'];
|
||||
$plz = $_GET['plz'];
|
||||
$ort = $_GET['ort'];
|
||||
$strasse = $_GET['strasse'];
|
||||
$hausnr = $_GET['hausnr'];
|
||||
$telefon1 = $_GET['telefon1'];
|
||||
$telefon2 = $_GET['telefon2'];
|
||||
$email = $_GET['email'];
|
||||
|
||||
$sql = "INSERT INTO " .$this->tabelle ." (
|
||||
tnummer, name, vname,
|
||||
plz, ort, strasse, hausnr,
|
||||
telefon1, telefon2, email)
|
||||
VALUES (
|
||||
:tnummer, :name, :vname,
|
||||
:plz, :ort, :strasse, :hausnr,
|
||||
:telefon1, :telefon2, :email)";
|
||||
|
||||
if($stmt = $pdo->prepare($sql)) {
|
||||
$param = array(
|
||||
':tnummer' => $tnummer,
|
||||
':name' => $name,
|
||||
':vname' => $vname,
|
||||
':plz' => $plz,
|
||||
':ort' => $ort,
|
||||
':strasse' => $strasse,
|
||||
':hausnr' => $hausnr,
|
||||
':telefon1' => $telefon1,
|
||||
':telefon2' => $telefon2,
|
||||
':email' => $email,
|
||||
);
|
||||
if($stmt->execute($param)) {
|
||||
echo "<h2>Datensatz erfolgreich gespeichert</h2>";
|
||||
}
|
||||
else {
|
||||
echo "<h2>Fehler beim Speichern!</h2>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function loeschen($id){
|
||||
require("db.inc.php");
|
||||
|
||||
$sql = "DELETE FROM " .$this->tabelle ." WHERE tnummer = :tnummer";
|
||||
|
||||
if($stmt = $pdo->prepare($sql)) {
|
||||
$stmt->bindParam(':tnummer', $id);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Teilnehmerliste ausgeben</title>
|
||||
|
||||
<?php
|
||||
require_once("teilnehmer.class.php")
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
require_once("navigation.inc.php")
|
||||
?>
|
||||
<h1>Teilnehmer</h1>
|
||||
|
||||
|
||||
<div class="ausgabe">
|
||||
<?php
|
||||
|
||||
$teilnehmer = new Teilnehmer();
|
||||
|
||||
$teilnehmer->lesenAlleDaten();
|
||||
|
||||
?>
|
||||
</div>
|
||||
<p>
|
||||
<a class="button" href="tbearbeiten.php">Neuen Teilnehmer Anlegen</a>
|
||||
<a class="button" href="tsuchen.php">Teilnehmer Suchen</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
class Termine {
|
||||
public function lesenAlleDaten() {
|
||||
$sql = "SELECT termine.termnr, kurs.titel AS Kursname, dozenten.name AS Dozentenname, termine.beginn, termine.ende, termine.dauer, termine.minanzahl, termine.maxanzahl, termine.vort FROM termine
|
||||
JOIN kurs ON termine.kursnr = kurs.kursnr
|
||||
JOIN dozenten ON termine.doznr = dozenten.doznr
|
||||
ORDER BY termine.beginn";
|
||||
|
||||
$this->baueTerminTabelle($sql);
|
||||
}
|
||||
|
||||
private function baueTerminTabelle($sql) {
|
||||
require("db.inc.php");
|
||||
|
||||
if ($stmt = $pdo -> prepare($sql)) {
|
||||
$stmt -> execute();
|
||||
|
||||
echo "<table id=\"zebra\">\n\t";
|
||||
echo "<thead>
|
||||
|
||||
<tr>
|
||||
<th>Nummer</th><th>Kursname</th><th>Dozent</th><th>Beginn</th><th>Ende</th><th>Dauer</th><th>Min</th><th>Max</th><th>Raum</th><th>Bearbeiten</th>
|
||||
</tr>
|
||||
</thead>";
|
||||
|
||||
echo "<tbody>\n\t";
|
||||
$count = 0;
|
||||
|
||||
while ($z = $stmt -> fetch()) {
|
||||
$count += 1;
|
||||
|
||||
$zebratyp = "ungerade";
|
||||
|
||||
echo "<tr ";
|
||||
|
||||
if($count % 2 == 0) {
|
||||
$zebratyp = "gerade";
|
||||
}
|
||||
|
||||
echo "class=\"" .$zebratyp
|
||||
|
||||
."\">\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['termnr'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['Kursname'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['Dozentenname'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['beginn'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['ende'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['dauer'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['minanzahl'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['maxanzahl'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
. htmlspecialchars($z['vort'])
|
||||
|
||||
."</td>\n\t<td>"
|
||||
|
||||
."<a href=\"terbearbeiten.php?termnr="
|
||||
|
||||
.htmlspecialchars($z['termnr'])
|
||||
|
||||
."\">bearbeiten</a>"
|
||||
|
||||
."</td>\n</tr>";
|
||||
|
||||
}
|
||||
|
||||
echo "</tbody>\n</table>";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Teilnehmerliste ausgeben</title>
|
||||
|
||||
<?php
|
||||
require_once("termine.class.php")
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
require_once("navigation.inc.php")
|
||||
?>
|
||||
<h1>Teilnehmer</h1>
|
||||
|
||||
|
||||
<div class="ausgabe">
|
||||
<?php
|
||||
|
||||
$teilnehmer = new Termine();
|
||||
|
||||
$teilnehmer->lesenAlleDaten();
|
||||
|
||||
?>
|
||||
</div>
|
||||
<p>
|
||||
<a class="button" href="terbearbeiten.php">Neuen Termin Anlegen</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Teilnehmer löschen</title>
|
||||
|
||||
<?php
|
||||
require_once("teilnehmer.class.php");
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
require_once("navigation.inc.php");
|
||||
?>
|
||||
|
||||
<?php
|
||||
if(isset($_GET['tnummer'])) {
|
||||
$teilnehmer = new Teilnehmer();
|
||||
$teilnehmer->loeschen($_GET['tnummer']);
|
||||
echo "<h2>Teilnehmer gelöscht</h2>";
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user