From 3781581ec4dc3db4601e9067dfe9b9d9bc039c62 Mon Sep 17 00:00:00 2001 From: Grisu Date: Sat, 18 Jun 2022 12:58:20 +0200 Subject: [PATCH] user group statistics can now only read statistics --- app/public/header_footer/header.php | 6 +++++- app/public/statistik.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/public/header_footer/header.php b/app/public/header_footer/header.php index fd48af2..b232124 100644 --- a/app/public/header_footer/header.php +++ b/app/public/header_footer/header.php @@ -24,9 +24,13 @@ echo "Mannschaftsverwaltung\n"; echo "Stationen\n"; } + if ($_SESSION['user_group'] == 'statistics') { + echo "Ergebnisse"; + } else { + echo "Ergebnisse eintragen"; + } } ?> - Ergebnisse eintragen \ No newline at end of file diff --git a/app/public/statistik.php b/app/public/statistik.php index 43710a7..ca1bcb8 100644 --- a/app/public/statistik.php +++ b/app/public/statistik.php @@ -39,14 +39,14 @@ echo " "; } - if($session != "total-score" && get_teams_no_points($con, $session)->rowCount() > 0) { + if($session != "total-score" && get_teams_no_points($con, $session)->rowCount() > 0 && $user_data['user_group'] != 'statistics') { echo "
\n"; } - if ($session != "total-score") { + if ($session != "total-score" && $user_data['user_group'] != 'statistics') { //add edit button echo "