| Server IP : 212.183.175.188 / Your IP : 216.73.217.18 Web Server : Apache System : Linux duemilacom6.interac.it 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 User : cvevolpi ( 10022) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/cvevolpi.it/httpdocs/wp-content/themes/sentinelPROD/printers/ |
Upload File : |
<?php
/**
* Prints pagination from data received from fPaginationData.
*
* The received data are in this format
* page => pagenumber( eg. 1, 2, 50), prev, next, startdot, enddot
* link => url or null
* selected => true or false
*
* @author boobs.lover
*/
class ffPagination {
public static function Render() {
$pg = new ffPaginationData();
$data = $pg->compute();
if( $data == null ) return;
$transPageOf = sprintf(ff_translate('pagination of'), $pg->getPageIndex(), $pg->getPageCount());
echo '<div class="pagination-1_container">';
echo '<div class="pagination-1_wrapper">';
echo '<div class="pagination-1">';
echo '<div class="desktop clearfix">';
echo '<div href="" class="page page_of">'.$transPageOf.'</div>';
foreach( $data['items'] as $one_element ) {
if( $one_element['selected'] == true ) {
echo '<a class="page current">';
echo $one_element['page'];
echo '</a>';
} else if ( $one_element['page'] == 'startdot' || $one_element['page'] == 'enddot') {
//echo '<span class="page">';
//echo $trans_dots;
//echo '</span>';
} else {
echo '<a href="'.$one_element['link'].'" class="page">';
echo $one_element['page'];
echo '</a>';
}
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
}
}