<?php
$all = Core::count("SELECT COUNT(*) FROM `user_sites` WHERE `mod` = '1'");
if($all > 0){
	$Navig = new Navig($all);
	$start = $Navig -> start;
	$pages = 10;
	$num = 1;
	
	$q = Core::query("SELECT * FROM `user_sites` WHERE `mod` = '1' ORDER BY `host` DESC LIMIT $start, $pages");
	while($post = $q -> fetch()){
		echo '<div class="navig">
			'.$num.') <a href="/stat/index/'.$post['id'].'">'.Protect::title($post['title']).'</a><br />
			'.Protect::title($post['url']).'<br />
			'.($post['ban'] == 1 ? 'Статус: <font color="red">Заблокировано</font><br />' : NULL).'
			'.Protect::text(Protect::rez_text($post['opis'], 100)).'<br />
			'.($post['ban'] == 0 ? '<a href="/admin/ban_area/'.$post['id'].'">Бан</a>' : '<a href="/admin/razban_area/'.$post['id'].'">Разбан</a>').' | 
			'.($post['mod'] == 1 ? '<a href="/admin/mod_area/'.$post['id'].'">Мод</a> |' : NULL).'
			<a href="/admin/edit_area/'.$post['id'].'">Ред</a> | 
			<a href="/admin/del_area/'.$post['id'].'">Удл</a>
		</div>';
		$num = ++$num;
	}
	$Navig -> str('?');
}else{
	echo '<div class="navig">Площадок не найдено</div>';
}
?>