<?php
$all = Core::count("SELECT COUNT(*) FROM `tiket` where `status`='0'");
if($all > 0){
	$Navig = new Navig($all);
	$start = $Navig -> start;
	$pages = 10;
if(isset($_GET['p']) && $_GET['p']!=0){	
$num = $_GET['p']*$pages-($pages-1);
}else{
$num = 1 ;
}
	$q = Core::query("SELECT * FROM `tiket`  order by `id` desc");
	while($tiket = $q -> fetch()){
		echo '<a href="/admin/them/'.$tiket['id'].'"><div class="navig">'.Protect::title($tiket['title'].' :: '.$tiket['mail']).'</div></a>';
	}
				$num = ++$num;
	 $Navig -> str('?');
}else{
	echo '<div class="navig">Тикетов нет.</div>';
}

?>