<?php
#########################################
# Скрипт онлайн игры "Симс"_____________#
# Автор: -=FеST=-_______________________#
# ICQ : 345-22-23 ______________________#
# Все права принадлежат автору(-=FeST=-)#
#########################################
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/adm_check.php';
include_once '../sys/inc/user.php';
$set['title']='The Sims';
include_once '../sys/inc/thead.php';
title();
err();
aut();

if(!isset($user)){
echo 'Вы неавторизованы';
include_once '../sys/inc/tfoot.php';
exit;
}

include_once 'inc/start.php';


echo '<div class="'.$diz['post_1'].'"><img src="i/city_man.png" /><b style="font-size:1.3em;"> Онлайн</b><b style="font-size:1.3em;float:right;">'.date("H:i",time()).'</b></div>
<div class="'.$diz['post_1'].'">
';
$total=mysql_result(mysql_query("SELECT COUNT(*) FROM `sims_user` WHERE `last_visit`>'".(time()-60*3)."'"),0);
		if($total == 0)
		echo 'Нет онлайн игроков';
		else
		{
			$quert=mysql_query("SELECT * FROM `sims_user` WHERE `last_visit`>'".(time()-60*3)."' ORDER BY `id` ASC LIMIT ".$start.",5");
			
			while($array=mysql_fetch_array($quert)){
				
			
				
				echo '<div class="'.$diz['post_1'].'">
				<table cellpadding="0">
				<tr>
				<td>
				<img width="30" src="i/face_'.$array['face'].'.png" alt="." /> 
				</td>
				<td>

				 <a href="profile.php?id='.$array['id_u'].'"><b>'.$array['name'].' '.$array['fam'].'</b></a>
				<br/>
				Последнее посещение : '.date("d.m в H:i:s",$array['last_visit']).'
				</td></tr></table></div>';
			}
		
		if ($total > 5)
		echo sims_pagenav('online.php?', $start, $total, 5);
		}
	

echo '</div>
';

sims_ret($diz['ret'],'Назад','index.php');
include_once '../sys/inc/tfoot.php';
?>
