show statistics of the stations is now possible
This commit is contained in:
@@ -55,12 +55,57 @@ function load_teams_table($con) {
|
||||
}
|
||||
|
||||
function load_total_score($con) {
|
||||
echo "<thead> \n
|
||||
<th scope=\"col\">Mannschaft</th>\n
|
||||
<th scope=\"col\">Feuerwehr</th>\n
|
||||
<th scope=\"col\">Gesamtpunkte</th>\n
|
||||
</thead>\n
|
||||
<tbody>\n";
|
||||
$stmt = get_total_score($con);
|
||||
foreach($stmt->fetchAll() as $row) {
|
||||
echo "<tr>";
|
||||
echo "<td>" . $row['Mannschaftsname'] . "</td>";
|
||||
echo "<td>" . $row['Feuerwehr'] . "</td>";
|
||||
echo "<td>" . $row['Gesamtpunkte'] . "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>\n";
|
||||
echo "<td>" . $row['Mannschaftsname'] . "</td>\n";
|
||||
echo "<td>" . $row['Feuerwehr'] . "</td>\n";
|
||||
echo "<td>" . $row['Gesamtpunkte'] . "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
echo "</tbody>\n";
|
||||
}
|
||||
|
||||
function load_options_stations($con, $session) {
|
||||
$stmt = get_stations_all($con);
|
||||
if ($session == "total-score"){
|
||||
$total_score_selected = " selected";
|
||||
} else {
|
||||
$total_score_selected = "";
|
||||
}
|
||||
echo "<option value=\"total-score\"" . $total_score_selected . ">Gesamtpunkte</option>";
|
||||
foreach($stmt->fetchAll() as $option) {
|
||||
if($session == $option['s_id']){
|
||||
$station_selected = " selected";
|
||||
} else {
|
||||
$station_selected = "";
|
||||
}
|
||||
echo "<option value=\"" . $option['s_id'] . "\"" . $station_selected . ">" . $option['name'] . "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
function load_station_table($con, $s_id) {
|
||||
echo "<thead> \n
|
||||
<th scope=\"col\">Mannschaft</th>
|
||||
<th scope=\"col\">Feuerwehr</th>
|
||||
<th scope=\"col\">Punkte</th>
|
||||
<th scope=\"col\">Zeit</th>
|
||||
</thead>
|
||||
<tbody>\n";
|
||||
$stmt = get_station($con, $s_id);
|
||||
foreach($stmt->fetchAll() as $row) {
|
||||
echo "<tr>\n";
|
||||
echo "<td>" . $row['Name'] . "</td>\n";
|
||||
echo "<td>" . $row['Feuerwehr'] . "</td>\n";
|
||||
echo "<td>" . $row['Punkte'] . "</td>\n";
|
||||
echo "<td>" . $row["Zeit"] . "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
echo "</tbody>\n";
|
||||
}
|
||||
Reference in New Issue
Block a user