📄 chat.asp
字号:
<!-- 聊天主框架 -->
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="conn.asp"-->
<% session("ip")=Request.ServerVariables("REMOTE_ADDR")
if application("killip")=session("ip") then %>
<html>
<head>
<title>错误</title>
</head>
<body>
<Script LANGUAGE="JavaScript">
<!--
setTimeout('window.close();', 3000);
//-->
</script>
<br><br><br><center><strong>此IP被禁止上聊天室!</strong></center>
</body>
</html>
<% response.end
end if
if request.cookies("killtime")<>"" then
if datediff("s",cdate(request.cookies("killtime")),now())<1800 then %>
<html>
<head>
<title>错误</title>
</head>
<body>
<Script LANGUAGE="JavaScript">
<!--
setTimeout('window.close();',3000);
//-->
</script>
<br><br><br><center><strong>此机被禁止上聊天室30分钟,请30分钟后再来!</strong></center>
</body>
</html>
<% response.end
end if
end if
g_username=trim(request("username"))
g_password=trim(request("password"))
response.cookies("cookiesname")=g_username
response.cookies("cookiesname").expires=date+30
set rs=my_conn.execute("select * from "&dbtable_user&" where "&dbfield_user_username&" ='"&g_username&"'")
if rs.eof then
response.redirect "regsiter.asp?f_username="&g_username
response.end
end if
if rs(dbfield_user_password)<>g_password then %>
<html><head><title>错误</title></head>
<body><br><br><br><center><strong>密码错误(注意大小写),请重新登录!<br><br><br><a href="javascript:history.go(-1);">返回</a></strong></center>
</body></html>
<% response.end
end if
session("oldrate")=rs(dbfield_user_rate)
session("sex")=rs(dbfield_user_sex)
leve=1
if rs(dbfield_user_rate)>level2rate then leve=2
if rs(dbfield_user_rate)>level3rate then leve=3
if rs(dbfield_user_rate)>level4rate then leve=4
if rs(dbfield_user_rate)>level5rate then leve=5
if rs(dbfield_user_rate)>level6rate then leve=6
if rs(dbfield_user_rate)>level7rate then leve=7
if rs(dbfield_user_manager)=1 then leve=8
if rs(dbfield_user_manager)=2 then leve=9
session("userlevel")=leve
session("user")=""
rs.close
set rs=nothing
for i=1 to 100
if application("user"&i)=g_username then
application("haveuser"&i)=1
' application("intime"&i)=now
' application("last"&i)=now
session("id")=i
session("user")=g_username
l=i
end if
next
if application("haveuser"&l)<>1 then
for i = 1 to 100
if application("user"&i) ="" then
session("id")=i
application("intime"&i)=now
application("last"&i)=now
application("userlevel"&i)=session("userlevel")
application("user"&i)=g_username
if session("sex")="girl" then application("sex"&i)="<font color=red>Girl</font>"
if session("sex")="boy" then application("sex"&i)="<font color=blue>Boy</font>"
exit for
end if
if i=100 then %>
<html><head><title>错误</title><meta http-equiv="Refresh" content="3;url=index.asp"></head>
<body><br><br><br><center><strong>对不起,为了确保每位聊友都能快速聊天!<br><br>聊天室最多只能容纳100人!请稍后再来!<br><br>三秒钟后转到登录页面!</strong></center>
</body></html>
<% response.end
end if
next
end if
if session("user")="" then
application.lock
for i =1 to 39
application("systemsay" & i) = application("systemsay" & i+1)
application("sexsay" & i) = application("sexsay" & i+1)
application("me" & i) = application("me" & i+1)
application("color" & i) = application("color" & i+1)
application("showip" & i) = application("showip" & i+1)
application("mood" & i) = application("mood" & i+1)
application("to" & i) = application("to" & i+1)
application("siliao" & i) = application("siliao" & i+1)
application("page" & i) = application("page" & i+1)
application("saytime" & i) = application("saytime" & i+1)
next
session("user")=g_username
application("systemsay" & 40)="yes"
application("sexsay" & 40)=session("sex")
application("me" & 40)=session("user")
application("color" & 40)="#FF0000"
application("showip" & 40)=session("ip")
application("mood" & 40)=""
application("to" & 40)=""
application("siliao" & 40)=""
application("saytime" & 40)=time
application.unlock
end if
my_conn.execute "update "&dbtable_user&" set "&dbfield_user_lasttime&" ='"&now()&"',"&dbfield_user_ip&"='"&session("ip")&"' where "&dbfield_user_username&"='"&session("user")&"'"
my_conn.close
set my_conn=nothing
%>
<html>
<head>
<title><%=r_title%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset framespacing="0" border="false" frameborder="0" cols="160,*">
<frameset framespacing="0" border="false" frameborder="0" rows="*,140">
<frame name ="frm_user" src="user.asp">
<frame name ="frm_do" src="Do.asp">
</frameset>
<frameset framespacing="0" border="false" frameborder="0" rows="45,*,90">
<frame name="frm_top" src="top.asp" frameborder="0" scrolling="no" noresize>
<frame name="frm_msg" src="msg.asp<%if r_refresh="down" then%>#dian<%end if%>">
<frame name="frm_input" scrolling="no" src="input.asp" target="frm_msg" noresize>
</frameset>
</frameset>
<noframes>
<body bgcolor="#FFFFFF">
<center>你的浏览器不支持FRAME!</center>
</body>
</noframes>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -