View file superkat/index.php

File size: 4.55Kb
<?php
$start = gettime();

include "xconf.php";

include "oper.php";
include "agent.php";
$zzzz=time();

if(isset($id)&&isset($kod1)&&($status>0)&&($oper>0)){
$id=intval($id);
If (is_numeric($id)) {

$in=coding_cool($in);
$kod1=$HTTP_GET_VARS['kod1'];
$kode=$HTTP_GET_VARS['kode'];
$ips = $REMOTE_ADDR;
$ipsa=strrchr($ips,".");
$ipss=str_replace("$ipsa","", $ips);
$test=mysql_query("select * from `kods` where id='$id' && kod1='$kod1';");
$rowsss=mysql_num_rows($test);

if ($rowsss>0){
mysql_query("delete  from `kods` where id='$id' && kod1='$kod1' ");
$in=0;
$test1=mysql_query("select * from `ips` where id='$id' && ip='$ip';");
$teest=mysql_num_rows($test1);
if ($teest==0){
$q=mysql_query("select * from `cool_pro` where id='$id' && ip='$ipss';");
$rows=mysql_num_rows($q);

if ($rows==0){
@mysql_query("insert into `cool_pro` values('$id','$date_serv','$ipss','$in','$zzzz')");
@mysql_query("delete  from `ips` where id='$id' ");
@mysql_query("insert into `ips` values('$id','$ip')");
$q = @mysql_query("select * from `cool_site` where id='$id';");
$data = @mysql_fetch_array($q);
$tin = $data['tin']+1;
$ins = $data['ins']+1;
@include "test.php";
@mysql_query("update `cool_site` set tin='$tin' where id='$id';");
@mysql_query("update `cool_site` set `ins`='$ins' where `id`='$id';");

}

else{

$data = @mysql_fetch_array($q);
$ttime=$data['ttt']+630;
if ($zzzz>$ttime){
@mysql_query("delete  from `ips` where id='$id' ");
@mysql_query("insert into `ips` values('$id','$ip')");
$q = @mysql_query("select * from `cool_site` where id='$id';");
$data = @mysql_fetch_array($q);
$tin = $data['tin']+1;
$ins = $data['ins']+1;
include "test.php";
@mysql_query("update `cool_site` set tin='$tin' where id='$id';");
@mysql_query("update `cool_site` set `ins`='$ins' where `id`='$id';");
@mysql_query("update `cool_pro` set ip='$ipss', ttt='$zzzz' where `id`='$id' && ip='$ipss';");
}
}
}
}
}
}

header("Cache-Control: no-cache");
header ("Content-type:text/vnd.wap.wml; charset=utf-8");

$result=mysql_query("select * from `cool_site` where tin>'0' order by rand() limit 1");

$xx=mysql_result($result,0,"id");
$xx1=mysql_result($result,0,"link");
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>

<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"

\"http://www.wapforum.org/DTD/wml_1.1.xml\">

<wml><head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>

<card title=\"Ka&#x0442;a&#x043B;o&#x0433; Ca&#x0439;&#x0442;o&#x0432;\"><p align=\"right\">

<!--r --><do type=\"prev\" label=\"Ha&#x0437;a&#x0434;\" name=\"a\"><go href=\"out.php?go=".$xx."\"/></do></p><p align=\"center\"><small>";

$q11 = mysql_query("select * from `obiav` order by `id` ");
while($arr=mysql_fetch_array($q11)) {
echo "<a href=\"obiav.php?mid=".$arr['id']."\">".$arr['title']."</a><br/>"; }
$zz=$xx1;
$zz=str_replace("http://","", $zz);
$rall=mysql_query("select id  from `cool_site` where tin>'0' && activ='1' ");

$all=mysql_num_rows($rall);
print "</small>
<b>Каталог сайтов SuperKat</b><br/>




</p><p> <br/><b><a href=\"katalog.php\">Все сайты</a>($all)</b><br/>";
$q=mysql_query("select * from `cool_raz` where 1 order by por asc");
while($data = @mysql_fetch_array($q)){
$catid=$data['id'];
if($active_site==1){
$qs=@mysql_query("select count(*) from `cool_site` where category='$catid' and activ='1' and tin>'0';");}else{

$qs=@mysql_query("select count(*) from `cool_site` where category='$catid' and activ='1';");}

$i=@mysql_fetch_array($qs);

print " <a href=\"katalog.php?c=$catid\">".$data['text']."</a>(".$i['count(*)'].") <br/>";

unset($catid);unset($qs);unset($i);}
print '</p><p align="center">

Случайный сайт:<br/>
<a href="http://b90.ru/fc/xxx.php?id=4278">'.$zz.'</a><br/>
-----<br/>
<a href="faq.php">FAQ</a><br/>
<a href="rules.php">Pe&#x0433;&#x0438;c&#x0442;pa&#x0446;&#x0438;&#x044F;</a><br/>
<a href="edit.php">&#x0418;&#x0437;&#x043C;e&#x043D;&#x0438;&#x0442;&#x044C; ca&#x0439;&#x0442;</a><br/>
<a href="statistics.php">C&#x0442;a&#x0442;&#x0438;c&#x0442;&#x0438;&#x043A;a</a><br/>
<a href="kontakt.wml">Контакты</a><br/>
<a href="http://b90.ru/ban/click.php?id=4278"><img src="http://b90.ru/ban/look.php?id=4278" alt="b90.ru" /></a><br/>




&#169; 2006-2008 ©<br/>
';



function gettime()
{
     $part_time = explode(' ', microtime());
     $real_time = $part_time[1].substr($part_time[0], 1);
     return $real_time;
}

$end = gettime();


   echo "<small>[".round(($end - $start), 4)."]</small>";

print '
</p>';
?>
</card>
</wml>