View file release_fix#2/data/online.php

File size: 864B
<?php
if($auth=="ok")
{
$query = "SELECT * FROM users";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login5,$pass,$mail,$reg,$class,$m,$h,$z,$s,$mon,$gold,$pms,$lvl,$ava,$ban,$online,$exp,$guild,$point2,$pvp) = mysql_fetch_row($cat))
{
if($online=="no" && $login5 !=$_COOKIE['login'])
{
}
else if($login5==$_COOKIE['login'])
{
$time=time();
$query="UPDATE users SET online='$time' WHERE login='".$_COOKIE[login]."'";
$result=mysql_query($query)
or die("<span style='color:red'>ошибка обновления персонажа!</span><br>");
}
else
{
$time=time();
$on=$online+200;
if(time()>$on)
{
$query="UPDATE users SET online='no' WHERE login='$login5'";
$result=mysql_query($query)
or die("<span style='color:red'>ошибка обновления персонажа!</span><br>");
}
}
}
}
?>