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

📄 stats.asp

📁 JSP ACCESS版的论坛源码 深圳盈盈通
💻 ASP
字号:
<%
	dim rsactiveusers,activeuser
	dim membername
	dim memberword
	dim memberclass
	dim stats
	membername=request.cookies("liulang")("username")
	memberword=request.cookies("liulang")("password")
	memberclass=request.cookies("liulang")("userclass")
	stats=request.cookies("liulang")("stats")
	set rsactiveusers=server.createobject("adodb.recordset")
	if membername="" then
		if session("userid")="" then
		'activeuser="select * from online"
		activeuser="insert into online(id,username,userclass,ip,startime,lastimebk,lastime,browser,stats) values "&_
				"("&Session.SessionID&",'客人','客人','"&_
				Request.ServerVariables("REMOTE_HOST")&"',now(),now(),'"&DateToStr(now())&"','"&_
				Request.ServerVariables("HTTP_USER_AGENT")&"','"&_
				stats&"')"
		conn.execute(activeuser)
		else
		activeuser="select * from online where id="&cstr(session("userid"))
		rsactiveusers.open activeuser,conn,1,3
		if rsactiveusers.eof and rsactiveusers.bof then
		activeuser="insert into online(id,username,userclass,ip,startime,lastimebk,lastime,browser,stats) values "&_
				"("&Session.SessionID&",'客人','客人','"&_
				Request.ServerVariables("REMOTE_HOST")&"',now(),now(),'"&DateToStr(now())&"','"&_
				Request.ServerVariables("HTTP_USER_AGENT")&"','"&_
				stats&"')"
		conn.execute(activeuser)
		else
		activeuser="update online set lastimebk=now(),lastime='"&DateToStr(now())&"',stats='"&stats&"' where id="&cstr(session("userid"))
		conn.execute(activeuser)
		end if
		end if
		session("userid")=Session.SessionID
	else
		activeuser="select * from online where username='"&membername&"'"
		rsactiveusers.open activeuser,conn,1,3
		if rsactiveusers.eof and rsactiveusers.bof then
		activeuser="insert into online(id,username,userclass,ip,startime,lastimebk,lastime,browser,stats) values "&_
				"("&Session.SessionID&",'"&membername&"','"&memberclass&"','"&_
				Request.ServerVariables("REMOTE_HOST")&"',now(),now(),'"&DateToStr(now())&"','"&_
				Request.ServerVariables("HTTP_USER_AGENT")&"','"&_
				stats&"')"
		conn.execute(activeuser)
		else
		activeuser="update online set lastimebk=now(),lastime='"&DateToStr(now())&"',stats='"&stats&"' where username='"&membername&"'"
		'response.write activeuser
		conn.execute(activeuser)
		end if
		rsactiveusers.close
		activeuser="select username,userpassword from [user] where username='"&membername&"' and userpassword='"&memberword&"'"
		rsactiveusers.open activeuser,conn,1,1
		if rsactiveusers.eof and rsactiveusers.bof then
			Errmsg=Errmsg+"<br>"+"<li>一般程序保护错误,您试图进行不合法的操作。<li>您的密码不正确,请<a href=login.asp>重新登陆</a>。"
			Founderr=true
			call error(errmsg)
			response.end
		end if
	end if
	'设置用户不活动超时时间--660秒
	dim strOnlineTimedOut,strOnlineCheckInTime
	strOnlineCheckInTime = DateToStr(Now())
	strOnlineTimedOut = strOnlineCheckInTime - 1200
	activeuser="delete from online where lastime<'" & strOnlineTimedOut & "'"
	Conn.Execute activeuser
	set rsactiveusers=nothing
%>

⌨️ 快捷键说明

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