aboutsummaryrefslogtreecommitdiff
path: root/app/genealogy/search/death/results/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/genealogy/search/death/results/index.php')
-rw-r--r--app/genealogy/search/death/results/index.php38
1 files changed, 0 insertions, 38 deletions
diff --git a/app/genealogy/search/death/results/index.php b/app/genealogy/search/death/results/index.php
deleted file mode 100644
index b3210d8..0000000
--- a/app/genealogy/search/death/results/index.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-require_once $_SERVER['DOCUMENT_ROOT'] . "/../session.php";
-
-/** @var string $_FULLNAME
- * @var string $_USER
- * @var array $_PROFILE
- * @var array $_CONFIG
- */
-
-$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/private/data/people.json"), true);
-
-if (isset($_GET['q']) && trim($_GET['q']) !== "") {
- $q = $_GET['q'];
-} else {
- die();
-}
-
-$results = [];
-
-foreach ($data as $id => $person) {
- if (isset($person["death"]["date"]) && isset($person["death"]["date"]["year"])) {
- if ((string)$person["death"]["date"]["year"] === $q) {
- $results[] = $id;
- }
- }
-}
-if (count($results) === 0): ?>
-<ul class="list-group">
- <li class="list-group-item">Aucun résultat correspondant</li>
-</ul>
-<?php else: ?>
-<div class="list-group">
- <?php foreach ($results as $result): $p = $data[$result]; ?>
- <a href="/person/?_=<?= $result ?>" class="list-group-item list-group-item-action"><?= $p["famname"] ?> <?= $p["surname"] ?> <span class="text-muted">#<?= $result ?></span></a>
- <?php endforeach; ?>
-</div>
-<?php endif; ?> \ No newline at end of file