新客网WWW.XKER.COM:致力做中国最专业的网络学院!
学院: 操作系统 - 网络应用 - 服务器 - 网络安全 - 工具软件 - 办公软件 - Web开发 - 数据库 - 网页设计 - 图形图像 - 媒体动画 - 硬件学堂 - 存储频道 - QQ专区
您的位置:首页 > 软件开发 > Web开发 > Asp教程 > 正文:最后一个:聊客用来屏蔽不想见到的人admin/hideuser.asp,如想要源码到我的主页下载

最后一个:聊客用来屏蔽不想见到的人admin/hideuser.asp,如想要源码到我的主页下载

新客网 XKER.COM 2003-07-11 来源: 收藏本文
最后一个:聊客用来屏蔽不想见到的人admin/hideuser.asp

<%
whoto=request.form("whoto")
user=request.form("user")
screen=request.form("hdish")
chatdata=application("chatdata")
select case screen
case "1"
  sendid=finduser(user)
  reciid=finduser(whoto)
  if sendid<51 and reciid<51 then
    if instr(chatdata(sendid,5),",'"&whoto&"'")<1 then
      chatdata(sendid,5)=chatdata(sendid,5)&",'"&whoto&"'"
      application.lock
        application("chatdata")=chatdata
      application.unlock
      dispstr=right("0"&time,8)&",系统,0,"&user&",ff0000,0,你成功屏蔽"&whoto&"的聊天内容"
    else
      dispstr=right("0"&time,8)&",系统,0,"&user&",ff0000,0,"&whoto&"已在屏蔽名单中"
    end if
  else
    if reciid=51 then dispstr=right("0"&time,8)&",系统,0,"&user&",ff0000,0,"&whoto&"不在此聊天室"
  end if

case "0"
  sendid=finduser(user)
  reciid=finduser(whoto)
  if sendid<51 then
    if whoto="所有人" then
      chatdata(sendid,5)=""
    else
      chatdata(sendid,5)=replace(chatdata(sendid,5),",'"&whoto&"'","")
    end if
    dispstr=right("0"&time,8)&",系统,0,"&user&",ff0000,0,你成功解除对"&whoto&"的聊天内容的屏蔽"
    application.lock
      application("chatdata")=chatdata
    application.unlock
  end if
case "2"
  sendid=finduser(user)
  dispstr=right("0"&time,8)&",系统,0,"&user&",ff0000,0,你屏蔽了:"&mid(replace(chatdata(sendid,5),"'",""),2)
end select


function finduser(fuser)
  reval=51
  for i=0 to 50
    if chatdata(i,0)=fuser then
      reval=i
      exit for
    end if
  next
  finduser=reval
end function
%>

<script language='javascript'>
parent.comm=new Array('<% =dispstr %>');
parent.writecomm();</script>
<meta http-equiv="refresh" content="60; URL=../refresh.asp?room=<% =room %>&user=<% =user %>">
收藏】 【评论】 【推荐】 【投稿】 【打印】 【关闭
发表评论
要记得去论坛讨论,点击注册新会员匿名评论
评论内容:不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
阅读排行
随机推荐
实用信息推荐