aboutsummaryrefslogtreecommitdiff
path: root/blog/_article.php
diff options
context:
space:
mode:
authorMinteck <46352972+Minteck@users.noreply.github.com>2021-08-01 22:28:15 +0200
committerMinteck <46352972+Minteck@users.noreply.github.com>2021-08-01 22:28:15 +0200
commit9852b6cd074cceec0d0b549bb6c9bd7fe50c86f2 (patch)
tree22d9b851864f9370282f21d10113afd5d565e4cf /blog/_article.php
parentb028da9fea70c65ccd52d1d478859739027d756a (diff)
downloadmain-9852b6cd074cceec0d0b549bb6c9bd7fe50c86f2.tar.gz
main-9852b6cd074cceec0d0b549bb6c9bd7fe50c86f2.tar.bz2
main-9852b6cd074cceec0d0b549bb6c9bd7fe50c86f2.zip
Update
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>