diff options
author | Minteck <contact@minteck.org> | 2022-04-12 13:47:55 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-04-12 13:47:55 +0200 |
commit | 6c877fecb5374905d3f49663c68c20416a847e0e (patch) | |
tree | 7dbe6e17282136a958890756926d53640a5739dd /app/genealogy/search/dept/results/index.php | |
parent | 9ce80dea90a6159496f1fe2448f8ecf0e1633e7c (diff) | |
download | core-6c877fecb5374905d3f49663c68c20416a847e0e.tar.gz core-6c877fecb5374905d3f49663c68c20416a847e0e.tar.bz2 core-6c877fecb5374905d3f49663c68c20416a847e0e.zip |
Commit
Diffstat (limited to 'app/genealogy/search/dept/results/index.php')
-rw-r--r-- | app/genealogy/search/dept/results/index.php | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/app/genealogy/search/dept/results/index.php b/app/genealogy/search/dept/results/index.php deleted file mode 100644 index 3e09605..0000000 --- a/app/genealogy/search/dept/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["birth"]["place"]) && isset($person["birth"]["place"]["dept"])) {
- if ($person["birth"]["place"]["dept"] === $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 |