} } echo '<div class="col-sm-3">'; echo '<div class="product-image-wrapper">'; echo '<div class="single-products">'; echo '<div class="productinfo text-center">'; echo '<img src="admin/images/' . $user_image . '" alt="" height="170" width="40" />'; echo '<a href="member?id=' . (int) $row['user_id'] . '&lang=' . $_REQUEST['lang'] . '"><h2>' . MemberName($row['user_id'], $_REQUEST['lang']) . '</h2></a>'; echo '<a href="member?id=' . (int) $row['user_id'] . '&lang=' . $_REQUEST['lang'] . '"><p class="' . $class_font . '">' . MemberName($row['father_id'], $_REQUEST['lang']) . '</p></a>'; echo '<a href="member?id=' . (int) $row['user_id'] . '&lang=' . $_REQUEST['lang'] . '"><p class="' . $class_font . '">' . MemberName($row['mother_id'], $_REQUEST['lang']) . '</p></a>'; echo '</div>'; //echo '<div class="product-overlay">'; //echo '<div class="overlay-content">'; //echo '<h2>Shop Name</h2>'; //echo '<p>Easy Polo Black Edition Easy Polo Black Edition Easy Polo Black Edition Easy Polo Black Edition Easy Polo Black Edition Easy Polo Black Edition</p>'; //echo '</div>'; //echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; if ($i % 4 == 0) { echo '<div class="clearfix"></div>'; } $i++; } // end while echo '<div align="center" class="clear" style="margin-bottom:15px;">'; /* We call the pagination function here to generate Pagination link for us. As you can see I have passed several parameters to the function. */ echo paginate_function($item_per_page, $page_number, $get_total_rows, $total_pages); echo '</div>';
?> </div> <?php } ?> </div> <?php } ?> <!-- Pagination --> <div class="col-md-6 project-pagination"> <?php echo paginate_function($itemPerPage, $pageNumber, $totalNumberProjects, $totalPages); ?> </div> </div> <?php } else { ?> <div align="center"> <h2 style="font-family:'Arial Black', Gadget, sans-serif;font-size:30px;color:#0099FF;">No Results with this filter</h2> </div> <?php } function paginate_function($item_per_page, $currentPage, $total_records, $totalPages)
<i class="material-icons right">more_vert</i></span> </div> <div class="card-reveal "> <span class="card-title grey-text text-darken-4">' . $name . '<i class="material-icons right">close</i></span> <h6>Durée de la recette :</h6> ' . $tps . ' minutes <h6>Note : ' . $note_arr . '/5</h6> <h6>Difficulté : ' . $diff . '/5</h6> </div>'; echo '</div>'; } echo paginate_function($nbResParPage, $pageCourante, $nbRecettes[0], $nbPages); function paginate_function($nbResParPage, $pageCourante, $nbRecettes, $nbPages) { $pagination = ''; if ($nbPages > 0 && $nbPages != 1 && $pageCourante <= $nbPages) { $pagination .= '<div class ="col s12 center"><ul class="pagination">'; $right_links = $pageCourante + 3; $left_links = $pageCourante - 3; $previous = $pageCourante - 1; $next = $pageCourante + 1; if ($pageCourante == 1) { $pagination .= '<li class="grey-text" style="width:50px"><i class="material-icons small">chevron_left</i></li>'; } if ($pageCourante > 1) { $pagination .= '<li class="waves-effect" data-page="' . $previous . '" style="width:50px"><a href="#" title="Précédent"><i class="material-icons small">chevron_left</i></a></li>'; for ($i = $left_links; $i < $pageCourante; $i++) {
function get_pageniation_result() { $history = new History(); global $main_db; $item_per_page = 5; //Get page number from Ajax if (isset($_POST["page"])) { $page_number = filter_var($_POST["page"], FILTER_SANITIZE_NUMBER_INT, FILTER_FLAG_STRIP_HIGH); //filter number if (!is_numeric($page_number)) { die('Invalid page number!'); } //incase of invalid page number } else { $page_number = 1; //if there's no page number, set it to 1 } //get total number of records from database $get_total_rows = $history->count_files(); //hold total records in variable //break records into pages $total_pages = ceil($get_total_rows / $item_per_page); //position of records $page_position = ($page_number - 1) * $item_per_page; //Limit our results within a specified range. $results = $history->get_file_from(abs($page_position), $item_per_page); //Display records fetched from database. ?> <table class="table table-bordered"> <thead> <tr> <th> File Name </th> <th> Page </th> <th> Action </th> </tr> </thead> <tbody> <?php if ($results != NULL) { foreach ($results as $item) { ?> <tr data-id="<?php echo $item->id; ?> "> <td> <p> <?php echo $item->name; ?> </p></td> <td> <p> <?php echo $item->pages; ?> </p></td> <td> <p> <a target="_blank" href="<?php echo get_home_url(); ?> /view.php?post_id=<?php echo $item->id; ?> "><span class="fa fa-eye fa-2x"></span> </a> <a href="#"><span class="fa fa-cloud-upload fa-2x"></span></a> <a class="delete_file" href="#"><span class="fa fa-trash fa-2x"></span></a> </p> </td> </tr> <?php } } ?> </tbody> </table> <?php echo '<div align="center">'; // To generate links, we call the pagination function here. echo paginate_function($item_per_page, $page_number, $get_total_rows[0], $total_pages); echo '</div>'; }
echo $hd_photos[$count]; ?> " src="<?php echo $eachPhoto; ?> "> </div> <?php $count++; } ?> <!-- Pagination --> </div> <?php echo paginate_function($photoPerPage, $pageNumber, $totalNumberImages, $totalPages); ?> <?php } else { ?> <div align="center"> <h2 style="font-family:'Arial Black', Gadget, sans-serif;font-size:30px;color:#0099FF;">No Results with this filter</h2> </div> <?php } function paginate_function($item_per_page, $currentPage, $total_records, $totalPages) { $pagination = ''; if ($totalPages > 0 && $totalPages != 1 && $currentPage <= $totalPages) {