diff --git a/table.php b/table.php index 1907d08..dd5d100 100644 --- a/table.php +++ b/table.php @@ -24,9 +24,11 @@ class Runner public string $name; public string $club; public string $course; + public string $email; + public string $phone; public array $splits; - function __construct($id, $name, $club, $course) + function __construct($id, $name, $club, $course, $email, $phone) { if ($id == null) { $id = 0; @@ -36,6 +38,8 @@ class Runner $this->name = $name; $this->club = $club; $this->course = $course; + $this->email = $email; + $this->phone = $phone; for ($i = 0; $i < $GLOBALS['number_of_controls']; $i++) { $this->splits[$i] = false; } @@ -113,7 +117,7 @@ $csv_runners = file_get_contents("data/db.csv"); $csv_runners = str_getcsv($csv_runners, "\n"); for ($i = 1; $i < count($csv_runners); $i++) { $line = str_getcsv($csv_runners[$i], ";"); - array_push($runners, new Runner($line[0], $line[2], $line[5], $line[6])); + array_push($runners, new Runner($line[0], $line[2], $line[5], $line[6], $line[3], $line[4])); } @@ -231,6 +235,7 @@ function liveresult_table($runners) {