Просмотр файла pages/onlinewho.php

Размер файла: 5.56Kb
<?php
#-----------------------------------------------------#
#     **** WAP-MOTORS AutoDetect XHTML/WML ****       #
#-----------------------------------------------------#
#     Original Made by  :  VANTUZ                     #
#               E-mail  :  [email protected]             #
#                 Site  :  http://pizdec.ru           #
#             WAP-Site  :  http://visavi.net          #
#                  ICQ  :  36-44-66                   #
#-----------------------------------------------------#
#   AutoDetect Made by  :  X-ray (Юрий)               #
#               E-mail  :  [email protected]           #
#                 Site  :  http://zugdidi.us          #
#             WAP-Site  :  http://geowap.mobi         #
#-----------------------------------------------------#
#  Вы не имеете право вносить изменения в код скрипта #
#-----------------------------------------------------#
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/maincore.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
 
$text = @file("../local/profil/$log.prof"); 
if ($text!=""){
$udata = explode(":||:",$text[0]);
$provlog=trim($udata[0]);
$provpar=trim($udata[1]);
$privat=trim($udata[10]);}
echo '<img src="../images/img/partners.gif" alt=""> <b><font color="#FFFF00">Онлайн пользователей</font></b><br><br>';

if (!$_SESSION['log']=="" && !md5($_SESSION['par'])=="" && md5($_SESSION['par'])==$provpar && $_SESSION['log']==$provlog ) {
if($udata[10]>0){
echo'<img src="../images/img/mail.gif" alt=""> <b><a href="../pages/privat.php?'.$detect_wap.''.SID.'"><font color="red">Приватное сообщение! ('.$privat.')</font></a></b><br>';}}

$settime=time();


$forum_shet=0;
$chat_shet=0;
$online_shet=0;
$news_shet=0;
$down_shet=0;
$book_shet=0;
$index_shet=0;
$localfile = file("../local/who.dat");
$local_total = count($localfile); 
for($for_i=0;$for_i<=$local_total;$for_i++){
$who_file=explode("|",$localfile[$for_i]);
$controltime=$settime-trim($who_file[3]);
if($controltime < 600){
$array_users[]=trim($who_file[0]);
$who_set=explode("/",$who_file[1]);
if($who_set[1]=="forum"){$forum_shet++;}
if($who_set[1]=="chat"){$chat_shet++;}
if($who_set[1]=="news"){$news_shet++;}
if($who_set[1]=="download"){$down_shet++;}
if($who_set[1]=="book"){$book_shet++;}
if($who_set[1]=="index.php"){$index_shet++;}
$online_shet++;
}}

echo 'Сейчас <a href="../forum/?'.$detect_wap.''.SID.'">в форуме:</a> '.(int)$forum_shet.'<br>';
echo 'Сейчас <a href="../book/?'.$detect_wap.''.SID.'">в гостевой:</a> '.(int)$book_shet.'<br>';
echo 'Сейчас <a href="../chat/?'.$detect_wap.''.SID.'">в чате:</a>  '.(int)$chat_shet.'<br>';
echo 'Сейчас <a href="../news/?'.$detect_wap.''.SID.'">в новостях:</a>  '.(int)$news_shet.'<br>';
echo 'Сейчас <a href="../download/?'.$detect_wap.''.SID.'">в загрузках:</a>  '.(int)$down_shet.'<br>';
echo 'Сейчас <a href="../index.php?'.$detect_wap.''.SID.'">на главной:</a>  '.(int)$index_shet.'<br>';
echo 'Всего на сайте: '.(int)$online_shet.'<br>';
echo '<br><b>Пользователи:</b><br>';
$array_total_users = count($array_users);
sort($array_users);

for($for_u=0;$for_u<=$array_total_users;$for_u++){
if(!empty($array_users[$for_u])){
echo '<b><a href="../pages/anketa.php?uz='.check($array_users[$for_u]).'&amp;'.$detect_wap.''.SID.'">'.check($array_users[$for_u]).'</a></b>, ';
}}

//----------------------Функция вычисляет у кого сегодня Д.Р.--------------------------//
$dir = opendir ("../local/profil"); 
while ($file = readdir ($dir)) 
{if (ereg (".prof$", $file)) 
{$a[]=$file;}} 
closedir ($dir); 		
$total = count($a); 

$s_data=trim(date("d.m",$settime));

for ($i = 0; $i < $total; $i++){
$tex = file("../local/profil/$a[$i]");
$data = explode(":||:",$tex[0]);
$data_uz=explode(".",$data[18]);
$data_uzer=trim($data_uz[0].'.'.$data_uz[1]);

if($s_data==$data_uzer){
$happy_day[]='<b><a href="../pages/anketa.php?uz='.check($data[0]).'&amp;'.$detect_wap.''.SID.'"><font color="red">'.check($data[0]).'</font></a></b>, ';
}
if($data[6]==$currDate){
$novichek[]='<b><a href="../pages/anketa.php?uz='.check($data[0]).'&amp;'.$detect_wap.''.SID.'"><font color="red">'.check($data[0]).'</font></a></b>, ';
}
}

$tot_happy = count($happy_day);
$tot_novic = count($novichek);

echo'<br><hr><b>Сегодняшние именинники:</b><br>';
if($tot_happy>0){
echo'Сегодня '.$tot_happy.' чел. отмечают свой день рождения<br>';
for ($h = 0; $h < $tot_happy; $h++){
echo $happy_day[$h];
}}else {echo'<b>Именинников нет!</b>';}

echo '<br><hr><b>Приветствуем новичков:</b><br>';
if($tot_novic>0){
echo'Сегодня '.$tot_novic.' чел. впервые зарегистрировались на сайте<br>';
for ($h = 0; $h < $tot_novic; $h++){
echo $novichek[$h];
}}else {echo'<b>Новичков нет!</b>';}

echo'<br><br><a href="who.php?'.$detect_wap.''.SID.'">Kто-где?</a><br>';
echo'<a href="../index.php?'.$detect_wap.''.SID.'">На главную</a> '; 
include_once"../themes/$config_themes/foot.php";
?>