diff --git a/get_table.php b/get_table.php index 7c48590..5509b34 100644 --- a/get_table.php +++ b/get_table.php @@ -8,9 +8,11 @@ class Runner { public int $id; public string $name; + public string $club; + public string $course; public array $splits; - function __construct($id, $name) + function __construct($id, $name, $club, $course) { //echo($id); //echo($name); @@ -20,6 +22,8 @@ class Runner } $this->id = $id; $this->name = $name; + $this->club = $club; + $this->course = $course; for ($i = 0; $i < $GLOBALS['number_of_controls']; $i++) { $this->splits[$i] = false; } @@ -83,7 +87,7 @@ $csv_runners = str_getcsv($csv_runners, "\n"); //print_r($csv_runners); for ($i = 1; $i < count($csv_runners); $i++) { $line = str_getcsv($csv_runners[$i]); - array_push($runners, new Runner($line[0], $line[1])); + array_push($runners, new Runner($line[0], $line[1], $line[2], $line[3])); } @@ -107,9 +111,10 @@ for ($i = 0; $i < count($timings); $i++) { $runner->set_split($line[0]-1, $time); } -usort($runners, "cmp"); -$query = explode(",",$_SERVER['QUERY_STRING']); +if (!isset($query)){ + $query = explode(",",$_SERVER['QUERY_STRING']); +} if ($query[0] == "registrering"){ $matpost = $query[1]; @@ -153,7 +158,19 @@ if ($query[0] == "registrering"){ echo ("". $i+1 .".$runner->id$runner->name$tid_1_mat$tid_2_mat$tid_maal$button\n"); } } +elseif ($query[0] == "paameldte") { + echo(" + Navn + Klubb/Forening + Variant + "); + for ($i = 0; $i < count($runners); $i++) { + $runner = $runners[$i]; + echo ("$runner->name$runner->club$runner->course\n"); + } +} else { + usort($runners, "cmp"); echo(" # Startnummer diff --git a/paameldte.php b/paameldte.php new file mode 100644 index 0000000..77bc212 --- /dev/null +++ b/paameldte.php @@ -0,0 +1,36 @@ + + + + + Påmeldte kadaverløpet + + + + + + +
+
+

Påmeldte kadaverløpet 2024

+
+

Oppdatert 11.10.24

+ + + + +
+

Laget av Trygve. Kildekode

+
+ + +