website

Code for the bare sturcture of concealed.world.
git clone git://git.concealed.world/website
Log | Files | Refs | README | LICENSE

commit 5b98ec5be23c40504aa6ba75bd4373a6f8c22642
parent b98926fee9d85af1d82aef9866dc48aefd85d52c
Author: Nixx <nixx@firemail.cc>
Date:   Sat, 26 Sep 2020 14:57:33 +0100

Fixing a date bug on '/Other/' pages

Diffstat:
Mincludes/article-end.php | 8+++++++-
Mincludes/section-end.php | 2+-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/includes/article-end.php b/includes/article-end.php @@ -1,5 +1,11 @@ <?php - echo '<b>'.date('M d Y H:i', filemtime(getcwd().'/'.$_GET['post'])).'</b>'; + $workdir=getcwd(); + if (strpos($workdir, '/Other') !== false) { + $curfile=explode('/', $_SERVER['REQUEST_URI'])[2]; + echo '<b>'.date('Y M d H:i', filemtime($workdir.'/'.$curfile)).'</b>'; + } else { + echo '<b>'.date('Y M d H:i', filemtime($workdir.'/'.$_GET['post'])).'</b>'; + } echo '</div>'; require $root."includes/end.php"; ?> diff --git a/includes/section-end.php b/includes/section-end.php @@ -1,6 +1,6 @@ <?php echo '<span class="seemore">'; - echo '<span class="seedate">'.date('M d Y H:i', $includearr[$inc][1]).'</span>'; + echo '<span class="seedate">'.date('Y M d H:i', $includearr[$inc][1]).'</span>'; echo '<a class="seemorelink" href="'.$seemorepath.'">See Full Article...</a>'; echo '</span>'; echo '</div>';