Просмотр файла clikus/online.php

Размер файла: 1.33Kb
<?php

session_start();

$title="Кто на сайте\n";

define("anybody","true");
include_once ('config/ini.php');
include_once ('config/function.php');
include_once ('config/header.php');
include_once ('config/connect.php');
include_once ('config/click-club.class.php');
include_once ('config/online.php');
include_once ('config/panel.php');

echo'<div class="header_rek"><b>На сайте: ('.($users[0]+$guests[0]).')</b></div>';

if(isset($_GET['u']))
{
	$f = mysql_query("SELECT `user`,`time`,`adm` FROM `".prefix."online` WHERE `user`<>'' ORDER by `time` DESC");
	$i = 'Пользователи';
	$kol = $users[0];
	echo '<font color="darkred">[Админ]</font> <br/> 
	<font color="darkgreen">[Модератор]</font><br/> - - - <br/>';
}
else
{
	$f = mysql_query("SELECT `br` as user,`time`,`adm` FROM `".prefix."online` WHERE `user`='' ORDER by `time` DESC");
	$i = 'Гости';
	$kol = $guests[0];
}
echo '<b>'.$i.' ('.$kol.'):</b> <br/>';

	while($user = mysql_fetch_array($f))
	{
		if($user['adm'] == 1) echo '<font color="darkgreen">';
		elseif($user['adm'] == 2) echo '<font color="darkgred">';
		echo '<a href="info.php?user='.$user['user'].'">'.$user['user'].'</a><b> ('.date("H:i:s",$user['time']).')</b><br/>';
		if(!empty($user['adm'])) echo '</font>';
	}


include_once ('config/end.php');
//make for clikus.ru
//Admin icq 915317
?>