📄 chat10.txt
字号:
请支持我们站点以网养网,点击我们的广告,谢谢大家!
我自己写的聊天室源代码(十_1)
--------------------------------------------------------------------------------
【1_apple】 于 00-4-28 14:44:06 加贴在 Joy ASP ↑:
<%'************************刷新,上*****************************%>
<%'new.asp%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>刷新</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<meta name="Microsoft Theme" content="none, default">
<meta name="Microsoft Border" content="none">
<base target="contents">
<%if session("ss_nowflag") = 0 then%>
<script language="JavaScript"><!--
parent.location.href = "default.asp"
//--></script>
<%end if%>
<%if trim(request.form("b1")) <> "" then%>
<script language="JavaScript"><!--
parent.midleft.document.forms[0].acction.value = "0"
//-->
</script>
<%end if%>
<script
language="JavaScript"><!--
function refr()
{
parent.bottom.location.href = "new.asp";
return true;
}
function write1(text1)
{
parent.topleft.document.write("<br>" + text1);
parent.topleft.window.scrollTo(1,60000);
return true;
}
setTimeout("refr()",5000);
// --></script>
<%if request.form("b1") <> "" then
sc_www = cstr(request.form("who"))
%>
<script language="JavaScript"><!--
parent.midleft.location.href = "say.asp?name=<%response.write(sc_www)%>";
// --></script>
<%end if%>
</head>
<body>
<%
dim sc_what,sc_color,sc_who1,sc_who2,sc_flag,sc_bq
dim sc_point,sc_usernum,sc_message,sc_user,sc_user1(30,8),sc_userout,sc_userout1(30,6)
dim sc_ff,sc_time,sc_time1,my_message,my_message1(50),my_point,my_usernum
if session("ss_nowflag") <> 0 then
'全局变量
application.lock
sc_point = application("ap_point")
sc_message = application("ap_message")
sc_usernum = application("ap_usernum")
sc_user = application("ap_user")
sc_userout = application("ap_userout")
'用户在线检查
for i = 1 to 30
for j = 1 to 8
sc_user1(i,j) = ""
next
for j = 1 to 6
sc_userout1(i,j) = ""
next
next
sc_ff = 0
j=0
sc_time = now
for i = 1 to 30
if trim(sc_user(i,1)) = trim(session("ss_name")) then
sc_ff = 1
sc_user(i,7) = cstr(now)
end if
if trim(sc_user(i,1)) <> "" then
sc_time1 = cdate(sc_user(i,7))
if datediff("s",sc_time1,sc_time) < 61 then
j = j + 1
for k = 1 to 8
sc_user1(j,k) = sc_user(i,k)
next
else
'在线数量-1
sc_usernum = sc_usernum - 1
'配置离别用语
if sc_point > 50 then
sc_point = 1
end if
sc_message(sc_point,1) = sc_user(i,1)
sc_message(sc_point,2) = "所有人"
sc_message(sc_point,3) = sc_user(i,3)
sc_message(sc_point,4) = ""
sc_message(sc_point,5) = "8"
sc_message(sc_point,6) = "<font color='#FF0000'>"
sc_ttt = now
if hour(sc_ttt) < 10 then
sc_message(sc_point,7) = "0" + cstr(hour(sc_ttt)) + ":"
else
sc_message(sc_point,7) = "" + cstr(hour(sc_ttt)) + ":"
end if
if minute(sc_ttt) < 10 then
sc_message(sc_point,7) = sc_message(sc_point,7) + "0" + cstr(minute(sc_ttt)) + ":"
else
sc_message(sc_point,7) = sc_message(sc_point,7) + cstr(minute(sc_ttt)) + ":"
end if
if second(sc_ttt) < 10 then
sc_message(sc_point,7) = sc_message(sc_point,7) + "0" + cstr(second(sc_ttt))
else
sc_message(sc_point,7) = sc_message(sc_point,7) + cstr(second(sc_ttt))
end if
sc_point = sc_point + 1
if sc_point > 50 then
sc_point = 1
end if
end if
end if
next
j = 0
for i = 1 to 30
if trim(sc_userout(i,1)) <> "" then
sc_time1 = cdate(sc_userout(i,5))
if datediff("s",sc_time1,sc_time) < 1 then
j = j + 1
for k = 1 to 6
sc_userout1(j,k) = sc_userout(i,k)
next
end if
end if
next
sc_ssss = 0
for i = 1 to 30
if trim(session("ss_name")) = trim(sc_userout1(i,2)) then
if sc_userout1(i,3) = "1" then
session("ss_nowflag") = 1
sc_ssss = 1
exit for
end if
if sc_userout1(i,3) = "2" then
session("ss_nowflag") = 2
sc_ssss = 1
exit for
end if
if sc_userout1(i,3) = "3" then
session("ss_nowflag") = 3
sc_ssss = 1
exit for
end if
end if
next
if sc_ssss = 0 then
session("ss_nowflag") = 4
end if
application("ap_point") = sc_point
application("ap_message") = sc_message
application("ap_usernum") = sc_usernum
application("ap_user") = sc_user1
application("ap_userout") = sc_userout1
application.unlock
select case session("ss_nowflag")
'4正常,1被踢,2禁止说话,3禁止浏览,0异常退出
case 4
select case request.form("b1")
case "提交"
if trim(request.form("what1")) <> "" then
'内容/动作
sc_what = replace(trim(request.form("what1")),"<","<")
'颜色
sc_color = "<font color='" + trim(request.form("color")) + "'>"
session("ss_color") = trim(request.form("color"))
'sc_1 = session("ss_color")
'源
sc_who1 = session("ss_name")
'目的
sc_who2 = replace(trim(request.form("who")),"<","<")
session("ss_who") = sc_who2
'标志
if request.form("c1") = "ON" then
sc_flag = "5"
session("ss_qq") = "5"
else
sc_flag = "4"
session("ss_qq") = "4"
end if
sc_bq = replace(trim(request.form("bq")),"<","<")
session("ss_bq1") = sc_bq
if sc_ff = 1 then
application.lock
sc_message = application("ap_message")
sc_point = application("ap_point")
if sc_point > 50 then
sc_point = 1
end if
if request.form("acction") = "0" then
sc_message(sc_point,1) = sc_who1
sc_message(sc_point,2) = sc_who2
sc_message(sc_point,3) = sc_what
sc_message(sc_point,4) = sc_bq
sc_message(sc_point,5) = sc_flag
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -