<?
 include_once('database.php');
$razdel=($_REQUEST['razdel']>0?(0+$_REQUEST['razdel']):1);
?><HTML><HEAD><TITLE>АНТИБК</TITLE>
<META content=INDEX,FOLLOW name=robots>
<META content="1 days" name=revisit-after>
<META http-equiv=Content-Type content="text/html; charset=windows-1251">
<META http-equiv=Pragma content=no-cache>
<META http-equiv=Cache-control content=private>
<META http-equiv=Expires content=0>

<link href="../i/images/main1.css" rel="stylesheet" type="text/css">
<style type="text/css">
.style6 {	color: #DFD3A3;
	font-size: 9px;
}
A:link {
	FONT-WEIGHT: normal; COLOR: #524936; TEXT-DECORATION: none
}
A:visited {
	FONT-WEIGHT: normal; COLOR: #633525; TEXT-DECORATION: none
}
A:active {
	FONT-WEIGHT: normal; COLOR: #77684d; TEXT-DECORATION: none
}
A:hover {
	COLOR: #000000; TEXT-DECORATION: underline
}
.style10 {font-size: 9pt; font-weight: bold; }
.style7 {font-size: 9pt}
.style8 {color: #4F4B49}

</style>
</HEAD>
<BODY bgColor=#000000 leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign=top><td>
	<table width="100%" height="135"  border="0" cellpadding="0" cellspacing="0">
	<tr>
	<td background="../i/register/sitebk_02.jpg" scope="col" align=center><a href="/" onClick="this.blur()"><img src="../i/register/siteabk_03ru.gif" width="194" height="135" border=0></a></td>
	</tr>
	</table>
  </td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0" bgColor=#3D3D3B>
  <tr valign=top>
	<td width="15%">
	</td>
	<td align=center>
		<table cellspacing=0 cellpadding=0 width="100%" bgcolor=#f2e5b1 border=0>
		<tr valign=top>
		<td width="29" rowspan=2 background="../i/images/n21_08_1.jpg">
		<img src="../i/images/raitt_08.jpg" width="29" height="256"></td>
		<td><img src="../i/images/raitt_04.jpg" width="118" height="257"></td>
		<td rowspan=2>



			<!-- Begin of text -->
<!-- Begin of text -->
        <h3><br>
          </h3>
        <TABLE width="100%" border=0 cellPadding=2 cellSpacing=0 name="F1">
            <TBODY>
              <td bgcolor="#F2E5B1">
                <td valign=top><img src="../i/images/ratina_10.gif" width="135" height="26"><br>
                    <P> <B>&nbsp;&nbsp; Р</B>ейтинг сайтов в разделе <B><? 
					switch ($razdel) {
					case 1:echo 'Кланы';break;
					case 2:echo 'В помощь начинающим (FAQ, руководства, советы...)';break;
					case 3:echo 'Газеты о АНТИБК';break;
					case 4:echo 'Статьи, фото галереи и т.п.';break;
					case 5:echo 'Прочее';break;
					}
					
					?></B>
                    <P><B>&nbsp;&nbsp; </B>Статистика на <span class="style8"><code><? echo date('d.m.Y H:i:s',time()); ?></code></span>
                    <P>
		<?
if ($_REQUEST['page']>0) {
	$page=(int)((0+$_REQUEST['page'])/100*100);
}else{$page=1;}

$res=db_use('array',"select count(*) as coun from top t where t.deleted<1 and t.razdel='".$razdel."'");
$pages=$res['coun']/20;
#1-...
$pagelinks="Страницы: <SPAN class='mystrong'>";
for($i=0;$i<$pages;$i++) {
	$pagelinks.=(($i+1)==$page?'&nbsp;'.($i+1).' ':'&nbsp;<a href="show.php?page='.($i+1).'&razdel='.$razdel.'">'.($i+1).'</a> ');
}
$pagelinks.='</SPAN>';
		echo $pagelinks;
		/*                    Страницы: <SPAN class='mystrong'>&nbsp;1 &nbsp;<a href="1-1.html">2</a> &nbsp;<a href="1-2.html">3</a> &nbsp;<a href="1-3.html">4</a> &nbsp;<a href="1-4.html">5</a> &nbsp;<a href="1-5.html">6</a> &nbsp;<a href="1-6.html">7</a> &nbsp;<a href="1-7.html">8</a> &nbsp;<a href="1-8.html">9</a> &nbsp;<a href="1-9.html">10</a> &nbsp;<a href="1-10.html">(...)</a></SPAN> 
		*/
		?>

                    <P>  <FORM METHOD=POST ACTION="detail.php">
                      <table width="100%"  border="0" cellpadding="0" cellspacing="0" background="../i/register/ram12_34.gif">
                        <tr>
                          <td align="left" scope="col"><img src="../i/register/ram12_33.gif" width="12" height="11"></td>
                          <td scope="col"></td>
                          <td width="18" align="right" scope="col"><img src="../i/register/ram12_35.gif" width="13" height="11"></td>
                        </tr>
                      </table>
                            <table width=100% border=0 align=center cellpadding=0 cellspacing="1">
                              <tr>
                                <td colspan="5"></td>
                              </tr>
                              <tr bgcolor="#ECDFAA">
                                <td><b>№</b></td>
                                <td><b>Сайт</b></td>
                                <td align="right"><b>посетители </b></td>
                                <td align="right"><b>визиты</b></td>
                                <td>&nbsp;</td>
                              </tr>
                              <tr bgcolor="#3D3D3B">
                                <td width="8%"></td>
                                <td width="48%"></td>
                                <td width="23%"></td>
                                <td width="15%"></td>
                                <td width="6%"></td>
                              </tr>
<?
/*				
                              <tr>
                                <td align=right valign="top" class='mystrong'><a name="1"></a>1.&nbsp;</td>
                                <td valign="top"><span class="style10">
                                &nbsp;<a href="http://www.paladins.ru" target=_blank title="Сайт Ордена Паладинов Бойцовского Клуба">Сайт Ордена Паладинов</a> </span></td>
                                <td align=right valign="top"><b>3830</b></td>
                                <td align=right valign="top"><b>32130</b></td>
                                <td rowspan=2 align="right"><input type="checkbox" name="paladins.ru">
                                    <a href="detail.php?d=paladins.ru">»»</a></td>
                              </tr>
                              <tr>
                                <td align=right valign="top"></td>
                                <td valign="top">&nbsp;</td>
				<td align=right valign="top"><SMALL><FONT color=#800000>-505</SMALL></B></td>
				<td align=right valign="top"><SMALL><FONT color=#800000>-3586</SMALL></B></td>
                              </tr>
				
                              <tr bgcolor="#ECDFAA">
                                <td align=right valign="top" class='mystrong'><a name="2"></a>2.&nbsp;</td>
                                <td valign="top"><span class="style10"><img src="../i/klan/Mercenaries.gif" width="24" height="15" align="absbottom">
                                &nbsp;<a href="http://mercenaries.ru" target=_blank title="Клан Mercenaries http://www.mercenaries.ru ">Клан Mercenaries</a> </span></td>
                                <td align=right valign="top"><b>3074</b></td>
                                <td align=right valign="top"><b>28183</b></td>
                                <td rowspan=2 align="right"><input type="checkbox" name="mercenaries.ru">
                                    <a href="detail.php?d=mercenaries.ru">»»</a></td>
                              </tr>
                              <tr bgcolor="#ECDFAA">
                                <td align=right valign="top"></td>
                                <td valign="top">&nbsp;</td>
				<td align=right valign="top"><SMALL><FONT color=#800000>-71</SMALL></B></td>
				<td align=right valign="top"><SMALL><FONT color=#800000>-337</SMALL></B></td>
                              </tr>
				
*/

$res=db_use('query',"select t.*,s.vizit,s.host,s2.vizit as vizit_old,s2.host as host_old from top t 
left join top_stat s on s.timeday='".date("Y-m-d",time())."' and s.id_site=t.id_site 
left join top_stat s2 on s2.timeday='".date("Y-m-d",time()-24*60*60)."' and s2.id_site=t.id_site 
where t.deleted<1 and t.razdel='".$razdel."' order by s.host desc,s.vizit desc limit ".(0+($page-1)*20).",20");

$mesto=($page-1)*20;
unset($i);while ($i<mysql_num_rows($res)) {
	$i++;$s=mysql_fetch_array($res);
	$s1=substr($s['url'],7);$domain=(strpos('/',$s1)?substr($s1,0,strpos('/',$s1)):$s1);
	$n=(!$n);
	echo" <tr".($n?'':' bgcolor="#ECDFAA"')."> <td align=right valign=\"top\" class='mystrong'><a name=\"".($mesto+$i)."\"></a>".($mesto+$i).".&nbsp;</td>
         <td valign=\"top\"><span class=\"style10\">".($s['klan']?"<img src=\"../i/klan/".$s['klan'].".gif\" width=\"24\" height=\"15\" align=\"absbottom\">":"")."
                                &nbsp;<a href=\"".$s['url']."\" target=_blank title=\"".$s['opisan']."\">".$s['nazv']."</a> </span></td>
     <td align=right valign=\"top\"><b>".$s['host']."</b></td>
     <td align=right valign=\"top\"><b>".$s['vizit']."</b></td>
      <td rowspan=2 align=\"right\"><input type=\"checkbox\" name=\"".$domain."\">
         <a href=\"detail.php?d=".$domain."\">»»</a></td>
      </tr>
   <tr>
        <td align=right valign=\"top\"></td>
                 <td valign=\"top\">&nbsp;</td>
		<td align=right valign=\"top\"><SMALL><FONT color=".($s['host']>$s['host_old']?'green>+':'#800000>').($s['host']-$s['host_old'])."</SMALL></B></td>
		<td align=right valign=\"top\"><SMALL><FONT color=".($s['vizit']>$s['vizit_old']?'green>+':'#800000>').($s['vizit']-$s['vizit_old'])."</SMALL></B></td>
      </tr>";
}
                     
?>
                              <tr>
                                <td colspan=4><img src="../i/images1x1.gif" width="1" height="1" border=0 alt=""></td>
                                <td></td>
                              </tr>
                              <tr>
                                <td colspan=5><table width="100%"  border="0" cellpadding="0" cellspacing="0" background="../i/images/ram12_34.gif">
                                    <tr>
                                      <td align="left" scope="col"><img src="../i/images/ram12_33.gif" width="12" height="11"></td>
                                      <td scope="col"></td>
                                      <td width="18" align="right" scope="col"><img src="../i/images/ram12_35.gif" width="13" height="11"></td>
                                    </tr>
                                </table></td>
                              </tr>
                            </table><?
echo $pagelinks;
							
							?>
                            <p align="center">
                              <input name="compare" type="submit" class="btn" value="сравнить">
                              <br>
                            </p>
                  </FORM>
		
                          <p align=right><A HREF="./">вернуться к списку разделов</A></p><br><br>&nbsp;
                    </td>
              </tr>
        </TABLE>
<!-- End of text -->

		</td>
		<td align=right><img height=144 src="../i/images/<? 
					switch ($razdel) {
					case 1:echo 'klany_cat.jpg';break;
					case 2:echo 'v_pomow0_na4inauwim__rukovodstva_sovety_cat.jpg';break;
					case 3:echo 'gazety_o_boicovskom_klube_cat.jpg';break;
					case 4:echo 'stat0i_foto_galerei_i_tp_cat.jpg';break;
					case 5:echo 'pro4ee_cat.jpg';break;
					}		
		?>" width=139 border=0></td>
		<td valign=top background="../i/images/nnn21_03_1.jpg">&nbsp;&nbsp;&nbsp;&nbsp;</td>
		</tr>

		<tr valign=top>
		<td></td>
		<td valign=bottom style="padding-bottom:50"><IMG height=236 src="../i/images/raitt_15.jpg" width=128 border=0></td>
		<td width="23" valign=top background="../i/images/nnn21_03_1.jpg">&nbsp;</td>
		</tr>
		</table>

	</td>
	<td width="15%">
	</td>
  </tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor=#000000>
    <TR>
      <TD colspan=3 width="100%" height=13 background="../i/register/sitebk_07.jpg"></TD>
    </TR>
  <tr valign=top>
	<td width="20%">
             <div align="center">
<!--Rating@Mail.ru COUNTEr--><script language="JavaScript" type="text/javascript"><!--
d=document;var a='';a+=';r='+escape(d.referrer)
js=10//--></script><script language="JavaScript1.1" type="text/javascript"><!--
a+=';j='+navigator.javaEnabled()
js=11//--></script><script language="JavaScript1.2" type="text/javascript"><!--
s=screen;a+=';s='+s.width+'*'+s.height
a+=';d='+(s.colorDepth?s.colorDepth:s.pixelDepth)
js=12//--></script><script language="JavaScript1.3" type="text/javascript"><!--
js=13//--></script><script language="JavaScript" type="text/javascript"><!--
d.write('<a href="http://top.mail.ru/jump?from=1136139"'+
' target=_top><img src="http://d6.c5.b1.a1.top.list.ru/counter'+
'?id=1136139;t=50;js='+js+a+';rand='+Math.random()+
'" alt="Рейтинг@Mail.ru"'+' border=0 height=31 width=88/><\/a>')
if(11<js)d.write('<'+'!-- ')//--></script><noscript><a
target=_top href="http://top.mail.ru/jump?from=1136139"><img
src="http://d6.c5.b1.a1.top.list.ru/counter?js=na;id=1136139;t=50"
border=0 height=31 width=88
alt="Рейтинг@Mail.ru"/></a></noscript><script language="JavaScript" type="text/javascript"><!--
if(11<js)d.write('--'+'>')//--></script><!--/COUNTER--><SCRIPT LANGUAGE="JavaScript">document.write('<A HREF="http://antibk.org/top/c.php?jump" target=_blank><IMG SRC="http://antibk.org/top/c.php?z11&tmp='+Math.random()+'" WIDTH=88 HEIGHT=33 BORDER=0 ALT="Рейтинг Бойцовского клуба"></A>');</SCRIPT><noscript><A HREF="http://antibk.org/top/c.php?jump" target=_blank><IMG SRC="http://antibk.org/top/c.php?z11" WIDTH=88 HEIGHT=33 BORDER=0 ALT="Рейтинг АНТИБК Online"></A></noscript>
              </div>
	</td>
	<td align=center><br>
		<div align="center"><NOBR><span class="style6"></span></NOBR></div>
	</td>
	<td width="20%">
	</td>
  </tr>
</table>
</BODY>
</HTML>