|
[error]Name "Main::chkkickbylevel" used only once:possible typo at /var/www/cgi-bin/chat/viewonline.cgi line 10-14,21-27,
原文件代码如下:
#!/usr/bin/perl -w
use strict
$cgihead = "/usr/home/chat37/subfunc";
do "$cgihead/config.cgi"; # 读入设置文件
if ((-s "$filehead$kickfile")>0) {
$statsno=time+(3600*$time_miss);
@kick=&readtxtfile($kickfile,1);
@kick=sort @kick;
if ($#kick>=0) {
foreach (@kick) {
($mark,$chkuserip,$chkusername,$chkuserlevel,$chkusercookie,$chknewcookie,$chkkickoutway,$chkkickway,$chkkickbylevel,$chkkickno,$markend,$last)=split(/‖/,$_);
if (($mark eq "kick") && ($markend eq "end") && ( ($chkkickno +$kicktime)> $statsno) ) {
$kickuserdata{$chkusername}=$chkkickno;
}
}
}
}
@online=&readtxtfile($onlinefile);
@online=sort @online;
$onlinecount=0;
$people="";
foreach (@online) {
($mark,$chkuserip,$chkusername,$chkuserlevel,$chkusersex,$chktimen,$chksecn,$chkusercookie,$chknewcookie,$chkuserproxy,$markend,$last)=split(/‖/,$_);
if (($temp ne "$chkuserip‖$chkusername‖$chkuserlevel") && ($kickuserdata{$chkusername} eq "") && ($chkuserlevel<$level_hide)) {
$onlinecount++;
$people .= "<option ";
$people .= "style='colorusersexcolor{$chkusersex}'" if ($usersexcolor{$chkusersex});
$people .= ">$chkusername";
$people .= "</option>\n";
$temp="$chkuserip‖$chkusername‖$chkuserlevel";
}
}
print "Content-type: text/html;CHARSET=gb2312\n\n";
print qq~
<html>
<META HTTP-EQUIV=REFRESH CONTENT="60;URL=$ENV{'SCRIPT_NAME'}">
<body topmargin="0" leftmargin="0" bgcolor="#F4F9FF">
<SELECT><option style='color:purple'>在线 $onlinecount 人</option>
$people
</SELECT>
~;
exit;
sub readtxtfile {
open(READTXTFILE,"$filehead$_[0]");
@readtxtfile=<READTXTFILE>;
close(READTXTFILE);
return @readtxtfile;
} |
|