From 41556be35cba41643d18f27c4c9ba264dde6a186 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 12 Apr 2022 11:47:01 +0200 Subject: Commit --- search/state/data.json/index.php | 76 ++++++++++----------- search/state/index.php | 144 +++++++++++++++++++-------------------- search/state/results/index.php | 74 ++++++++++---------- 3 files changed, 147 insertions(+), 147 deletions(-) (limited to 'search/state') diff --git a/search/state/data.json/index.php b/search/state/data.json/index.php index 6445118..e0bad67 100644 --- a/search/state/data.json/index.php +++ b/search/state/data.json/index.php @@ -1,39 +1,39 @@ - $person) { - if (isset($person["birth"]["place"]) && isset($person["birth"]["place"]["state"])) { - if (isset($counts[$person["birth"]["place"]["state"]])) { - $counts[$person["birth"]["place"]["state"]]++; - } else { - $counts[$person["birth"]["place"]["state"]] = 1; - } - if (!in_array($person["birth"]["place"]["state"], $names)) { - $names[] = $person["birth"]["place"]["state"]; - } - } -} - -foreach ($names as $name) { - $arr[] = [ - 'name' => $name, - 'occurrences' => $counts[$name] . " personne" . ($counts[$name] > 1 ? "s" : "") - ]; -} - + $person) { + if (isset($person["birth"]["place"]) && isset($person["birth"]["place"]["state"])) { + if (isset($counts[$person["birth"]["place"]["state"]])) { + $counts[$person["birth"]["place"]["state"]]++; + } else { + $counts[$person["birth"]["place"]["state"]] = 1; + } + if (!in_array($person["birth"]["place"]["state"], $names)) { + $names[] = $person["birth"]["place"]["state"]; + } + } +} + +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/state/index.php b/search/state/index.php index da20419..1976ac9 100644 --- a/search/state/index.php +++ b/search/state/index.php @@ -1,73 +1,73 @@ - -
-

Rechercher par région de naissance

-

Patientez...

- - - - -
-
-
+ +
+

Rechercher par région de naissance

+

Patientez...

+ + + + +
+
+
\ No newline at end of file diff --git a/search/state/results/index.php b/search/state/results/index.php index 6251ebf..98e4c54 100644 --- a/search/state/results/index.php +++ b/search/state/results/index.php @@ -1,38 +1,38 @@ - $person) { - if (isset($person["birth"]["place"]) && isset($person["birth"]["place"]["state"])) { - if ($person["birth"]["place"]["state"] === $q) { - $results[] = $id; - } - } -} -if (count($results) === 0): ?> - - -
- - # - -
+ $person) { + if (isset($person["birth"]["place"]) && isset($person["birth"]["place"]["state"])) { + if ($person["birth"]["place"]["state"] === $q) { + $results[] = $id; + } + } +} +if (count($results) === 0): ?> + + +
+ + # + +
\ No newline at end of file -- cgit