byebye.asp

来自「聊天室」· ASP 代码 · 共 41 行

ASP
41
字号
<html>
<head>
<meta http-equiv="refresh" content="1;url=default.asp">
<title>聊天室程序</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<body >
<%
if session("myname")<>"" then
set newconn=server.CreateObject ("ADODB.Connection")
newconn.ConnectionString ="ChatRoom"
newconn.Open 

newsql1="delete from UserOnLine where UserID='" & session("myname") & "'"
newsql2="Update RoomInfo set HowManyUsers=HowManyUsers-1 where RoomName='" & session("myroom") & "'"

newconn.Execute (newsql1)
newconn.Execute (newsql2)

mysql="select UserID from UserOnLine where RoomName='" & session("myroom") & "'"
set newrecord=newconn.Execute (mysql)
Application.Lock 
do while not newrecord.eof
	application(newrecord(0))="<br><font color=purple>" & session("nickname") & "大摇大摆地走了!(请刷新)<font size=1 color=blue>(" & time() & ")</font><br><br>" & application(newrecord(0))
	newrecord.movenext
loop
application(session("myname"))=""
Application.UnLock 

newconn.Close 
set newconn=nothing
session.Abandon 
'Response.Redirect "default.asp"
end if

%>

<p align="center"><font color="#000000"><strong><big><big><big>欢迎再来聊天,结识更多的朋友!</big></big></big></strong></font></p>

</body>
</html>

⌨️ 快捷键说明

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