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

📄 write_online.cgi

📁 这个是分屏聊天室源码。需要分屏的聊天室请参考
💻 CGI
字号:
##########################################
#整理联机文件
##########################################
sub write_online {
	$linefile = "$linehead$username";
	if ($_[0] eq "online") {
		if (-e $linefile) { $exist="yes"; }
		&getsysnum;
		$chkuserip = $userip;
		$chkuser_password = $userpassword ;
		$chkusername = $username;
		$chkuserlevel = $userlevel;
		$chkusersex = $usersex;
		$chkuser_samll = $smalladmin;
		$chkuser_pass = $chkpass;
		$chkfilterlist = "";
		$chkstat = "";
		$chksflag = 0;
		$chkdnlastno = ($lastno - $initno );
		$chktimen = $timen;
		$chksecn = time;
		&writelinedata;  }
	elsif ($_[0] eq "outline") { if (-e $linefile) { unlink($linefile);  $exist="yes"; } }
	elsif ($_[0] eq "line") { 
		@online = &getlinedata;
		$intersecn = time() - $reloadxxx;
		do "$path/write_message.cgi";
		foreach (@online) { 
			&readlinedata($_);
			$dellineflag = 1;
			if ($mark eq "online") { if ($intersecn >= $chksecn ) { $dellineflag = 0;  } }
			if ($dellineflag == 0) { 
				$linefile = "$linehead$chkusername"; 
				unlink($linefile);
				&write_message("line"); 
			} 
		}
	}
	elsif ($_[0] eq "kill") { 
		$linefile = "$linehead$_[1]";
		if (-e $linefile) { 
			$temline = &readtxtfile2($linefile,$lockfilename);
			&readlinedata($temline); 
			$chkstat = $_[2];
			$chktimen = $timen;
			$chksecn = time;
			&writelinedata; }
		else { &dn_prompt("错误:$_[1] 名单文件不存在");}
	}
	elsif ($_[0] eq "filter") { 
		if (-e $linefile) { 
			$temline = &readtxtfile2($linefile,$lockfilename);
			&readlinedata($temline); 
			$chkfilterlist = $filterlist;
			&writelinedata; }
		else { &dn_prompt("错误:$username 名单文件不存在");}
	}
	elsif ($_[0] eq "div") { 
		if (-e $linefile) { 
			$temline = &readtxtfile2($linefile,$lockfilename);
			&readlinedata($temline); 
			$chksflag = $sflag;
			&writelinedata; }
		else { &dn_prompt("错误:$username 名单文件不存在");}
	}
	elsif ($_[0] eq "login") { 
		$linedir=$linehead;
		chop $linedir;
		opendir (MEMBERDIR, "$linedir"); 
			@linelist = readdir(MEMBERDIR);
		closedir (MEMBERDIR);
		$tloginid = 0;
		if ($#linelist >= ($maxuser + 1)) {  $tloginid = 1;	}
		return $tloginid;
	}
}

⌨️ 快捷键说明

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