<?php
$all = Core::count("SELECT COUNT(*) FROM
`news`");
if($all > 0){
$q = Core::query("SELECT * FROM
`news` order by `id` desc");
while($post = $q -> fetch()){
echo
'<a href="/news/ad/'.$post['id'].'"><div
class="navig">'.Protect::title($post['name']).'</div></a>';
}
}else{
echo
'<div class="navig">Новостей не
найдено</div>';
}
?>