<?php
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(BASEDIR."local/profil/$log.prof");
 if ($text!=""){
 	$udata = explode(":||:",$text[0]);
 	$provlog=trim($udata[0]);
 	$provpar=trim($udata[1]);
 	$privat=trim($udata[10]);}

 	echo '<div class="b"><img src="../images/img/dot.gif" alt="" /> Кто в Чате</div>';
 //------Показ-Кто-В-Мини-Чате-Прихожка-------//
// echo "<hr><div class='b'><b>Сейчас здесь:</b> ";
echo "<div class=\"b\"><a href=\"indexx.php?".SID."\"><b style=\"font-weight: 600;\">Общага</b></a></div>";
 $file = @file("../local/who.dat");
 $file = array_reverse($file);
 $total = count($file);
 for ($i = 0; $i < $config_lastusers; $i++)
 {
 	$data = explode("|",$file[$i]);
 	$cur=time();
 	$cu=$cur-$data[3];
 	$cu=round($cu/180);
 	if($cu<10)
 	{
 		if(!eregi("[^a-z0-9-]",$data[0]))
 		{
 			if($data[1] == "/chat/indexx.php")
 			{
 			echo' <a href="../pages/anketa.php?uz='.$data[0].'&amp;'.SID.'">'.$data[0].'</a> |';
 			}
 			else
 			{echo'<a href="say.php?imja=%D0%9D%D0%B0%D1%81%D1%82%D1%8E%D1%85%D0%B0&amp;'.SID.'">Настюха</a> |';
 			}
 		}else{echo'Не балуй, жопу порву...';}
 	}
 }
//====================================//
 	$time=time();
 	$k_chel_chat='0';
 	if (file_exists("../local/datachat/rooms.dat")){
 		$datachat=file("../local/datachat/rooms.dat");
 		$datachat_k=count($datachat);
 		$file_online=file("../local/datachat/online.dat");
 		$file_online_k=count($file_online);
 		for ($i=0;$i<$datachat_k;$i++){
 			$k_chel_r='0';
 			$rooms=explode(":||:",$datachat[$i]);
 			echo "<div class=\"b\"><a href=\"chat.php?id_room=$rooms[0]&amp;".SID."\"><b style=\"font-weight: 600;\">$rooms[1]</b></a></div>";
 			for ($z=0;$z<$file_online_k;$z++){
 				$onlines5=explode(":||:",$file_online[$z]);
 				if ($onlines5[1]==$rooms[0] && $time<$onlines5[2]+180){
 					$k_chel_r++;
 				//	echo "$onlines5[0] ";}else{echo'&raquo;';}
 				echo'<a href="../pages/anketa.php?uz='.$onlines5[0].'&amp;'.SID.'">'.$onlines5[0].'</a> | ';}
 				else{echo'';}
 				}

 				if ($k_chel_r=='0'){
 						echo "Никого нет";} //else{echo'$onlines5[0]';}

 				}
 			}else{echo'Ошибка';}
 			//echo "$k_chel_chat";
echo '<hr />&laquo; <a href="index.php?'.SID.'">В Комнаты</a>';
echo '<br><img src="../images/img/homepage.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a>';
echo '<a href="http://basaru.net.ru">.</a><br />';
include_once"../themes/$config_themes/foot.php";
?>