aboutsummaryrefslogtreecommitdiff
path: root/tree/index.php
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-04-12 11:47:01 +0200
committerMinteck <contact@minteck.org>2022-04-12 11:47:01 +0200
commit41556be35cba41643d18f27c4c9ba264dde6a186 (patch)
tree57db148e2e83408e6bc105015f000240e1e4638f /tree/index.php
parent696f2b8888aaa2a1c0f8edba13dcf2238d7c83f4 (diff)
downloadgenealogy-41556be35cba41643d18f27c4c9ba264dde6a186.tar.gz
genealogy-41556be35cba41643d18f27c4c9ba264dde6a186.tar.bz2
genealogy-41556be35cba41643d18f27c4c9ba264dde6a186.zip
CommitHEADtrunk
Diffstat (limited to 'tree/index.php')
-rw-r--r--tree/index.php96
1 files changed, 48 insertions, 48 deletions
diff --git a/tree/index.php b/tree/index.php
index 837c6f1..76e1ca1 100644
--- a/tree/index.php
+++ b/tree/index.php
@@ -1,49 +1,49 @@
-<?php
-
-setlocale(LC_ALL, 'fr_FR.UTF-8');
-$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/private/data/people.json"), true);
-
-function getplace($place) {
- $info = false;
-
- if (isset($place["city"])) {
- $info = true;
- echo("<a href='/search/city/?q=" . $place["city"] . "'>" . $place["city"] . "</a><br>");
- }
-
- if (isset($place["dept"])) {
- $info = true;
- echo("<a href='/search/dept/?q=" . $place["dept"] . "'>" . $place["dept"] . "</a><br>");
- }
-
- if (isset($place["country"])) {
- $info = true;
- echo($place["country"] . "<br>");
- }
-
- if (!$info) {
- echo("Non renseigné");
- }
-}
-
-if (isset($_GET['_']) && trim($_GET['_']) !== "" && isset($data[$_GET['_']])) {
- $id = $_GET['_'];
- $person = $data[$_GET['_']];
-} else {
- header("Location: /");
- die();
-}
-
-$_TITLE = "Arbre généalogique | " . $person["famname"] . " " . $person["surname"] . " (#" . $id . ")"; require_once $_SERVER['DOCUMENT_ROOT'] . "/private/header.php"; ?>
-<div class="container">
- <h1>
- <?= $person["famname"] . " " . $person["surname"] . " <span class='text-muted'>#" . $id . "</span>" ?>
- <a style="float:right;position: relative;top: 7px;" href="/person/?_=<?= $id ?>" class="btn btn-outline-primary">Voir les détails</a>
- </h1>
- <br>
- <br>
-
- <iframe src="/tree/mktree.php?_=<?= $id ?>" style="border:none;width:100%;height:50vh;border-radius:5px;"></iframe>
-</div>
-<br>
+<?php
+
+setlocale(LC_ALL, 'fr_FR.UTF-8');
+$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/private/data/people.json"), true);
+
+function getplace($place) {
+ $info = false;
+
+ if (isset($place["city"])) {
+ $info = true;
+ echo("<a href='/search/city/?q=" . $place["city"] . "'>" . $place["city"] . "</a><br>");
+ }
+
+ if (isset($place["dept"])) {
+ $info = true;
+ echo("<a href='/search/dept/?q=" . $place["dept"] . "'>" . $place["dept"] . "</a><br>");
+ }
+
+ if (isset($place["country"])) {
+ $info = true;
+ echo($place["country"] . "<br>");
+ }
+
+ if (!$info) {
+ echo("Non renseigné");
+ }
+}
+
+if (isset($_GET['_']) && trim($_GET['_']) !== "" && isset($data[$_GET['_']])) {
+ $id = $_GET['_'];
+ $person = $data[$_GET['_']];
+} else {
+ header("Location: /");
+ die();
+}
+
+$_TITLE = "Arbre généalogique | " . $person["famname"] . " " . $person["surname"] . " (#" . $id . ")"; require_once $_SERVER['DOCUMENT_ROOT'] . "/private/header.php"; ?>
+<div class="container">
+ <h1>
+ <?= $person["famname"] . " " . $person["surname"] . " <span class='text-muted'>#" . $id . "</span>" ?>
+ <a style="float:right;position: relative;top: 7px;" href="/person/?_=<?= $id ?>" class="btn btn-outline-primary">Voir les détails</a>
+ </h1>
+ <br>
+ <br>
+
+ <iframe src="/tree/mktree.php?_=<?= $id ?>" style="border:none;width:100%;height:50vh;border-radius:5px;"></iframe>
+</div>
+<br>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/private/footer.php"; ?> \ No newline at end of file