<?php
##################################################################
## Development by CoMMoN web site author http://mirmastera.ru ##
## fportal web site scripts http://fportal.tk ##
## All rights reserved authors ##
##################################################################
//Вывод страниц
$query_indx = $mysql -> query("SELECT * FROM `".PREFIX."route` WHERE `type` = 'cat' ORDER BY `id`");
$i = 0;
while ($data = $query_indx -> fetch_assoc()) {
++$i;
echo '<div class="category">'.$data['name'].'</div>';
$subcats_r = $mysql -> query("SELECT * FROM `".PREFIX."route` WHERE `idi` = '$data[id]' AND (`type` = 'mod' OR `type` = 'sys') AND `view`=1 ORDER BY `pos`");
while ($subcat = $subcats_r-> fetch_assoc()) {
if($subcat['type'] == 'mod'){
if(is_file(ROOT.'/modules/'.$subcat['modul'].'/widget.php')){
include ROOT.'/modules/'.$subcat['modul'].'/widget.php';
}
}elseif($subcat['type'] == 'sys'){
include ROOT.'/modules/'.$subcat['modul'].'/widget.php';
}
}
} //Конец цикла
?>