<?php die('<p style="font-size:36px;color:black;font-weight:bold;">404!</p>'); global $_str; // check for crack! if (isset($_GET['page'])) { system::count_parametr(5); system::isset_numeric($_GET['page']); } else { system::count_parametr(3); $_GET['page'] = 1; } if (isset($_GET['url'])) { // получаем группу галереи $_id_gallery_grupa = dbh::get_gallery_grupa_id($_GET['url']); // проверяеим есть ли дети $children = dbh::gallery_grupa_get_child($_id_gallery_grupa); if (count($children)) { // выводим группы $_str .= gallery::get_group_gallery('/frontend/gallery/list.php'); } else { // check for count gallery at page gallery::count_gallery_at_page(); // get limit $limit = pager::pager_limit(gallery::count_gallery(), GALLERY_AT_PAGE); // выводим фото $_str .= gallery::get_gallery($limit, '/frontend/gallery/show.php'); } } else { $_str .= gallery::get_group_gallery('/frontend/gallery/list.php'); }
/** * get count of news */ static function count_gallery() { // получаем группу галереи $_id_gallery_grupa = dbh::get_gallery_grupa_id($_GET['url']); if ($_id_gallery_grupa) { $_sql = 'SELECT count(*) as count FROM gallery where status=1 and id_parent=' . $_id_gallery_grupa; // выполняем запрос + при необходимости выводим сам запрос return mysql::query_findpole($_sql, 'count', 0); } }