<?php require_once "../includes/initialize.php"; // pagination // 1. the current page number ($current_page) $page = !empty($_GET['page']) ? (int) $_GET['page'] : 1; // 2. records per page ($per_page) $per_page = 1; // 3. total record count ($total_count) $total_count = Photograph::count_all(); //$photos = Photograph::find_all(); $pagination = new Pagination($page, $per_page, $total_count); $photos = Photograph::get_current_page($pagination); ?> <?php include_layout_template('header.php'); ?> <?php echo output_message($message); ?> <?php foreach ($photos as $photo) { ?> <div style="float: left; margin-left: 20px;"> <a href="photo.php?id=<?php echo $photo->id; ?>