user group statistics can now only read statistics

This commit is contained in:
2022-06-18 12:58:20 +02:00
parent 144c56b33c
commit 3781581ec4
2 changed files with 7 additions and 3 deletions

View File

@@ -24,9 +24,13 @@
echo "<a href=\"mannschaft.php\">Mannschaftsverwaltung</a>\n"; echo "<a href=\"mannschaft.php\">Mannschaftsverwaltung</a>\n";
echo "<a href=\"stationen.php\">Stationen</a>\n"; echo "<a href=\"stationen.php\">Stationen</a>\n";
} }
if ($_SESSION['user_group'] == 'statistics') {
echo "<a href=\"statistik.php\">Ergebnisse</a>";
} else {
echo "<a href=\"statistik.php\">Ergebnisse eintragen</a>";
}
} }
?> ?>
<a href="statistik.php">Ergebnisse eintragen</a>
</nav> </nav>
</section> </section>
</header> </header>

View File

@@ -39,14 +39,14 @@
echo "</select> echo "</select>
</form>"; </form>";
} }
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 "<form action=\"add_entry.php\" method=\"get\"> echo "<form action=\"add_entry.php\" method=\"get\">
<input type=\"hidden\" name=\"station\" value=\"$session\"/> <input type=\"hidden\" name=\"station\" value=\"$session\"/>
<input type=\"submit\" value=\"Ergebniss eintragen\"/> <input type=\"submit\" value=\"Ergebniss eintragen\"/>
</form>\n"; </form>\n";
} }
if ($session != "total-score") { if ($session != "total-score" && $user_data['user_group'] != 'statistics') {
//add edit button //add edit button
echo "<div> echo "<div>
<form action=\"edit_statistics.php\" method=\"get\"> <form action=\"edit_statistics.php\" method=\"get\">