detail.asp

来自「用asp做的一个小的聊天程序」· ASP 代码 · 共 49 行

ASP
49
字号
<!--#include file=cn.asp -->
<html>
<head>
<title>
</title>
</head>
<body bgcolor =darkturquoise>
<%
		dim name,password
		Dim str
		name=request.Form("txtusername")
		password=request.Form("txtpassword") 
		
		str="select * from leaguer where em_name='"& name &"'"
		rs.open str
		if rs.recordcount<>0 then
		rs.close
		str="select * from leaguer where em_name='" & name & "' and em_password1='" & password & "'"
		rs.open str
			if rs.recordcount<>0 Then
				session("username")=name
				for i=0 to 50
				if session("onlinename" & i)="" then
					session("onlinename" & i)=name
					exit for	
					
				end if
							
				next
				
				session("cindex")=0
				rs.close
				strsql="update leaguer set state=1 where em_name='"& name &"'"
				rs.open strsql
				application("chat")="<font color=red>[系统公告]:["& name &"]进入醒目聊天室,大家欢迎!</font>" &"<font color=blue>"& time &"</font><br>"
				application("person")=application("person") & "<option>" & session("username")
				application("userOn")=application("userOn") & session("username") & "<br>"
				response.redirect "chat.asp"
				else
				response.write "<script language=vbscript>msgbox" & """密码错误""</script>"
				server.Transfer "login.asp"
				end if
		else
			response.write "<script language=vbscript>msgbox" & """帐号不存在,输入错误""</script>"
			server.Transfer "login.asp"	
		end if
				%>
				</body>
				</html>

⌨️ 快捷键说明

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