如何用變量實現(xiàn)群聊和悄悄話?
%
if Request.Form("xt")="on" then
' 判斷是否悄悄話.
Application.Lock
' 是悄悄話,繼續(xù)往下處理.
application(session("username"))=tempposapplication(session("username"))
' 只有發(fā)言人和發(fā)言對象才能看到此發(fā)言,實現(xiàn)悄悄話.
application(Request.form("d1"))=tempposapplication(Request.form("d1"))
Application.UnLock
Else
' 群聊,繼續(xù)往下處理.
application("private")=temppos
p1=trim(application("visitorname"))
' 取眾人昵稱.
dim aa
for k=1 to len(p1)
' 用application("visitorname")來存儲全部聊友昵稱,每個昵稱之間用","隔開,并用此循環(huán)用來讀取每個聊友的昵稱.
p2=mid(p1,k,1)
if p2="," then
aa=p3
Application.Lock
application(aa)=application("private")application(aa)
' 聊天室的人都會看到此發(fā)言.
Application.UnLock
p3=""
else
p3=p3p2
end if%>
%next%>
%
end if
%>
[1]