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

Rechercher par prénom

-

Patientez...

- - - - -
-
-
+ +
+

Rechercher par prénom

+

Patientez...

+ + + + +
+
+
\ No newline at end of file diff --git a/search/name/results/index.php b/search/name/results/index.php index 3850287..b316ac0 100644 --- a/search/name/results/index.php +++ b/search/name/results/index.php @@ -1,36 +1,36 @@ - $person) { - if (ucfirst(strtolower($person["surname"])) === ucfirst(strtolower($q))) { - $results[] = $id; - } -} -if (count($results) === 0): ?> - - -
- - # - -
+ $person) { + if (ucfirst(strtolower($person["surname"])) === ucfirst(strtolower($q))) { + $results[] = $id; + } +} +if (count($results) === 0): ?> + + +
+ + # + +
\ No newline at end of file -- cgit