Файл: modules/online.php
Строк: 76
<?
////////////////////////////////////////
///// Основа ApiCMS //////
///// Автор биллинга - IvanDanilov /////
///// Автор биллинга - IvanDanilov /////
///// ICQ 936545, mail: KyberID@ya.ru //
////////////////////////////////////////
/////////////////////////////////////////
$title = 'Пользователи онлайн';
require_once '../api_core/apicms_system.php';
require_once '../api_core/head.php';
/////////////////////////////////////////
$my_acts = time()-600;
///////////////////////////////////
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `activity` > '$my_acts'"),0);
$k_page=k_page($k_post,$api_settings['on_page']);
$page=page($k_page);
$start=$api_settings['on_page']*$page-$api_settings['on_page'];
if ($k_post==0)echo "<div class='content'><center>На сайте пока никого нет</center></div>";
/////////////////////////////////////////
$qii_on=mysql_query("SELECT * FROM `users` WHERE `activity` > '$my_acts' ORDER BY activity DESC LIMIT $start, $api_settings[on_page]");
while ($post_on = mysql_fetch_assoc($qii_on)){
$ank=mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = $post_on[id] LIMIT 1"));
if ($ank['level']==1){
echo "<div class='subhead'><table width='100%'><tr><td width='10%'>";
echo apicms_ava40($ank['id']);
echo "</td><td width='90%'><img src='/images/admin_ico.png' alt=''> <a href=http://".htmlspecialchars($ank['login']).".".$siteisp."/><img src='/images/www.png' alt=''></a> <a href='/profile.php?id=".$ank['id']."'><b>".htmlspecialchars($ank['login'])."</b></a> <span style='float:right'><small> ".apicms_data($post_on['activity'])." </small></span> </br> ".htmlspecialchars($ank['my_place'])." </br> ";
if ($user['level']==1)echo "<small> IP: <a href='/admin/get_ip.php?ip=".$ank['ip']."'>".$ank['ip']."</a> </small></br> ";
echo "</td></tr></table> </div>";
}
if ($ank['level']==2){
echo "<div class='subhead'><table width='100%'><tr><td width='10%'>";
echo apicms_ava40($ank['id']);
echo "</td><td width='90%'><img src='/images/md.png' alt=''> <a href=http://".htmlspecialchars($ank['login']).".".$siteisp."/><img src='/images/www.png' alt=''></a> <a href='/profile.php?id=".$ank['id']."'><b>".htmlspecialchars($ank['login'])."</b></a> <span style='float:right'><small> ".apicms_data($post_on['activity'])." </small></span> </br> ".htmlspecialchars($ank['my_place'])." </br> ";
if ($user['level']==1)echo "<small> IP: <a href='/admin/get_ip.php?ip=".$ank['ip']."'>".$ank['ip']."</a> </small></br> ";
echo "</td></tr></table> </div>";
}
if ($ank['level']==0){
echo "<div class='subhead'><table width='100%'><tr><td width='10%'>";
echo apicms_ava40($ank['id']);
echo "</td><td width='90%'><img src='/images/akt_".$ank['isp_akt'].".png' alt=''> <a href=http://".htmlspecialchars($ank['login']).".".$siteisp."/><img src='/images/www.png' alt=''></a> <a href='/profile.php?id=".$ank['id']."'><b>".htmlspecialchars($ank['login'])."</b></a> <span style='float:right'><small> ".apicms_data($post_on['activity'])." </small></span> </br> ".htmlspecialchars($ank['my_place'])." </br> ";
if ($user['level']==1)echo "<small> IP: <a href='/admin/get_ip.php?ip=".$ank['ip']."'>".$ank['ip']."</a> </small></br> ";
echo "</td></tr></table> </div>";
}
}
/////////////////////////////////////////
if ($k_page > 1){
echo '<div class="subhead"><center>';
str('?',$k_page,$page); // генерируем постраничную навигацию
echo '</center></div>';
}
apicms_foot();
?>