Просмотр файла index.php

Размер файла: 4.12Kb
<?php
include "config.php";
$query=@mysql_query("select `ltime` from `".$px.$utable."` where `ltime` < '".(time()-3*24*3600)."' order by `ltime` limit 1;");
$dq=@mysql_fetch_array($query);
if($dq) {
@mysql_query("update `".$px.$utable."` set `counter`=0, `outcounter`=0, `ltime`='".time()."' where 1;");
}
$i=0;
$q1=@mysql_query("select count(*) from `".$px.$utable."` where `category`='portaly';");
$q7=@mysql_query("select count(*) from `".$px.$utable."` where `category`='servisi';");
$q3=@mysql_query("select count(*) from `".$px.$utable."` where `category`='info';");
$q2=@mysql_query("select count(*) from `".$px.$utable."` where `category`='mobily';");
$q8=@mysql_query("select count(*) from `".$px.$utable."` where `category`='obwenie';");
$q4=@mysql_query("select count(*) from `".$px.$utable."` where `category`='poleznoe';");
$q5=@mysql_query("select count(*) from `".$px.$utable."` where `category`='lichnye';");
$q9=@mysql_query("select count(*) from `".$px.$utable."` where `category`='mastery';");
$q6=@mysql_query("select count(*) from `".$px.$utable."` where `category`='raznoe';");
//Ї®¤Р±Р·ҐРІ Є®«РЃР·ҐР±РІў  Р±РІР°®Є
$i1=@mysql_fetch_array($q1);
$i2=@mysql_fetch_array($q2);
$i3=@mysql_fetch_array($q3);
$i4=@mysql_fetch_array($q4);
$i5=@mysql_fetch_array($q5);
$i6=@mysql_fetch_array($q6);
$i7=@mysql_fetch_array($q7);
$i8=@mysql_fetch_array($q8);
$i9=@mysql_fetch_array($q9);
//‡ ЄР°Р»ў Ґ¬ Р±®Ґ¤РЃ­Ґ­РЃҐ Р± Ў §®©
$u = @mysql_query("select `outcounter`,`alloutcounter` from `".$px.$utable."` where id='';");
$data = @mysql_fetch_array($u);
$data['outcounter'] += 0;
$data['alloutcounter'] += 0;
@mysql_query("update `".$px.$utable."` set outcounter='".$data['outcounter']."',alloutcounter='".$data['alloutcounter']."' where id='';");

$r = @mysql_query("select * from `".$px.$utable."` where id='';");
$data = @mysql_fetch_array($r);
$counter = $data['counter']+0;
@mysql_query("update `".$px.$utable."` set outcounter='".$data['outcounter']."',alloutcounter='".$data['alloutcounter']."' where id='';");
//­ Р· «® wml Рґ ©« 
$inss="";
if ($f=@file("insert.cfg")) {
$inss.=trim($f[rand(0,count($f)-1)])."<br/>";
}header ("Content-type:text/vnd.wap.wml; charset=utf-8");
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="Каталог сайтов"><p><small><?php print "$inss"; ?>Разделы:<br/>

<img src="log.gif" alt="->"/><a href="katalog.php?where=portaly">Софт<?php print "(".$i1['count(*)'].")"; ?></a><br/>

<img src="log.gif" alt="->"/><a href="katalog.php?where=info">Эротика<?php print "(".$i3['count(*)'].")"; ?></a><br/>

<img src="log.gif" alt="->"/><a href="katalog.php?where=servisi">Сервисы<?php print "(".$i7['count(*)'].")"; ?></a><br/>

<img src="log.gif" alt="->"/><a href="katalog.php?where=mobily">Порталы<?php print "(".$i2['count(*)'].")"; ?></a><br/>

<img src="log.gif" alt="->"/><a href="katalog.php?where=obwenie">Общение<?php print "(".$i8['count(*)'].")"; ?></a><br/>
<img src="log.gif" alt="->"/><a href="katalog.php?where=poleznoe">Развлечения<?php print "(".$i4['count(*)'].")"; ?></a><br/>

<img src="log.gif" alt="->"/><a href="katalog.php?where=lichnye">Персональные<?php print "(".$i5['count(*)'].")"; ?></a><br/>

<img src="log.gif" alt="->"/><a href="katalog.php?where=mastery">Wap-мастеру<?php print "(".$i9['count(*)'].")"; ?></a><br/>






<img src="log.gif" alt="->"/><a href="katalog.php?where=raznoe">Разное<?php print "(".$i6['count(*)'].")"; ?></a><br/>---<br/><img src="dob.gif" alt="->"/><a href="rul.wml">Добавить сайт</a><br/><img src="izm.gif" alt="->"/><a href="enter.php">Р?зменить сайт</a><br/>---<br/><img src="go.gif" alt="->"/><?if($data['title'])



print "<u>Посещений:</u><br/>сегодня ".$data['outcounter'].",всего ".$data['alloutcounter']."";
@mysql_close();
?><br/>---<br/><a href="/index.php">COTKA.ORG</a><br/>
</small></p>
</card>
</wml>