Beispiel #1
0
<?php

define("PER_PAGE", 30);
require_once realpath(dirname(__FILE__)) . "/../Controller/PostsController.php";
$con = new PostsController();
//$con->controller_ins_posts();
if (preg_match('/^[1-9][0-9]*$/', $_GET['page'])) {
    $page = (int) $_GET['page'];
} else {
    $page = 1;
}
$count = PER_PAGE;
$offset = PER_PAGE * ($page - 1);
$data = $con->controller_get_posts($offset, $count);
$total = $con->controller_get_total_posts();
$totalPages = ceil($total / PER_PAGE);
foreach ($data as $post) {
    print <<<EOF
<small>
<div class="row">

\t<div class = col-xs-1>
\t<!--
\t\t<label class="checkbox" for="checkbox2">
\t\t\t<input type="checkbox" value="" id="checkbox2" data-toggle="checkbox">
\t\t</label>
\t-->
\t</div>
\t<div class="col-xs-10">
\t\t<div class="row">
\t\t\t<div class="panel panel-default">