php session_start define NTOP title Главная require_once system connec

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?php
session_start();
define('NTOP', 1);
$title = 'Главная';
require_once ('system/connect.php');
require_once ('system/core.php');
require_once ('system/function.php');
require_once ('system/head.php');
require_once ('system/panel.php');
require_once ('system/news.php');
echo "<div class='tip'>";
echo "<center>";
echo "Топ100";
echo "</center>";
echo "</div>";
$all = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait` WHERE `status` = '1' AND `ban` = '0' AND `hosts` > '0'"));
if($all != 0){
$total=intval(($all-1)/$page_top)+1;
$page=abs(intval($_GET['page']));
if(empty($page) OR $page < 0){
$page = 1;
}
if($page > $total){
$page = $total;
}
$past=intval($all/$page_top);
$start=$page*$page_top-$page_top;
$top = mysql_query("SELECT * FROM `".$prefix."sait` WHERE `status` = '1' AND `ban` = '0' AND `hosts` > '0' ORDER BY `hosts` DESC LIMIT ".$start.",".$page_top."");
while($row = mysql_fetch_array($top)){
$start++;
if($_SESSION['id'] == $row['id']){
$div_1 = "</div><div class='main'><b>";
}else{
$div_1 = "</div><a href='http://".$set['home']."/stats/".$row['id']."'><div class='main1'>";
}
echo $div_1.$start.".";
echo "<b>".$row['url']."</b>";
echo "";
echo " ".$row['hosts'].":".$row['hits']." ";
echo "</br>";
if(mb_strlen($row['about']) > 250){
$text = substr($row['about'],0,250);
echo " ".$text."...</br>";
}else{
echo " ".$row['about']."<br/></b>";
echo "<small>";
echo "<font color='#4F4F4F'>";
echo "В топ:".$row['in']."";
echo " | Из топа:".$row['out']." ";
echo "</font>";
echo "</small>";
echo "</br>";
}
echo "</div></a>";
}
navigation($all,$page_top,$page,'/',$total);
}else{
echo "<div class='main'>";
echo "Сайтов участвующих в Топ-100 не обнаружено!";
echo "</div>";
}
echo "<a href='http://".$set['home']."/modules/category'>";
echo "<div class='mav'>";
echo "Категории";
echo "</div>";
echo "</a>";
echo "<a href='http://".$set['home']."/modules/search'>";
echo "<div class='mav'>";
echo "Поиск Сайта";
echo "</div>";
echo "</a>";
echo "<a href='http://".$set['home']."/modules/ban'>";
echo "<div class='mav'>";
echo "Бан Лист";
echo "</div>";
echo "</a>";
echo "<a href='http://".$set['home']."/modules/news.php'>";
echo "<div class='mav'>";
echo "Новости";
echo "</div>";
echo "</a>";
echo "<a href='http://".$set['home']."/modules/users.php'>";
echo "<div class='mav'>";
echo "Пользователи";
echo "</div>";
echo "</a>";
unset($_SESSION['id']);
require_once ('modules/foot.php');
?>