31 lines
667 B
PHP
31 lines
667 B
PHP
<?php
|
|
global $c;
|
|
|
|
$strPath = "/";
|
|
$strPath .= implode("/", Request::getPathParts());
|
|
|
|
$varPosts = $c->query(
|
|
"SELECT *
|
|
from posts as p
|
|
where
|
|
location like ?
|
|
or location like '*'
|
|
order by
|
|
created desc",
|
|
$strPath);
|
|
?>
|
|
|
|
<?php if (Request::getParam("edit")): ?>
|
|
<div class="container my-5">
|
|
<div class="row">
|
|
<div class="col-lg-8">
|
|
<a class="link-underline link-underline-opacity-0" href="/post?to=<?= $strPath; ?>">Write a post here</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php
|
|
PostRender::rows($varPosts);
|
|
?>
|