<?php
###########################
#Скрипт: Топ-Рейтинг	  #
#Автор: SL_NeKrOmAnT      #
#Версия: 1.2.1(Free)      #
#ICQ: 313886              #
#MAIL: maloy_s95@mail.ru  #
###########################
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="title2"><a href="http://'.$set['home'].'/index.php">TOP-100</a> | <a href="http://'.$set['home'].'/str/cat.php">Категории</a> | <strong>БАН - Лист</strong><br/></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++;
								$img = file_exists('../images/'.$start.'_place.png') ? '<img src = "http://'.$set['home'].'/images/'.$start.'_place.png">' : '';
								echo '<div class="title">'.$start.'.'.$img.'<strong>'.$row['name'].'</strong> [Хостов: <strong>'.$row['hosts'].'</strong> | Хитов: <strong>'.$row['hits'].'</strong>] <a href="http://'.$set['home'].'/str/infos.php?id='.$row['id'].'"><strong>[!]</strong></a><br/></div>';
								echo '<div class="main">';
								echo 'Причина бана: '.$row['ban_reason'].'<br/>';
								echo 'А забанил , <strong>'.$row['ban_who'].'</strong><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'].'/str/ban.php?',$total);
					}
				else
					{
						echo '<div class="main">';
						echo 'Нет забаненых сайтов! <br/>';
						echo '</div>';
					}		

require_once ('foot.php');
?>
