$categoryInfo=\DB::getAll("SELECT * FROM `tovar_category` WHERE `id`=?",$_GET['id']);
$smarty->assign('page_info',$categoryInfo);//получаем инфо о категории
$childrenCategory=\DB::getAll("SELECT * FROM `tovar_category` WHERE `status` = 1 AND `category` = ? ORDER BY `title`",$_GET['id']);
$smarty->assign('list',$childrenCategory);//получаем дочерние категории
$childrenTovar=\DB::getAll("SELECT * FROM `tovar` WHERE `status` = 1 AND `category` = ? ORDER BY `title`",$_GET['id']);
for($i=0;$i<count($childrenTovar);$i++)$childrenTovar[$i]['img']=\DB::getValue("SELECT `filename` FROM `tovar_img` WHERE `tovar_id`=?",$childrenTovar[$i]['id']);
$smarty->assign('list2',$childrenTovar);//получаем дочерние категории