|
Server IP : 10.128.40.6 / Your IP : 216.73.216.233 Web Server : Apache System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : logmcpe ( 111175) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/logmcpe/www/TEST/www/wp-content/plugins/wp/../../themes/cleanmate/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
function kriesi_pagination($ajax = false, $pages = '', $range = 2, $query_string = false, $outputEcho = true, $action = '', $top_margin = 'none', $query)
{
$showitems = ($range * 2)+1;
global $paged;
if(empty($paged)) $paged = 1;
if($pages == '')
{
$pages = $query->max_num_pages;
if(!$pages)
{
$pages = 1;
}
}
if(1 != $pages)
{
if($query_string)
parse_str($_SERVER["QUERY_STRING"], $query_string_array);
$output = "<ul class='pagination clearfix" . ($ajax ? " ajax" : "") . ($action ? " " . esc_attr($action) : "") . ($top_margin!="none" ? " " . esc_attr($top_margin) : "") . "'>";
if($paged > 2 && $paged > $range+1 && $showitems < $pages) $output .= "<li class='first-page'><a href='".($query_string ? "?" . esc_url(http_build_query(array_merge($query_string_array, array("paged"=>1)))) : esc_url(get_pagenum_link(1)))."'>«</a></li>";
if($paged > 1 && $showitems < $pages) $output .= "<li class='left'><a class='template-arrow-horizontal-3' href='".($query_string ? "?" . esc_url(http_build_query(array_merge($query_string_array, array("paged"=>$paged-1)))) : esc_url(get_pagenum_link($paged - 1)))."'></a></li>";
for ($i=1; $i <= $pages; $i++)
{
if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
{
$output .= "<li" . ($paged == $i ? " class='selected'" : "") . ">" . ($paged == $i && !$ajax ? "<span>".$i."</span>":"<a href='".($query_string ? "?" . esc_url(http_build_query(array_merge($query_string_array, array("paged"=>$i)))) : esc_url(get_pagenum_link($i)))."'>".$i."</a>") . "</li>";
}
}
if ($paged < $pages && $showitems < $pages) $output .= "<li class='right'><a class='template-arrow-horizontal-3' href='".($query_string ? "?" . esc_url(http_build_query(array_merge($query_string_array, array("paged"=>$paged + 1)))) : esc_url(get_pagenum_link($paged + 1)))."'></a></li>";
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) $output .= "<li class='last-page'><a href='".($query_string ? "?" . esc_url(http_build_query(array_merge($query_string_array, array("paged"=>$pages)))) : esc_url(get_pagenum_link($pages)))."'>»</a></li>";
$output .= "</ul>";
if($outputEcho)
echo $output;
else
return $output;
}
}
?>