'.$ar['title'].'
'; $content .= Shop::shop_category_view(); $ar['body'] = Shop::content_regex($ar['body']); $text = explode('', $ar['body']); $content .= $text[0]; $content .= '
'.$dir->links_index('', $links).'
class Menu extends Db { function get_one() { $this->Query('SELECT * FROM menu WHERE menu.parent="0" ORDER BY menu.id'); while($row = mysqli_fetch_array($result)) { $res_array[$count] = $row; $count++; } return $res_array; } //Функция выборки подменю function get_two($parent) { $this->Query('SELECT * FROM menu WHERE menu.parent="$parent" ORDER BY menu.id'); while($row = mysqli_fetch_array($result)) { $res_array[$count] = $row; $count++; } return $res_array; } } $menu = new Menu(); class Paginator extends Db { public static $limit = 7; /* public static $navigation = array(); public static function split($sql, $perPage, $page, $link) { $page = !isset($page) || $page <= 0 ? 1 : intval($page); $limit = $page - 1 == 0 ? 0 : ($page - 1) * $perPage; $r = mysqli()->query("SELECT SQL_CALC_FOUND_ROWS * FROM ($sql) TBL LIMIT $limit, $perPage"); //if (!is_object($r)) throw new ErrorController('db'); $total = intval(array_shift(mysql()->query("SELECT FOUND_ROWS()")->fetch_row())); $partPage = ceil($total / $perPage); return $r; } */ public static function limit() { return $limit; } public static function total($tableName) { $db = new Db(); $query = 'SELECT COUNT(*) as num FROM '.$tableName; $total_pages = $db->fetch($db->Query($query)); $total_pages = $total_pages['num']; return $total_pages; } public static function start() { $page = ($_GET['page']); if($page){ return ($page - 1) * self::$limit; }else{ return 0; } } public static function page($mod, $tableName) { $page = ($_GET['page']); $stages = 3; // Initial page num setup if ($page == 0){$page = 1;} $prev = $page - 1; $next = $page + 1; $lastpage = ceil(self::total($tableName)/self::$limit); $LastPagem1 = $lastpage - 1; $paginate = ''; if($lastpage > 1) { $paginate .= '
'.$massiv['title'].'
'.$l.'
'; } break; case 'index': $sql = $db->Query('select * from s_page where id="53"'); while ($ar = $db->fetch($sql)) { $breadcrumbs[] = array('title' => $ar['title'], 'href' => ''); $title = $ar['title']; $text = explode('