|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
由于ASP提供的是一对多的服务,所以用户的一些特殊需求很难得到满足。办理用户踢人文件admin/admin.asp
<%
user=request.form("user")
adbut=request.form("kaction")
whoto=request.form("hdish")
%><metahttp-equiv="refresh"content="4;URL=../refresh.asp?user=<%=user%>">
<%
chatdata=application("chatdata")
chatcomm=application("chatcomm")
chatpoin=application("chatpoin")
sendid=finduser(user)
ifsendid<51andchatdata(sendid,1)=Request.ServerVariables("remote_addr")then
ifsession("admlevel")="9"then
reciid=finduser(whoto)
selectcaseadbut
case"sip"
ifreciid<51then
dispstr=right("0"&time,8)&",体系,0,"&user&",ff0000,0,"&whoto&"的IP地点是"&chatdata(whotoid,1)
else
dispstr=right("0"&time,8)&",体系,0,"&user&",ff0000,0,"&whoto&"不在此谈天室"
endif
%><scriptlanguage=javascript>
parent.comm=newArray(<%=dispstr%>);
parent.writecomm();</script><%
case"kip"
ifreciid<51andsendidreciidthen
kicklist=application("kicklist")
ifinstr(kicklist,","&chatdata(reciid,1)&"")<1then
kicklist=kicklist&","&chatdata(reciid,1)&""
chatpoin=chatpoin+1mod50
chatcomm(chatpoin)=""&right("0"&time,8)&",体系,0,一切人,ff0000,0,"&whoto&"地点的IP被办理员踢出了谈天室"
application.lock
application("kicklist")=kicklist
application("chatpoin")=chatpoin
application("chatcomm")=chatcomm
application.unlock
endif
endif
case"name"
ifreciid<51andsendidreciidthen
kicklist=application("kicklist")
ifinstr(kicklist,",#"&chatdata(reciid,0)&"")<1then
kicklist=kicklist&",#"&chatdata(reciid,0)&""
chatpoin=chatpoin+1mod50
tmp=chatdata(reciid,0)
chatdata(reciid,0)=""
chatdata(reciid,1)=""
fori=0to50
chatdata(i,4)=(chatdata(i,4)mod4)+4
next
chatcomm(chatpoin)=""&right("0"&time,8)&",体系,0,一切人,ff0000,0,"&whoto&"被办理员踢出了谈天室"
application.lock
application("kicklist")=kicklist
application("chatpoin")=chatpoin
application("chatcomm")=chatcomm
application("chatdata")=chatdata
application("onliuser")=replace(application("onliuser"),","&tmp&"","")
application.unlock
endif
endif
endselect
endif
endif
functionfinduser(fuser)
reval=51
fori=0to50
ifchatdata(i,0)=fuserthen
reval=i
exitfor
endif
next
finduser=reval
endfunction
%></p>由于ASP还是一种Script语言所没除了大量使用组件外,没有办法提高其工作效率。它必须面对即时编绎的时间考验,同时我们还不知其背后的组件会是一个什么样的状况; |
|