<?php
define('NTOP', 1);
$title = 'БАН - Лист';
require_once ('../system/connect.php');
require_once ('../system/core.php');
require_once ('../system/function.php');
require_once ('head.php');
echo '<div class="top"><div class="title2"><font color="#fff">Заблокированные сайты</font></div><div class="clear"></div></div>';
		
				$count = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait` WHERE `ban` = '1'"));
				if($count > 0)
					{
						$total=intval(($count-1)/$page_sait)+1; 
						$page=abs(intval($_GET['page'])); 
						if(empty($page) OR $page < 0)
							{
								$page = 1; 
							}
						if($page > $total)
							{
								$page = $total; 
							}
						$past=intval($count/$page_sait);  
						$start=$page*$page_sait-$page_sait; 
						$saits = mysql_query("SELECT * FROM `".$prefix."sait` WHERE `ban` = '1' ORDER BY `hosts` DESC LIMIT ".$start.",".$page_sait."");
						while($row = mysql_fetch_array($saits)) 
							{
								$start++;
								
								echo '<div class="navi3">'.$start.'.<strong>'.$row['url'].'[ID: '.$row['id'].']</strong> </div>';
								echo '<div class="main">';
								echo 'Причина блокировки: '.$row['ban_reason'].'<br/>';
								
								if($user_data['level'] == 2)
									{
										echo '<a href = "http://'.$set['home'].'/adm_panel/platforms.php?act=ban&id='.$row['id'].'">[Разблокировать]</a>';
									}
								echo '</div>';
							}
						navigation($count,$page_sait,$page,'http://'.$set['home'].'/m/ban/',$total);
					}
				else
					{
						echo '<div class="main">';
						echo 'Нет забаненых сайтов! <br/>';
						echo '</div>';
					}		

require_once ('foot.php');
?>