<?php
if ($autorize) {
$onl_time = @time();
$arr_onl = "UPDATE `love_user` SET `time` = '".$onl_time."' WHERE `id` = '".$autorize['id']."';";
@mysql_query($arr_onl) or die ('Ошибка обновления списка онлайн');
}
else
{
$onl_time = @time();
$arr_anonim = @mysql_query("select * from `love_anonim` WHERE ((`ip` = '".$REMOTE_ADDR."') and (`ua` = '".$HTTP_USER_AGENT."'));");
if (mysql_affected_rows() == 0) {
@mysql_query("insert into `love_anonim` values(0,'".$REMOTE_ADDR."', '".$HTTP_USER_AGENT."', '".$onl_time."');") or die ("FUCK");
}
else
{
@mysql_query("UPDATE `love_anonim` SET `time` = '".$onl_time."' WHERE ((`ip` = '".$REMOTE_ADDR."') and (`ua` = '".$HTTP_USER_AGENT."'));");
}
$del_t = $onl_time - ONLINE_USER;
@mysql_query("delete from `love_anonim` WHERE `time` < '".$del_t."';");
}

?>