我自己写的聊天室源代码(十

80酷酷网    80kuku.com

  聊天室|源代码<%'************************刷新,上*****************************%>
<%'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("
" + 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
       &nb

[1]            

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: