aboutsummaryrefslogtreecommitdiff
path: root/blog/_article.php
diff options
context:
space:
mode:
Diffstat (limited to 'blog/_article.php')
-rw-r--r--blog/_article.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/blog/_article.php b/blog/_article.php
index 1d25467..819d7b1 100644
--- a/blog/_article.php
+++ b/blog/_article.php
@@ -15,18 +15,18 @@ if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i']
$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i'] . ".json"), true);
$article = $_GET['i'];
-$_TITLE = $data["title"];
+$_TITLE = l($data["title"], $data["title.fr"] ?? $data["title"]);
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php";
?>
<div style="margin-top: 56px;z-index: 5;background: #fff;padding-top: 20px;min-height: calc(100vh - 57px);" id="main-box">
<div class="container">
- <h2><?= $data["title"] ?></h2>
- <h6 class="text-muted"><?= l("Published", "PubliƩ") ?> <?= DateTime::createFromFormat('Y-m-d', explode("@", $article)[0])->format("F jS, Y"); ?></h6>
+ <h2><?= l($data["title"], $data["title.fr"] ?? $data["title"]) ?></h2>
+ <h6 class="text-muted"><?= l("Published", "PubliƩ") ?> <?= strftime(l("%a %b %e, %Y", "%a %e %b %Y"), (int)DateTime::createFromFormat('Y-m-d', explode("@", $article)[0])->format("U")); ?></h6>
<hr>
<div>
- <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i'] . ".json.html") ?>
+ <?= l(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i'] . ".json.html"), file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i'] . ".json.fr.html") ? file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i'] . ".json.fr.html") : file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i'] . ".json.html")) ?>
</div>
<hr>