Размер файла: 5.98Kb
<?
$start_time = microtime();
$start_array = explode(" ",$start_time);
$start_time = $start_array[1] + $start_array[0];
include "xconf.php";
$id=$_GET['id'];
$kod1=$_GET['kod1'];
include "agent.php";
include "oper.php";
$title="$namecat2";
$zzzz=time();
if(isset($id)&&isset($kod1)&&($status>0)&&($oper>0)){
$id=intval($id);
If (is_numeric($id)) {
$in=coding_cool($in);
$kod1=$_GET['kod1'];
$kod1=coding_cool($kod1);
$ip = @$_SERVER['REMOTE_ADDR'];
$ips = @$_SERVER['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' ");
$insss=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','$datecool','$ipss','$insss','$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;
$tis=date("H:i:s", time());
$text =' '.$id.' || '.$ips.' || '.$mobile.' || '.$tis.' || '.$date_serv.' <br/>';
$fp=@fopen("logs/$id.txt","a+");
@fputs($fp,"$text \r\n");
@fclose($fp);
@mysql_query("Update `opers` set `$oper`=`$oper`+'1' where idaa='$id' ");
@mysql_query("Update `oper_in` set `$oper`=`$oper`+'1' where idaa='$id' ");
@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']+1000;
if ($zzzz>$ttime){
$q = @mysql_query("select * from `cool_site` where id='$id';");
$data = @mysql_fetch_array($q);
$tin = $data['tin']+1;
$ins = $data['ins']+1;
$tis=date("H:i:s", time());
$text =' '.$id.' || '.$ips.' || '.$mobile.' || '.$tis.' || '.$date_serv.' <br/>';
$fp=@fopen("logs/$id.txt","a+");
@fputs($fp,"$text \r\n");
@fclose($fp);
@mysql_query("Update `opers` set `$oper`=`$oper`+'1' where idaa='$id' ");
@mysql_query("Update `oper_in` set `$oper`=`$oper`+'1' where idaa='$id' ");
@mysql_query("delete from `ips` where id='$id' ");
@mysql_query("insert into `ips` values('$id','$ip')");
@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");
$result=mysql_query("select * from `cool_site` where tin>'0' && activ='1' order by rand() limit 1");
$rand=mysql_num_rows($result);
include "header.php";
print $begin;
print $p_l;
print $sm;
print $d_fl.'<br/>';
$result=mysql_query("select * from `cool_site` where tin>'0' && activ='1' order by rand() limit 1");
$xx=mysql_result($result,0,"id");
$xx1=mysql_result($result,0,"link");
$resultss2 =mysql_query("select id from `cool_site` where ins>'0'");
$topdayint2 = mysql_num_rows($resultss2);
$resultss =mysql_query("select id from `cool_site` where tin>'0'");
$topdayint = mysql_num_rows($resultss);
$q11 = mysql_query("select * from `obiav` where type='0' order by `id` ");
//print $d_ms;
while($arr=mysql_fetch_array($q11)) {
echo "<a href=\"".$arr['site']."\">".$arr['title']."</a><br/>"; }
//print $d_e.'<br/>';
print $d_e;
print $d_ms;
$rall=mysql_query("select `id` from `cool_site` where tin>'0' && activ='1' ");
$all=mysql_num_rows($rall);
$resd=mysql_query("select `title` from `news` order by `id` desc limit 1");
$dats=mysql_result($resd,0,"title");
$data=date("d.m.y","$dats()");
print '<p align="center">
</p>
<b>Каталог сайтов!</b><br/>
<b>http://'.$namecat2.'</b></br>
<a href="news.php?ver='.$ver.'">Новости</a>('.$data.')<br/>
<a href="topmonth.php?ver='.$ver.'">Лучшие сайты!</a>('.$topdayint2.')<br/>';
print $sme;
print $sm;
print $d_e;
print '<br/>';
print "$d_msl";
print '<p align="left">
</p>
<a href="category.php?ver='.$ver.'"><b>Все сайты</b></a>('.$all.')<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=\"category.php?c=$catid&ver=$ver\">".$data['text']."</a>(".$i['count(*)'].") <br/>";
unset($catid);unset($qs);unset($i);}
print "$d_e $d_fl $sme $sm ";
if ($rand>0) {
$xx=mysql_result($result,0,"id");
$xx1=mysql_result($result,0,"link");
$zz=$xx1;
$zz=str_replace("http://","", $zz);
print "Случайный сайт:<br/>
<a href=\"go.php?go=".$xx."\">$zz</a><br/>"; }
print '-----<br/>';
$q12 = mysql_query("select * from `obiav` where type='1' order by `id` ");
while($arr1=mysql_fetch_array($q12)) {
echo "<a href=\"".$arr1['site']."\">".$arr1['title']."</a><br/>"; }
print '-----<br/>'.$d_e.' '.$d_ms.'
<p align="center">
</p>
<a href="faq.php?ver='.$ver.'">FAQ</a><br/>
<a href="rules.php?ver='.$ver.'">Регистрация</a><br/>
<a href="edit.php?ver='.$ver.'">Ваш профиль</a><br/>
<a href="stat.php?ver='.$ver.'">Статистика каталога</a><br/>
<a href="reklama.php?ver='.$ver.'">Рекламодателям</a><br/>
'.$d_e.' '.$d_fl.'';
print '---<br/>';
if ($ver=="htm")
{
print '<a href="kontakt.php?ver='.$ver.'">© '.$namecat2.'(2o1o)</a><br/>';
}
if ($ver=="wml")
{
print '<a href="kontakt.php?ver='.$ver.'">'.$namecat2.'(2o1o)</a><br/>';
}
@include "ber.php";
print $sme;
print $endpage;
?>