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

Размер файла: 3.61Kb
<?php

include "xconf.php";

if(isset($id)&&isset($in)){
$id=intval($id);
$in=coding_cool($in);
$ipss = getenv('REMOTE_ADDR');
$q=mysql_query("select * from `cool_pro` where id='$id' and locate(lower('$ipss'),lower(ip))>0;");
$rows=mysql_num_rows($q);
$q=mysql_query("select * from `cool_pro` where id='$id' and `in`='$in';");
$rowb=mysql_num_rows($q);
if($rows>1&&$rowb>1){
$q = @mysql_query("select * from `cool_site` where id='$id';");
$data = @mysql_fetch_array($q);
$counter = $data['counter']+1;
@mysql_query("update `cool_site` set counter='$counter' where id='$id';");
@mysql_query("update `cool_pro` set `in`='5' where `in`='$in';");
$coolip=$ipss.".555";
@mysql_query("delete from `cool_pro` where ip='$coolip';");}}
header("Cache-Control: no-cache");



///////////////////////
include "fo.php";
$version=trim($version);

if ($version=="xhtml"){

$version=xhtml;
include "xhtml_head.php";

$div_s="<div class=\"a\">";
$div_ss="<div class=\"b\">";
$div_e="</div>";
      
}
else {
$version=wml;
$div_s="";
$div_ss="";
$div_e="";
include "wml_head.php";
}

 





print "$div_ss<p align=\"left\">
";
include "shop.php"; // платные ссылки или можно воткнуть рекламные
 print "<br/></p>$div_e $div_s<p align=\"left\">
&#x041B;y&#x0447;&#x0448;&#x0438;&#x0439; Ka&#x0442;a&#x043B;o&#x0433;<br/>
<u>$namekat</u><br/></p> $div_e $div_ss
<p align=\"left\">
*****<br/>
<b><a href=\"katalog.php?version=$version\">&#x041B;y&#x0447;&#x0448;&#x0438;e ca&#x0439;&#x0442;&#x044B;</a></b><br/>
<a href=\"konkurs.php?version=$version\">Ko&#x043D;&#x043A;ypc ca&#x0439;&#x0442;o&#x0432;</a><br/>
*****

</p>$div_e $div_s<p>";

$countiz=0;
$countv=0;
$pri=mysql_query("select * from `cool_site` where activ='1'");
while($data=mysql_fetch_array($pri)){
$countiz=$countiz+$data['outcounter'];
$countv=$countv+$data['counter'];}

$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 counter>'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&amp;version=$version\">".$data['text']."</a>(".$i['count(*)'].") <br/>";
unset($catid);unset($qs);unset($i);}

$countiz=0;
$countv=0;
$pri=mysql_query("select * from `cool_site` where activ='1'");
while($data=mysql_fetch_array($pri)){
$countiz=$countiz+$data['outcounter'];
$countv=$countv+$data['counter'];}

print"</p> $div_e $div_ss<p align=\"left\">

*****<br/>
<b>Ce&#x0433;o&#x0434;&#x043D;&#x044F; &#x043F;epexo&#x0434;o&#x0432;:</b><br/>
&#x0418;&#x0437; Ka&#x0442;a&#x043B;o&#x0433;a:<b> $countiz</b><br/>
B Ka&#x0442;a&#x043B;o&#x0433;:<b> $countv</b><br/>

</p>
$div_e $div_s<p align=\"left\">
*****<br/>

<a href=\"rules.php?version=$version\">Pe&#x0433;&#x0438;c&#x0442;pa&#x0446;&#x0438;&#x044F;</a><br/>
<a href=\"search.php?version=$version\">&#x041F;o&#x0438;c&#x043A;</a><br/>
<a href=\"edit.php?version=$version\">&#x0418;&#x0437;&#x043C;e&#x043D;&#x0438;&#x0442;&#x044C; &#x041F;po&#x0444;&#x0438;&#x043B;&#x044C;</a><br/>
<a href=\"info.php?version=$version\">&#x0418;&#x043D;&#x0444;op&#x043C;a&#x0446;&#x0438;&#x044F;</a><br/>
<a href=\"kontakt.php?version=$version\">Ko&#x043D;&#x0442;a&#x043A;&#x0442;&#x044B;</a><br/>
*****<br/>

$div_e $div_ss ";
print "</p><p align=\"left\">




</p>$div_e";

if ($version=="xhtml"){
include "xhtml_down.php";
$version=xhtml;

}
else {

include "wml_down.php";
}

?>