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

📄 chat-online.pl

📁 java开发的聊天室
💻 PL
字号:
sub showonline
{
&send_html;
require "$chathead/chat-usercount.pl";
#require "$chathead/chat-config.pl";

$totalusers=0;
$totalgirl=0;
$totalboy=0;
print "<html><head><title>$mytitle$myversion</title>\n";
print "<META HTTP-EQUIV=REFRESH CONTENT='20;URL=$cgiurl?job=showonline'>\n";
print "<LINK REL=stylesheet HREF='$cssurl' TYPE='text/css'>";
print "</head>\n";
print "<body bgcolor=$onlineback text=$onlineword><center>\n";
print "<H1>$mytitle在线名单</H1>";

print "\n<table border=1 width=98%>\n";
print "<tr bgcolor=Fuchsia><TD align=center>单间名称</TD><TD align=center>在线聊客</TD><TD align=center>在线聊客数</TD></tr>\n";
@addroom     =&readtxtfile($addroomfile);
   foreach (@addroom) {
   ($temp1,$roomname,$temp2)=split(/"/,$_);
	&online($roomname);
   } 

print "<caption>";
print "冰花总共有<FONT COLOR=Red>$totalusers</FONT>位聊友在线!";
print "&nbsp;&nbsp;先生:小姐=$totalboy:$totalgirl";
print "</caption>";
print "\n</table>\n";
&menuti;
print "</center></body></html>\n";

}

sub online {
   $onlinefile = $_[0];  
@online=&readtxtfile($onlinefile,2);
@online=sort @online;
close ONLINEFILE;
$allusers=0;

print "<tr bgcolor=#000033><td width=50>$onlinefile</td><td>";

$temp="";  
foreach (@online) {

   ($mark,$chkuserip,$chkusername,$chkuserlevel,$chkusersex,$chktimen,$chksecn,$markend,$last)=split(/↑/,$_);
   if (($mark eq "online") && ($markend eq "end")) {
#      if ($temp ne "$chkuserip↑$chkusername↑$chkuserlevel") {
      if ($temp ne "$chkusername↑$chkuserlevel") {
  		if (!(($chksecn<$secn-$reloadxxx) || ($chksecn>$secn+$reloadxxx))) 	  {
	  	$allusers=$allusers+1;
	  	$totalusers=$totalusers+1;
		 if ($chkusersex eq "girl")
		 {
			print "[<FONT COLOR=Fuchsia>$chkusername</FONT>]" ;
			$totalgirl=$totalgirl+1;
		 }
 		 if ($chkusersex eq "boy")
		 {
			print "[<FONT COLOR=Lime>$chkusername</FONT>]";
			$totalboy=$totalboy+1;
		 }
      }
	  }
#      $temp="$chkuserip↑$chkusername↑$chkuserlevel";
      $temp="$chkusername↑$chkuserlevel";
   }
}
print "<td width=80 align=center><FONT COLOR=blue>$allusers人</FONT></td></tr>\n";
}

1;

⌨️ 快捷键说明

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