From 41556be35cba41643d18f27c4c9ba264dde6a186 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 12 Apr 2022 11:47:01 +0200 Subject: Commit --- search/death/data.json/index.php | 76 ++++++++++----------- search/death/index.php | 144 +++++++++++++++++++-------------------- search/death/results/index.php | 74 ++++++++++---------- 3 files changed, 147 insertions(+), 147 deletions(-) (limited to 'search/death') diff --git a/search/death/data.json/index.php b/search/death/data.json/index.php index 8cc8708..f1db1ae 100644 --- a/search/death/data.json/index.php +++ b/search/death/data.json/index.php @@ -1,39 +1,39 @@ - $person) { - if (isset($person["death"]["date"]) && isset($person["death"]["date"]["year"])) { - if (isset($counts[(string)$person["death"]["date"]["year"]])) { - $counts[(string)$person["death"]["date"]["year"]]++; - } else { - $counts[(string)$person["death"]["date"]["year"]] = 1; - } - if (!in_array((string)$person["death"]["date"]["year"], $names)) { - $names[] = (string)$person["death"]["date"]["year"]; - } - } -} - -foreach ($names as $name) { - $arr[] = [ - 'name' => $name, - 'occurrences' => $counts[$name] . " personne" . ($counts[$name] > 1 ? "s" : "") - ]; -} - + $person) { + if (isset($person["death"]["date"]) && isset($person["death"]["date"]["year"])) { + if (isset($counts[(string)$person["death"]["date"]["year"]])) { + $counts[(string)$person["death"]["date"]["year"]]++; + } else { + $counts[(string)$person["death"]["date"]["year"]] = 1; + } + if (!in_array((string)$person["death"]["date"]["year"], $names)) { + $names[] = (string)$person["death"]["date"]["year"]; + } + } +} + +foreach ($names as $name) { + $arr[] = [ + 'name' => $name, + 'occurrences' => $counts[$name] . " personne" . ($counts[$name] > 1 ? "s" : "") + ]; +} + echo(json_encode($arr)); \ No newline at end of file diff --git a/search/death/index.php b/search/death/index.php index 73b7742..0cfdc74 100644 --- a/search/death/index.php +++ b/search/death/index.php @@ -1,73 +1,73 @@ - -
-

Rechercher par date de décès

-

Patientez...

- - - - -
-
-
+ +
+

Rechercher par date de décès

+

Patientez...

+ + + + +
+
+
\ No newline at end of file diff --git a/search/death/results/index.php b/search/death/results/index.php index 4b0201b..b3210d8 100644 --- a/search/death/results/index.php +++ b/search/death/results/index.php @@ -1,38 +1,38 @@ - $person) { - if (isset($person["death"]["date"]) && isset($person["death"]["date"]["year"])) { - if ((string)$person["death"]["date"]["year"] === $q) { - $results[] = $id; - } - } -} -if (count($results) === 0): ?> - - -
- - # - -
+ $person) { + if (isset($person["death"]["date"]) && isset($person["death"]["date"]["year"])) { + if ((string)$person["death"]["date"]["year"] === $q) { + $results[] = $id; + } + } +} +if (count($results) === 0): ?> + + +
+ + # + +
\ No newline at end of file -- cgit