From 41556be35cba41643d18f27c4c9ba264dde6a186 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 12 Apr 2022 11:47:01 +0200 Subject: Commit --- search/lastname/data.json/index.php | 76 +++++++++---------- search/lastname/index.php | 144 ++++++++++++++++++------------------ search/lastname/results/index.php | 70 +++++++++--------- 3 files changed, 145 insertions(+), 145 deletions(-) (limited to 'search/lastname') diff --git a/search/lastname/data.json/index.php b/search/lastname/data.json/index.php index 861b791..a6c0daa 100644 --- a/search/lastname/data.json/index.php +++ b/search/lastname/data.json/index.php @@ -1,39 +1,39 @@ - $person) { - $name = ucfirst(strtolower($person["famname"])); - - 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["famname"])); + + 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/lastname/index.php b/search/lastname/index.php index 1b932f0..5e3717d 100644 --- a/search/lastname/index.php +++ b/search/lastname/index.php @@ -1,73 +1,73 @@ - -
-

Rechercher par nom

-

Patientez...

- - - - -
-
-
+ +
+

Rechercher par nom

+

Patientez...

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