<?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="h5"> <img src="/style/images/ups.png" alt="*" align="middle" />'.Protect::title($post['name']).'</div></a>';
	}
}else{
	echo '<div class="navig">Новостей не найдено</div>';
}


?>