View file go.txt
<?php include "config.php"; include "oper.php"; $time=time(); $ips = $REMOTE_ADDR; $id=$HTTP_GET_VARS['id']; if (!isset($id) || !is_numeric($id)) { header("Location: $site2"); } if(isset($id)&&is_numeric($id)){ $res=mysql_query("select * from `links` where id='$id';"); $kolss=mysql_num_rows($res); If ($kolss==0){ mysql_close(); header("Location: $site2"); exit; } $site=mysql_result($res,0,"site"); $bal=mysql_result($res,0,"balans"); $out=mysql_result($res,0,"out"); if ($bal<1) { mysql_close(); header("Location: $site2"); exit; } $q=mysql_query("select * from `click` where id='$id' && ip='$ips';"); $rows=mysql_num_rows($q); if ($rows==0){ $site=mysql_result($res,0,"site"); $bal=mysql_result($res,0,"balans"); $out=mysql_result($res,0,"out"); $out++; $bal=$bal-1; mysql_query("Update `links` set `out`=$out, `balans`=$bal where id=$id "); @mysql_query("insert into `click` values('$id','$ips','$time')"); @include "test.php"; mysql_close(); header("Location: $site"); } elseif ($rows>0) { $qs=mysql_query("select * from `click` where id='$id' && ip='$ips';"); $data = @mysql_fetch_array($qs); $ttime=$data['time']+630; if ($time>$ttime){ $out++; $bal=$bal-1; mysql_query("Update `links` set `out`=$out, `balans`=$bal where id=$id "); @mysql_query("update `click` set ip='$ips', time='$time' where `id`='$id' && ip='$ips';"); @include "test.php"; mysql_close(); header("Location: $site"); } else{ mysql_close(); header("Location: $site2"); } } } ?>