File size: 3.62Kb
<?php
/*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
// Sitchi CMS - Mobile Content Management System //
// The author: Nikoloz Sitchinava [sitchi] //
// Link: http://sitchicms.num.ge //
// Skype: SitchiCMS //
// License: LICENSE.txt (see attached file) //
// Version: VERSION.txt (see attached file) //
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
define('_SITCHICMS', 1);
$root_path='../';
require $root_path.'includes/db_connect.php';
require $root_path.'includes/start.php';
require $root_path.'includes/header.php';
require $root_path.'includes/functions.php';
require $root_path.'includes/head.php'; // თავი
$lng_online = load_lng('online');
head(''.$lng_online['1_1'].'');
echo'<div class="hdr"><b>'.$lng_online['1_1'].'</b></div>';
echo'<a href="online.php">'.$lng_online['1_2'].'</a><br/><a href="online.php?act=user_guest">'.$lng_online['1_3'].'</a>';
if (!isset($_GET['act']))$_GET['act']='';
$act=htmlspecialchars(trim($_GET['act']));
switch ($act)
{
// დარეგისტრირებული მომხმარებლების ჩვენება
default:
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastvisit` > '".($time-600)."'"), 0);
$k_page=k_page($k_post,$set['p_count']);
$page=page($k_page);
$start=$set['p_count']*$page-$set['p_count'];
$q = mysql_query("SELECT * FROM `users` WHERE `lastvisit` > '".($time-600)."' ORDER BY id DESC LIMIT $start, $set[p_count]");
if ($k_post==0)
{
echo'<div class="errmenu">';
echo''.$lng_online['1_4'].'';
echo'</div>';
}
while ($ank = mysql_fetch_assoc($q))
{
echo'<div class="menu">';
echo'<img src="'.$root_path.'themes/'.$set['set_them'].'/images/sqe_'.$ank['sqe'].'.png" alt="" /><a href="info.php?id='.$ank['id'].'"> '.$ank['login'].'</a> '.online($ank['id']).'<br/>';
user_status ($ank['level']);
echo'<br/>'.$lng_online['1_5'].': '.timecount($ank['alltime']).'<br/>';
echo''.$lng_online['1_6'].': '.timef($ank['lastvisit']).'<br/>';
if (isset($user) && $user['level']>=2 && $user['level']>$ank['level'])
echo'IP: '.long2ip($ank['ip']).' [<a href="'.$root_path.'apanel/ban_ip.php?min='.$ank['ip'].'">'.$lng_online['1_8'].'</a>]<br/>';
echo''.$lng_online['1_7'].': '.$ank['ua'].'<br/>';
echo'</div>';
}
if ($k_page>1)str("?",$k_page,$page); // გვერდების გამოტანა
break;
// სტუმრების ჩვენება
case 'user_guest':
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `user_guest` WHERE `lastvisit` > '".($time-600)."'"), 0);
$k_page=k_page($k_post,$set['p_count']);
$page=page($k_page);
$start=$set['p_count']*$page-$set['p_count'];
$q = mysql_query("SELECT * FROM `user_guest` WHERE `lastvisit` > '".($time-600)."' ORDER BY `lastvisit` DESC LIMIT $start, $set[p_count]");
if ($k_post==0)
{
echo'<div class="errmenu">';
echo''.$lng_online['1_9'].'';
echo'</div>';
}
while ($post = mysql_fetch_assoc($q))
{
echo'<div class="menu">';
echo'<img src="'.$root_path.'themes/'.$set['set_them'].'/images/sqe_guest.png" alt="" /><a href="info.php?id=0"> '.$lng_online['1_10'].'</a><br/>';
echo''.$lng_online['1_6'].': '.timef($post['lastvisit']).'<br/>';
if (isset($user) && $user['level']>=2)
echo'IP: '.long2ip($post['ip']).' [<a href="'.$root_path.'apanel/ban_ip.php?min='.$post['ip'].'">'.$lng_online['1_8'].'</a>]<br/>';
echo''.$lng_online['1_7'].': '.$post['ua'].'<br/>';
echo'</div>';
}
if ($k_page>1)str("?act=user_guest&",$k_page,$page); // გვერდების გამოტანა
break;
}
require $root_path.'includes/end.php'; // დასასრული
?>