当前位置:编程学习 > asp >>

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

答案:*****************************聊天处理******************************
<%'chatadmin.asp%>
<%response.buffer = true%>
<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">
</head>
<%
dim sc_name,sc_pass,sc_pass1,sc_ip,sc_flag,sc_易做图,sc_comin,sc_goout,sc_userflag,sc_bq(100),sc_acction(100,2),sc_friend(100)
dim sc1_user1(30,8),sc1_point,sc1_message,sc1_usernum,sc1_user,sc1_userout,sc1_userout1(30,6)
application.lock
    sc1_point = application("ap_point")
    sc1_message = application("ap_message")
    sc1_usernum = application("ap_usernum")
    sc1_user = application("ap_user")
    sc1_userout = application("ap_userout")
    '用户在线检查
    for i = 1 to 30
        for j = 1 to 8
            sc1_user1(i,j) = ""
        next
        for j = 1 to 6
            sc1_userout1(i,j) = ""
        next
    next
    sc1_ff = 0
    j=0
    sc1_time = now
    for i = 1 to 30
        if trim(sc1_user(i,1)) <> "" then
            sc1_time1 = cdate(sc1_user(i,7))
            if datediff("s",sc1_time1,sc1_time) < 61 then
                j = j + 1
                for k = 1 to 8
                    sc1_user1(j,k) = sc1_user(i,k)
                next
            else
                '在线数量-1
                sc1_usernum = sc1_usernum - 1
                '配置离别用语
                if sc1_point > 50 then
                    sc1_point = 1
                end if
                sc1_message(sc1_point,1) = sc1_user(i,1)
                sc1_message(sc1_point,2) = "所有人"
                sc1_message(sc1_point,3) = sc1_user(i,3)
                sc1_message(sc1_point,4) = ""
                sc1_message(sc1_point,5) = "8"
                sc1_message(sc1_point,6) = "<font color='#FF0000'>"
                sc1_ttt = now
                if hour(sc1_ttt) < 10 then
                    sc1_message(sc1_point,7) = "0" + cstr(hour(sc_ttt)) + ":"
                else
                    sc1_message(sc1_point,7) = "" + cstr(hour(sc_ttt)) + ":"
                end if
                if minute(sc1_ttt) < 10 then
                    sc1_message(sc1_point,7) = sc1_message(sc1_point,7) + "0" + cstr(minute(sc_ttt)) + ":"
                else
                    sc1_message(sc1_point,7) = sc1_message(sc1_point,7) + cstr(minute(sc_ttt)) + ":"
                end if
                if second(sc1_ttt) < 10 then
                    sc1_message(sc1_point,7) = sc1_message(sc1_point,7) + "0" + cstr(second(sc_ttt))
                else
                    sc1_message(sc1_point,7) = sc1_message(sc1_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(sc1_userout(i,1)) <> "" then
            sc1_time1 = cdate(sc1_userout(i,5))
            if datediff("s",sc1_time1,sc1_time) < 1 then
                j = j +

上一个:我自己写的聊天室源代码(八)
下一个:我自己写的聊天室源代码(十_1)

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,