⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 viewonline.php

📁 bmb的论坛
💻 PHP
字号:
<?
/* BMForum Plus! Bulletin Board Systems Version : Plus!  This is a freeware, but don't change the copyright information. A SourceForge Project - GNU Licence project. Web Site: http://www.bmforum.com Copyright (C) Bluview Technology*/              
require("datafile/config.php");
require("getskin.php");
require("header.php");
if (empty($page)) $page=1;
$check_admin=0;
if ($usertype[22]=="1") {
		$check_admin=1;	 
}
if ($usertype[21]=="1") {
		$check_admin=1;	 
}
$forumlist=file("datafile/forumdata.php");

$add_title="$gl[325]";
navi_bar($gl[326],$gl[327],'','yes');

print <<<EOT
<table cellspacing=0 cellpadding=0 width=$tablewidth align=center border=0>
<tr> 
<td> 
<table cellspacing=1 cellpadding=5 width=100% border=0 bgcolor='$tile_back' background='$tile_back'>
<tr align=center height=22 background='$tile_back'>
<td width=><font class=title>$gl[328]</font></td>
<td width=><font class=title>IP</font></td>
<td width=><font class=title>$gl[329]</font></td>
<td width=><font class=title>$gl[330]</font></td>
<td width=><font class=title>$gl[331]</font></td>
<td width=><font class=title>$gl[332]</font></td>

</tr>
EOT;

$onlinefile="datafile/online.php";
$guestfile="datafile/guest.php";
if (file_exists($onlinefile) && $action=="") {
	$user_array=explode("\n",readfromfile($onlinefile));
}
if (file_exists($onlinefile) && $action=="guest") {
	$user_array=explode("\n",readfromfile($guestfile));
}

$count=count($user_array);
if ($count%$perpage==0) $maxpageno=floor($count/$perpage);
else $maxpageno=floor($count/$perpage)+1;
if ($page>$maxpageno) { $page=$maxpageno; $pagemax=$count-1; $pagemin=max(0,$count-$perpage-1);}
	else { if ($page==1) {$pagemin=0; $pagemax=min($count-1,$perpage-1); }
		else { $pagemin=min($count-1,$perpage*($page-1)); $pagemax=min($count-1,$pagemin+$perpage-1); }}
for ($counter=$pagemin; $counter<=$pagemax; $counter++) {
	if (!trim($user_array[$counter])) continue;

$online_user_info=explode("|",$user_array[$counter]);
$timetmp=get_date($online_user_info[2])." ".get_time($online_user_info[2]);
if ($check_admin==1)
	$iptmp=$online_user_info[3];
else $iptmp="$gl[333]";

$action_2_info="$gl[334]";
$action_info=get_action_info($online_user_info[4]);
if ($online_user_info[1]=="$gl[174]")
	$nametmp="<img border=0 src='$otherimages/system/messages1.gif'> ".$online_user_info[1];
elseif ($online_user_info[9]=="yes" ) {
	if($see_amuser==1) $useryinfo=" (<a href=profile.php?job=show&target=".urlencode($online_user_info[1]).">{$online_user_info[1]}</a>)";
	$nametmp="<img border=0 src='$otherimages/system/messages1.gif'> ".$gl[175].$useryinfo;
}elseif ($online_user_info[1]!="bmforumerboardid" )
    $nametmp="<a href=\"messanger.php?job=write&target=$online_user_info[1]\" ><img border=0 src='$otherimages/system/messages3.gif' alt='$gl[335]'></a> <a title=$gl[336] href='profile.php?job=show&target=".urlencode($online_user_info[1])."'>$online_user_info[1]</a></span>";
print("<tr align=center valign=middle bgcolor=$forumcolortwo>
<td width=110 align=left>$nametmp</td>
<td width=90 bgcolor=$forumcolorone align=center>$iptmp</td>
<td width=100 bgcolor=$forumcolortwo valign=middle align=center>$timetmp</td>
<td width=90 bgcolor=$forumcolorone align=center>$online_user_info[6]</td>
<td bgcolor=$forumcolortwo align='center'>$online_user_info[5]</td>
<td width=150 bgcolor=$forumcolorone align='center'>$action_info</td>
</tr>");
}
?>
<tr> 
<td colspan=7 bgcolor=<?=$tile_back?> align="center" background='<?=$tile_back?>' class=title>
<form name=jump action=viewonline.php?action=<?=$action?> method=post>
<div align=left>
<?
echo "<b>$gl[337]: ".$page."/".$maxpageno."$gl[146]&nbsp;&nbsp;".$perpage."$gl[148]/$gl[146] </b> ";
      $nextpage=$page+1;
      $previouspage=$page-1;
      if ($page>=2) echo "<a href=\"viewonline.php?action=$action&page=$previouspage\"><b>$gl[338]</b></a> ";
      else echo "<b><font color='FFFFFF'>$gl[338]</font></b> ";
      if ($page<=$maxpageno-1) echo "<a href=\"viewonline.php?action=$action&page=$nextpage\"><b>$gl[339]</b></a> ";
      else echo "<font color='FFFFFF'>$gl[339]</font> ";
echo "
  $gl[340]<input type='text' name='page' size=3 maxlength=3 >$gl[146]
<input type='submit' value='OK'  name='submit'>	
";

$useryno=0;
$userno=0;
$guestno=0;
$guestinfo=file($guestfile);
$guestcount=count($guestinfo);
$guestno=$guestcount;


$onlinefile="datafile/online.php";
$user_array=explode("\n",readfromfile($onlinefile));
$count=count($user_array);
for ($i=0; $i<$count; $i++) {
	$online_user_info=explode("|",$user_array[$i]);
	if ($online_user_info[1]=="闅愯韩" ) $useryno++;
	else  $userno++;
}
if (file_exists('zy.php'))  $zyinfo=explode('|',readfromfile('zy.php'));
$usernoa=$userno+$guestno+$useryno;
$zy_info=get_date($zyinfo[1]);
$usernoa=$userno+$guestno+$useryno;
$usernob=$userno+$useryno;
$time_here=$online_limit/60;
require("lang/$language/global.php");
echo "$gl[341]</td>";
?>
<b><a href=viewonline.php><?=$gl[443]?></a>&nbsp;&nbsp;<a href=viewonline.php?action=guest><?=$gl[442]?></a></b>
</div>
</font>
</tr> 
</td> 
</table></table>

<br>
<? require("footer.php");
exit;
//妯″潡锛氳幏寰楁椿鍔ㄤ俊鎭

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -