diff --git a/app/public/add_entry.php b/app/public/add_entry.php index 6938719..620002d 100644 --- a/app/public/add_entry.php +++ b/app/public/add_entry.php @@ -17,15 +17,10 @@ header("Location: statistik.php"); die; } + + echo file_get_contents("html/header.html"); ?> - - - - - - Eintrag eintragen -
>
@@ -52,4 +47,7 @@
- \ No newline at end of file + \ No newline at end of file diff --git a/app/public/add_station.php b/app/public/add_station.php new file mode 100644 index 0000000..a1e818c --- /dev/null +++ b/app/public/add_station.php @@ -0,0 +1,32 @@ + + + +
+

Station hinzufügen

+
+
+
+ +
+ +
+ +
+
+ + \ No newline at end of file diff --git a/app/public/stationen.php b/app/public/stationen.php index 8145a1b..9e4804d 100644 --- a/app/public/stationen.php +++ b/app/public/stationen.php @@ -9,6 +9,14 @@ ?> +
+

Stationen

+
+
+
+ +
+
diff --git a/app/public/statistik.php b/app/public/statistik.php index d0d641a..675a264 100644 --- a/app/public/statistik.php +++ b/app/public/statistik.php @@ -9,19 +9,29 @@ $_SESSION['select-statistics'] = $_GET['stationen']; } + if(!isset($_SESSION['select-statistics']) || $_SESSION['select-statistics'] == "total-score") { + $session = "total-score"; + } else { + $session = $_SESSION['select-statistics']; + } + echo file_get_contents("html/header.html"); ?> +
+ Gesamtpunkte" . get_station_name($con, $session)['name'] . "\n"; + } + ?> +
@@ -36,15 +46,6 @@ ?>
-
- Gesamtpunkte" . get_station_name($con, $session)['name'] . "\n"; - } - ?> -
prepare("INSERT INTO Station (name, standort) VALUES (?, ?)"); + $stmt->bindParam(1, $station_name, PDO::PARAM_STR); + $stmt->bindParam(2, $station_pos, PDO::PARAM_STR); + $stmt->execute(); + } catch(PDOException $e) { + handle_pdo_exceptio($e); + } } \ No newline at end of file