File size: 2.49Kb
<?php
########################################
## WAP-ENGINE ##
########################################
## ##
## Автор : CHUMA (Токарев Владимир) ##
## e-mail : [email protected] ##
## WAP : http://wap-engine.ru ##
## ##
########################################
## ВЫ НЕ ИМЕЕТЕ ПРАВО ##
## ИЗМЕНЯТЬ КОД СКРИПТА ##
## ДЛЯ ДАЛЬНЕЙШЕГО РАСПРОСТРАНЕНИЯ! ##
###############################
###
$ip1 = filter($_SERVER['REMOTE_ADDR']);
$time1 = time();
$date1 = date('d.m.Y', time() + ($sdvigclock*3600));
$browser1 = filter($_SERVER['HTTP_USER_AGENT']);
$brauzer1 = strtok($browser1,' ');
$user1 = trim($ip1.'|'.$brauzer1);
unset($login);
$user_online_data1 = $dob_url.'/data/chat/online.txt';
####################
if(isset($_SESSION['seslogin']))
{
$user_f1 = @file($dob_url.'/data/users/'.$_SESSION['seslogin'].'.php');
$login = trim($user_f1[2]);
$passw = trim($user_f1[4]);
}
####################
$user_online1 = file($user_online_data1);
if(trim($user_online1[0]) != $date1)
{
write_to_file($user_online_data1, $date1);
unset($user_online1);
$user_online1 = file($user_online_data1);
}
$user_online_count1 = count($user_online1);
if(isset($_SESSION['sespass']) && isset($passw) && $_SESSION['sespass'] == $passw)
{
$str_user1 = $login.'|'.$time1.'|'.$m_polozhenie.'|'.$ip1.'|'.$brauzer1;
}
for($i1 = 0; $i1 < $user_online_count1; $i1++)
{
$str_user1 = $login.'|'.$time1.'|'.$m_polozhenie.'|'.$ip1.'|'.$brauzer1;
}
for($i1 = 0; $i1 < $user_online_count1; $i1++)
{
$tmp1 = explode('|', $user_online1[$i1]);
if($tmp1[1] > $time1 - 300 && $tmp1[1] < $time1 + 300)
{
if(!empty($login) && strstr(trim($tmp1[0]), $login))
{
$user_online_out_ar[] = $str_user1;
}
elseif(!strstr(trim($tmp1[3].'|'.$tmp1[4]), $user1))
{
$user_online_out_ar[] = trim($tmp1[0].'|'.$tmp1[1].'|'.$tmp1[2].'|'.$tmp1[3].'|'.$tmp1[4]);
}
$aaa .= trim($tmp1[0]).'|';
}
}
if(!empty($login) && !strstr($aaa, $login))
{
$user_online_out_ar[] = $str_user1;
}
$user_online_out1 = @implode("\r\n", $user_online_out_ar);
if($nevidim_admins == "1")
{
}
else
{
write_to_file($user_online_data1, "$date1\r\n$user_online_out1");
}
$user_count1 = count($user_online_out_ar);
?>