summaryrefslogtreecommitdiff
path: root/includes/components/footer.inc
blob: 2cef58f1d1f2d1233d84c528e1d4d261ad5ad672 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php

global $pageFile;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc";

?>

<div id="footer-pre"></div>
<div id="footer">
    <hr>
    <div class="container text-muted">
        <?php

        $refresh = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/refresh.json"), true);
        $version = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/version.json"), true);

        global $lang; global $pages;

        ?>
        © <?= date("Y") ?> <a href="https://equestria.horse" target="_blank" class="text-muted"><?= $lang["footer"]["copyright"] ?></a> · build <?= $version["build"] ?>.<?= $version["revision"] ?><br>
        <a class="debug-outer text-muted" style="text-decoration: none;"><?= $lang["footer"]["update"] ?> <?= trim(timeAgo($refresh["timestamp"], $lang["_french"])) ?><span class="debug-hidden">&nbsp;(<?php if (time() - $refresh["timestamp"] > 360): ?><?= $lang["footer"]["no_update"] ?><?= $lang["footer"]["separator"] ?>; <?php endif; ?><?= date('D j M, G:i:s T', (int)$refresh["timestamp"]) ?><?= $lang["footer"]["separator"] ?>; <?= $lang["footer"]["took"] ?> <?= round($refresh["duration"]) ?> sec)</span></a>
        <br><br><br><br><br>
    </div>
</div>

<script>
    let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
    let tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
        return new bootstrap.Tooltip(tooltipTriggerEl)
    });

    Array.from(document.querySelectorAll('[data-bs-toggle="tooltip"]')).forEach((item) => {
        if (!item.classList.contains("tooltip-nohelp")) {
            item.style.cursor = "help";
        }
    })
</script>

<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/search.inc"; ?>

</body>
</html>