答案:<%'************************刷新,上*****************************%>
<%'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)) + ":"
&n
上一个:我自己写的聊天室源代码(七)
下一个:我自己写的聊天室源代码(前言)