Пример #1
0
function generateNavibar($page)
{
    $prev = getPrev($page);
    $next = getNext($page);
    $prev5 = getPrev($page, 5);
    $next5 = getNext($page, 5);
    $page = intval($page);
    $html = '';
    $html .= '<form>';
    $html .= createButton($prev5, !doesPageExist("{$prev5}"), '&lt;&lt;');
    $html .= createButton($prev, !doesPageExist("{$prev}"), '&lt;');
    $html .= "</form>";
    $html .= createDropDownMenu($page, getFileCountInDirectory('pages/'));
    $html .= '<form>';
    $html .= createButton($next, !doesPageExist("{$next}"), '&gt;');
    $html .= createButton($next5, !doesPageExist("{$next5}"), '&gt;&gt;');
    $html .= "</form>";
    return $html;
}
Пример #2
0
function showPagination($META, $url, $currentPage, $prevOn, $nextOn, $pageNav)
{
    if ($prevOn) {
        $pageNav[] = "<a href='" . $url . ($currentPage - 1) . "'>" . getPrev() . "</a>";
    }
    if ($nextOn) {
        $pageNav[] = "<a href='" . $url . ($currentPage + 1) . "'>" . getNext() . "</a>";
    }
    if (count($pageNav)) {
        echo "<ul style=\"list-style: none;\">\n<li style=\"float: left;margin-right: 15px;\">" . implode("</li>\n<li style=\"float: left;margin-right: 15px;\">", $pageNav) . "</li>\n</ul><br/>\n";
    }
}
Пример #3
0
<div class="nextprevbar">
<div class="prev"><?php 
    echo getPrev();
    ?>
</div>
<div class="next"><?php 
    echo getNext();
    ?>
</div>
</div>
<?php 
    echo printAll();
    ?>
<div class="nextprevbar">
<div class="prev"><?php 
    echo getPrev();
    ?>
</div>
<div class="next"><?php 
    echo getNext();
    ?>
</div>
</div>
<?php 
} else {
    require_once 'include/pages/_login.php';
}
?>