Commit
This commit is contained in:
parent
f9eb4bbbd9
commit
f4d9562b48
@ -1,2 +1,3 @@
|
|||||||
<h1>Stafett for livet tellesystem</h1>
|
<h1>Stafett for livet tellesystem</h1>
|
||||||
<p>Elever på <a href="https://kvadraturen.vgs.no/">Kvadraturen Vidergående Skole</a> har som skoleprosjekt laget et system for telling av løpere for <a href="https://kreftforeningen.no/stafettforlivet/">Kreftforeningens Stafett for livet</a>.</p>
|
<p>Elever på <a href="https://kvadraturen.vgs.no/">Kvadraturen Vidergående Skole</a> har som skoleprosjekt laget et system for telling av løpere for <a href="https://kreftforeningen.no/stafettforlivet/">Kreftforeningens Stafett for livet</a>.</p>
|
||||||
|
<img src="static/img/3ELDEA.jpg" alt="Klassebilde">
|
@ -16,7 +16,7 @@ $time_mapper = new TimeMapper($app->database->conn);
|
|||||||
$prev_hash = filter_input(INPUT_GET, 'h');
|
$prev_hash = filter_input(INPUT_GET, 'h');
|
||||||
|
|
||||||
$teams = [];
|
$teams = [];
|
||||||
$name_map = [];
|
$team_map = [];
|
||||||
$times = [];
|
$times = [];
|
||||||
$time_ref = NULL;
|
$time_ref = NULL;
|
||||||
|
|
||||||
@ -28,9 +28,13 @@ foreach ($time_mapper->getAll() as $time)
|
|||||||
}
|
}
|
||||||
$team = $teams[$time->team_id];
|
$team = $teams[$time->team_id];
|
||||||
|
|
||||||
if (!isset($name_map[$team->id]))
|
if (!isset($team_map[$team->id]))
|
||||||
{
|
{
|
||||||
$name_map[$team->id] = htmlspecialchars($team->name);
|
$team_map[$team->id] = [
|
||||||
|
"name" => htmlspecialchars($team->name),
|
||||||
|
"company" => htmlspecialchars($team->company),
|
||||||
|
"rounds" => htmlspecialchars($team->rounds),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($time_ref === NULL)
|
if ($time_ref === NULL)
|
||||||
@ -48,9 +52,7 @@ foreach ($time_mapper->getAll() as $time)
|
|||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
"map" => [
|
"map" => [
|
||||||
"team" => [
|
"team" => $team_map,
|
||||||
"name" => $name_map,
|
|
||||||
],
|
|
||||||
"time_reference" => $time_ref
|
"time_reference" => $time_ref
|
||||||
],
|
],
|
||||||
"times" => $times
|
"times" => $times
|
||||||
|
BIN
public/static/img/3ELDEA.jpg
Normal file
BIN
public/static/img/3ELDEA.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 305 KiB |
@ -46,7 +46,9 @@ class ResultService
|
|||||||
tableHTML += "<tr>";
|
tableHTML += "<tr>";
|
||||||
tableHTML += "<th>#</th>";
|
tableHTML += "<th>#</th>";
|
||||||
tableHTML += "<th>Lag</th>";
|
tableHTML += "<th>Lag</th>";
|
||||||
|
tableHTML += "<th>Bedrift</th>";
|
||||||
tableHTML += "<th>Tid</th>";
|
tableHTML += "<th>Tid</th>";
|
||||||
|
tableHTML += "<th>Runder</th>";
|
||||||
tableHTML += "</tr>";
|
tableHTML += "</tr>";
|
||||||
|
|
||||||
let iterator = 0;
|
let iterator = 0;
|
||||||
@ -55,8 +57,10 @@ class ResultService
|
|||||||
|
|
||||||
tableHTML += "<tr>";
|
tableHTML += "<tr>";
|
||||||
tableHTML += "<td>" + iterator + "</td>";
|
tableHTML += "<td>" + iterator + "</td>";
|
||||||
tableHTML += "<td>" + data.map.team.name[element.id] + "</td>";
|
tableHTML += "<td>" + data.map.team[element.id].name + "</td>";
|
||||||
|
tableHTML += "<td>" + data.map.team[element.id].company + "</td>";
|
||||||
tableHTML += "<td>" + element.time + "</td>";
|
tableHTML += "<td>" + element.time + "</td>";
|
||||||
|
tableHTML += "<td>" + data.map.team[element.id].rounds+ "</td>";
|
||||||
tableHTML += "</tr>";
|
tableHTML += "</tr>";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user