Notice: Undefined variable: pageNum in /var/www/www-root/data/www/kzmp3.kz/core/controllers/artist.php on line 88
class Nav { public static function pages( $posts, $limit = 10, $url, $page = 'page', $end = false, $currentPage = null ) { // текущая страница if ($currentPage === null) { $currentPage = isset($_GET[$page]) ? (int)$_GET[$page] : 1; } else { $currentPage = (int)$currentPage; } $total = (int)ceil($posts / $limit); if ($currentPage < 1 || $currentPage > $total) { $currentPage = 1; } $start = ($currentPage - 1) * $limit; $display = null; /** * Генерация URL * первая страница → БЕЗ номера */ $buildUrl = static function ($p) use ($url, $end) { if ($p <= 1) { return rtrim($url, '/'); } return rtrim($url, '/') . '/' . $p . $end; }; if ($posts > $limit) { $display = ''; } return compact('start', 'limit', 'display'); } }
Fatal error: Uncaught Error: Class 'Nav' not found in /var/www/www-root/data/www/kzmp3.kz/core/controllers/artist.php:208 Stack trace: #0 /var/www/www-root/data/www/kzmp3.kz/index.php(99): require_once() #1 {main} thrown in /var/www/www-root/data/www/kzmp3.kz/core/controllers/artist.php on line 208