<?php include_once "header.php"; ?> <?php echo postView(); ?> <a href="<?php echo linkToPage(currentPage()); ?> " class="back">← Back</a> <?php include_once "footer.php";
function pageList() { global $clerk, $page; $order = "pos"; $orderHow = "ASC"; $get = $clerk->query_select("pages", "", "WHERE hidden= 0 ORDER BY {$order} {$orderHow}"); $contents = '<ul>'; while ($page = $clerk->query_fetchArray($get)) { $activeClass = ""; if (currentPage() == $page['slug']) { $activeClass .= ' class="active"'; } $contents .= '<li id="' . $page['slug'] . '"' . $activeClass . '><a href="' . linkToPage() . '">' . $page['name'] . '</a></li>'; } $contents .= '</ul>'; return $contents; }