uawdijnntqw1x1x1
IP : 3.142.124.237
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,parse_ini_file,show_source,eval,open_base,symlink
OS : Linux
PATH:
/
home
/
sudancam
/
public_html
/
0d544
/
..
/
..
/
.trash
/
.
/
catalog
/
..
/
catalog.1
/
controller
/
common
/
pagination.php
/
/
<?php namespace Opencart\Catalog\Controller\Common; class Pagination extends \Opencart\System\Engine\Controller { public function index(array $setting): string { if (isset($setting['total'])) { $total = $setting['total']; } else { $total = 0; } if (isset($setting['page']) && $setting['page'] > 0) { $page = (int)$setting['page']; } else { $page = 1; } if (isset($setting['limit'])) { $limit = (int)$setting['limit']; } else { $limit = 10; } if (isset($setting['url'])) { $url = str_replace('%7Bpage%7D', '{page}', (string)$setting['url']); } else { $url = ''; } $num_links = 8; $num_pages = ceil($total / $limit); if ($url && $page > 1 && $num_pages < $page) { $back = true; } else { $back = false; } $data['page'] = $page; if ($page > 1) { $data['first'] = str_replace(['&page={page}', '?page={page}', '&page={page}'], '', $url); if ($page - 1 === 1) { $data['prev'] = str_replace(['&page={page}', '?page={page}', '&page={page}'], '', $url); } else { $data['prev'] = str_replace('{page}', $page - 1, $url); } } else { $data['first'] = ''; $data['prev'] = ''; } $data['links'] = []; if ($num_pages > 1) { if ($num_pages <= $num_links) { $start = 1; $end = $num_pages; } else { $start = $page - floor($num_links / 2); $end = $page + floor($num_links / 2); if ($start < 1) { $end += abs($start) + 1; $start = 1; } if ($end > $num_pages) { $start -= ($end - $num_pages); $end = $num_pages; } } for ($i = $start; $i <= $end; $i++) { $data['links'][] = [ 'page' => $i, 'href' => str_replace('{page}', $i, $url) ]; } } if ($num_pages > $page) { $data['next'] = str_replace('{page}', $page + 1, $url); $data['last'] = str_replace('{page}', $num_pages, $url); } else { $data['next'] = ''; $data['last'] = ''; } if ($num_pages > 1 || $back) { return $this->load->view('common/pagination', $data); } else { return ''; } } }
/home/sudancam/public_html/0d544/../../.trash/./catalog/../catalog.1/controller/common/pagination.php