示例#1
0
    $totalPages = ceil($totalNumberProjects / $itemPerPage);
    //fetch position of record
    $pagePosition = ($pageNumber - 1) * $itemPerPage;
    //Fetch part of records using SQL LIMIT clause
    $results = $projectMgr->getPaginatedResults($pagePosition, $itemPerPage);
}
//Display fetched records
if (!empty($results)) {
    //$_SESSION['results'] = $filteredProjects;
    ?>
        <div id='thumbnails' class='col-md-10'>
<?php 
    foreach ($results as $eachProject) {
        $project_name = $eachProject["project_name"];
        $project_id = $eachProject["project_id"];
        $displayURL = $photoMgr->getProjectDisplay($project_id);
        ?>
            <div class='col-md-2 project' style='height:200px;'>
<?php 
        if (isset($displayURL)) {
            ?>
                <a href="./project_detail.php?project_id=<?php 
            echo $project_id;
            ?>
"><img src="<?php 
            echo $displayURL;
            ?>
" alt=""/></a>
<?php 
        } else {
            ?>