diff --git a/app/public/delete_station.php b/app/public/delete_station.php
index cb32d4f..eeb34ff 100644
--- a/app/public/delete_station.php
+++ b/app/public/delete_station.php
@@ -2,7 +2,7 @@
session_start();
include("../scripts/connection.php");
include("../scripts/functions.php");
- $user_data = check_login($con);
+ $user_data = check_admin($con);
if($_SERVER['REQUEST_METHOD'] == "POST") {
try {
diff --git a/app/public/delete_team.php b/app/public/delete_team.php
index c4aac9d..b934d26 100644
--- a/app/public/delete_team.php
+++ b/app/public/delete_team.php
@@ -2,7 +2,7 @@
session_start();
include("../scripts/connection.php");
include("../scripts/functions.php");
- $user_data = check_login($con);
+ $user_data = check_admin($con);
if($_SERVER['REQUEST_METHOD'] == "POST") {
try {
diff --git a/app/public/edit_station.php b/app/public/edit_station.php
index 6a2805c..4b59890 100644
--- a/app/public/edit_station.php
+++ b/app/public/edit_station.php
@@ -2,7 +2,7 @@
session_start();
include("../scripts/connection.php");
include("../scripts/functions.php");
- $user_data = check_login($con);
+ $user_data = check_admin($con);
if($_SERVER['REQUEST_METHOD'] == "GET") {
$row = get_station_all($con, $_GET['s_id'])->fetch();
diff --git a/app/public/edit_team.php b/app/public/edit_team.php
index ee131a7..ce1fe80 100644
--- a/app/public/edit_team.php
+++ b/app/public/edit_team.php
@@ -2,7 +2,7 @@
session_start();
include("../scripts/connection.php");
include("../scripts/functions.php");
- $user_data = check_login($con);
+ $user_data = check_admin($con);
if($_SERVER['REQUEST_METHOD'] == "GET") {
$row = get_team($con, $_GET['m_id'])->fetch();
diff --git a/app/public/header_footer/header.php b/app/public/header_footer/header.php
index 0b25e36..fd48af2 100644
--- a/app/public/header_footer/header.php
+++ b/app/public/header_footer/header.php
@@ -17,16 +17,16 @@
\ No newline at end of file
diff --git a/app/public/index.php b/app/public/index.php
index 3310ce7..fdfc59c 100644
--- a/app/public/index.php
+++ b/app/public/index.php
@@ -9,10 +9,18 @@
?>
-Punktesystem Kreispokalwettbewerb Altdorf
- test
+ Punktesystem Kreispokalwettbewerb Altdorf
+
+
Gesamtergebniss
+
+
+
\ No newline at end of file
diff --git a/app/public/mannschaft.php b/app/public/mannschaft.php
index 2f3f8ab..dee8188 100644
--- a/app/public/mannschaft.php
+++ b/app/public/mannschaft.php
@@ -3,7 +3,7 @@
include("../scripts/connection.php");
include("../scripts/functions.php");
- $user_data = check_login($con);
+ $user_data = check_admin($con);
include("header_footer/header.php");
?>
diff --git a/app/public/stationen.php b/app/public/stationen.php
index 9a002d0..14a6514 100644
--- a/app/public/stationen.php
+++ b/app/public/stationen.php
@@ -3,7 +3,7 @@
include("../scripts/connection.php");
include("../scripts/functions.php");
- $user_data = check_login($con);
+ $user_data = check_admin($con);
include("header_footer/header.php");
?>
diff --git a/app/public/statistik.php b/app/public/statistik.php
index f212457..43710a7 100644
--- a/app/public/statistik.php
+++ b/app/public/statistik.php
@@ -9,8 +9,10 @@
$_SESSION['select-statistics'] = $_GET['stationen'];
}
- if(!isset($_SESSION['select-statistics']) || $_SESSION['select-statistics'] == "total-score") {
+ if((!isset($_SESSION['select-statistics']) || $_SESSION['select-statistics'] == "total-score") && $user_data['user_group'] != 'station') {
$session = "total-score";
+ } else if ($user_data['user_group'] == 'station') {
+ $session = $user_data['s_id'];
} else {
$session = $_SESSION['select-statistics'];
}
@@ -22,21 +24,21 @@
GesamtpunkteGesamtpunkte\n";
} else {
echo "
" . get_station_name($con, $session)['name'] . "
\n";
}
?>
-
+
+ ";
+ }
if($session != "total-score" && get_teams_no_points($con, $session)->rowCount() > 0) {
echo "
\n";
}
+ if ($session != "total-score") {
+ //add edit button
+ echo "
+
+
";
+ //add delete button
+ echo "
+
+
";
+ }
?>
-
-
- ";
- //add delete button
- echo "
-
-
";
- } ?>