add entries to statistics
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
include("../scripts/functions.php");
|
||||
$user_data = check_login($con);
|
||||
|
||||
if(isset($_POST['stationen'])) {
|
||||
$_SESSION['select-statistics'] = $_POST['stationen'];
|
||||
if(isset($_GET['stationen'])) {
|
||||
$_SESSION['select-statistics'] = $_GET['stationen'];
|
||||
}
|
||||
|
||||
echo file_get_contents("html/header.html");
|
||||
@@ -14,20 +14,27 @@
|
||||
|
||||
<body>
|
||||
<div>
|
||||
<form name="switch-statistics" method="post">
|
||||
<label for="station">Welche Station soll angezeigt werden?</label>
|
||||
<form name="switch-statistics" method="get">
|
||||
<select name="stationen" id="station" onchange="this.form.submit()">
|
||||
<?php
|
||||
if(!isset($_SESSION['select-statistics']) || $_SESSION['select-statistics'] == "total-score") {
|
||||
$session = "total-score";
|
||||
} else {
|
||||
$session = $_SESSION['select-statistics'];
|
||||
echo $session;
|
||||
}
|
||||
load_options_stations($con, $session);
|
||||
?>
|
||||
</select>
|
||||
</form>
|
||||
<?php
|
||||
if($session != "total-score" && get_teams_no_points($con, $session)->rowCount() > 0) {
|
||||
echo "<form action=\"add_entry.php\" method=\"get\">
|
||||
<input type=\"hidden\" name=\"station\" value=\"$session\"/>
|
||||
<input type=\"submit\" value=\"Ergebniss eintragen\"/>
|
||||
</form>";
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<div class="headline">
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user