View file wkat/agent.php

File size: 758B
<?

$status="0";
if(isset($id)&&isset($kod1)){
If (is_numeric($id)) {
$agent = $_SERVER['HTTP_USER_AGENT'];
$agent=htmlspecialchars($agent);
$agent=strip_tags($agent);
$mobile=strtok($agent,"/");
$zzz=time();

$ag=mysql_query("select * from `agents` where id='$id' && agent='$mobile' ");
$data = mysql_fetch_array($ag);
$rowws=mysql_num_rows($ag);
if ($rowws==0){

mysql_query("insert into `agents` values('$id','$mobile','$zzz')");
$status="5";


}

else
{
$ag=mysql_query("select * from `agents` where id='$id' && agent='$mobile' ");
$data = mysql_fetch_array($ag);

$times=$data['time']+600;
if ($zzz>$times){
@mysql_query("update `agents` set  time='$zzz' where `id`='$id' && agent='$mobile' ");
$status="5";
}
}
} 
}
?>