diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php index ddc3d62fe4..fc3b0542ba 100644 --- a/html/includes/functions.inc.php +++ b/html/includes/functions.inc.php @@ -678,4 +678,35 @@ function include_matching_files($dir, $match = "/\.php$/") } } +function generate_pagination($count,$limit,$page,$links = 2) { + $end_page = ceil($count / $limit); + $start = (($page - $links) > 0) ? $page - $links : 1; + $end = (($page + $links) < $end_page) ? $page + $links : $end_page; + $return = '