mirror of
https://github.com/danpros/htmly.git
synced 2026-04-22 05:26:22 +05:30
Add page navigation for static pages
This commit is contained in:
parent
c53518422b
commit
4b70fab511
4 changed files with 299 additions and 49 deletions
|
|
@ -1,16 +1,16 @@
|
|||
<?php if (!defined('HTMLY')) die('HTMLy'); ?>
|
||||
<?php
|
||||
|
||||
foreach (glob('cache/page/*.cache', GLOB_NOSORT) as $file) {
|
||||
unlink($file);
|
||||
}
|
||||
|
||||
foreach (glob('cache/index/*.txt', GLOB_NOSORT) as $file) {
|
||||
unlink($file);
|
||||
}
|
||||
|
||||
rebuilt_cache('all');
|
||||
|
||||
foreach (glob('cache/page/*.cache', GLOB_NOSORT) as $file) {
|
||||
unlink($file);
|
||||
}
|
||||
|
||||
echo i18n('All_cache_has_been_deleted');
|
||||
|
||||
?>
|
||||
|
|
@ -8,7 +8,6 @@
|
|||
if (isset($_SESSION[config("site.url")]['user'])) {
|
||||
$posts = get_static_post(null);
|
||||
if (!empty($posts)) {
|
||||
krsort($posts);
|
||||
echo '<table class="table post-list">';
|
||||
echo '<tr class="head"><th>' . i18n('Title') . '</th>';
|
||||
if (config("views.counter") == "true")
|
||||
|
|
@ -33,8 +32,7 @@ if (isset($_SESSION[config("site.url")]['user'])) {
|
|||
echo '<td><a class="btn btn-primary btn-xs" href="' . $p->url . '/add?destination=admin/pages">' . i18n('Add_sub') . '</a> <a class="btn btn-primary btn-xs" href="' . $p->url . '/edit?destination=admin/pages">' . i18n('Edit') . '</a> <a class="btn btn-danger btn-xs" href="' . $p->url . '/delete?destination=admin/pages">' . i18n('Delete') . '</a></td>';
|
||||
echo '</tr>';
|
||||
|
||||
$shortUrl = substr($p->url, strrpos($p->url, "/") + 1);
|
||||
$subPages = get_static_sub_post($shortUrl, null);
|
||||
$subPages = get_static_sub_post($p->md);
|
||||
|
||||
foreach ($subPages as $sp) {
|
||||
echo '<tr class="' . $class . '">';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue