Realization of the chat room private Message (on) (posted)

Source: Internet
Author: User
Tags chr
Chat room ' Get the speech content and filter the script statements in it
Usersays=request.form ("says")
If InStr (Usersays, "script") 0 Then
Usersays= ""
End If

' To judge whether there is a conversation or not to deal with it
If Len (usersays) "0 Then
Session ("Whoto") =request.form ("Whoto")
Session ("Action") =request.form ("action")
If InStr (USERSAYS,CHR (39)) 0 Then
Usersays=replace (USERSAYS,CHR), "\" &CHR (39))
End If
If InStr (USERSAYS,CHR (34)) 0 Then
Usersays=replace (USERSAYS,CHR), "\" &CHR (34))
End If

Application.Lock

' Define a conversation buffer, and the following will give you a detailed analysis

Dim chats (20)
For N=1 to 20
Chats (n) =application ("Chats") (n)
Next
Username=request. Form ("User")


Usertime=time
Usertime= "(" &right (usertime,8) & ")"
User_whoto=request. Form ("Whoto")
User_action=request. Form ("Action")
If Application ("counter") then
Application ("Counter") =0
End If
' Not a whisper, add a
If Request.Form ("action") "Whisper" Then
Application ("Counter") =application ("Zj_1counter") +1
Counter=application ("Zj_1counter")
' User's action handling

Select Case Request. FORM ("Action")
Case "Talk"
If request. FORM ("whoto") = "All" Then
Chats (counter) = "Font Color=blue" "&usertime&"/font "Font color=black" "&username&" "/font": "Font color= #0000aa "&usersays&" "/font" BR "BR"
Else
Chats (counter) = "Font Color=blue" "&usertime&" "/font" "Font color=black" "&username&" "/font" "I" and " Font color= #00bb00 "&request. FORM ("Whoto") & "/font" said "I": "Font color= #0000aa" "&usersays&" "/font" "br" "BR"
End If
Case "Shout"
Chats (counter) = "Font Color=blue" "&usertime&" "/font" "Font color=black" "&username&" "/font" "I" Chong " Font color= #00bb00 "&request. FORM ("Whoto") & "/font" shouting "I": "B" "Font color= #0000aa" "&usersays&" "/font" "B" "br" "BR" "
Case "kiss."
Chats (counter) = "Font Color=blue" "&usertime&" "/font" "Font color=black" "&username&" "/font" "I" Kissed the " Font color= #00bb00 "&request. FORM ("Whoto") & "/font" cheek "/I": "Font color= #0000aa" "&usersays&" "/font" "br" "BR"
Case "hug."
Chats (counter) = "Font Color=blue" "&usertime&" "/font" "Font color=black" "&username&" "/font" "I" Gently holding the "font color= #00bb00" &request. FORM ("Whoto") & "/font" "I": "Font color= #0000aa" "&usersays&" "/font" "br" "BR"
Case "rage."
Chats (counter) = "Font Color=blue" "&usertime&" "/font" "Font color=black" "&username&" "/font" "I" Towards the " Font color= #00bb00 "&request. FORM ("Whoto") & "/font" Hengmeilengdui "I": "Font color= #0000aa" "&usersays&" "/font" "br" "BR"
Case "Nudge"
Chats (counter) = "Font Color=blue" "&usertime&" "/font" "Font color=black" "&username&" "/font" "I" Gently pushed the "font color= #00bb00" &request. FORM ("Whoto") & "/font" arm "/I": "Font color= #0000aa" "&usersays&" "/font" "br" "BR"
Case "giggle."
Chats (counter) = "Font Color=blue" "&usertime&" "/font" "Font color=black" "&username&" "/font" "I" Silly xi toward "font color= #00bb00" "&request. FORM ("Whoto") & "/font" Smile "I": "Font color= #0000aa" "&usersays&" "/font" "br" "BR"
Case "punching."
Chats (counter) = "Font Color=blue" "&usertime&"



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.