首页 新闻 论坛 群组 Blog 文档 下载 读书 Tag 网摘 搜索 .NET Java 游戏 视频 人才 外包 培训 数据库 书店 程序员
中国软件网
欢迎您:游客 | 登录 注册 帮助
  • 如何修改代码实现删除帖子里的部分回复?
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • lrxhlc
    • 等级:
    • 可用分等级:
    • 总技术分:
    • 总技术分排名:
    • 结帖率:
    发表于:2008-11-19 08:58:13 楼主
    <%@ Language=VBScript%>
    <%
    Response.Buffer=false
    Response.Expires=0
    %>
    <!-- #include file="./dsnroot.asp" -->
    <!-- #include file="./links.asp" -->
    <%
    set cn=Server.CreateObject("ADODB.Connection")
    set rs=Server.CreateObject("ADODB.Recordset")
    set rs1=Server.CreateObject("ADODB.Recordset")
    cn.Open mycnstr
    xx=1
    menu="0000100"
    id=Request.QueryString ("id")
    if id="" then
      id=0
      else
      id=cint(id)
    end if

    if id=0 then
    Response.Write (" <table width=778 align=center> <tr> <td bgcolor=dddddd height=500 width=100% align=center>参数错误!您没有选择要查看的话题 </td> </tr> </table>")
    Response.End
    end if
    if session("userflag")=1 and session("username") <>"" then
    sqltext="select flag from userls where enable=1 and username='"+session("username")+"' and flag=1"
    rs.Open sqltext,cn,1,1
    if not rs.EOF then
    adminqx=1
    else
    adminqx=0
    end if
    rs.Close
    elseif session("adminusername") <>"" then
    adminqx=1
    else
    adminqx=0
    end if
    sqltext="select top 1 classid,count from bbs where enable=1 and id="&id
    rs.Open sqltext,cn,1,2
    if not rs.EOF then
    rs("count")=rs("count")+1
    classid=rs("classid")
    rs.Update
    end if
    rs.Close
    if classid <>0 then
    sqltext="select id,title from bbs_class where enable=1 and id="&classid
    rs.Open sqltext,cn,1,1
    if not rs.EOF then
    class_titletxt=trim(rs("title"))
    end if
    rs.Close
    end if
    if flag=1 then
    if session("userflag") <>1 then
    err=1
    end if
    end if

    sqltext="select top 1 body from classes where enable=1 and id=55"
    rs.Open sqltext,cn,1,1
    if not rs.EOF then
    glstr=trim(rs("body"))
    end if     
    rs.Close

    function checkstr3(str,ins,n)
    if ins <>"" then
    Dim arr
    arr=split(ins,"|",-1,1)
    for i=0 to ubound(arr)
    str=replace(str,arr(i),"**",1,-1,1)
    next
    end if
    str=checkstr(str,1)
    checkstr3=str
    end function

    %>
    <!-- #include file="./func.inc" -->
    <!-- #include file="top.asp" -->


    .........

      <%end if
                rs.Close %>
                  <%sqltext="select * from bbs where enable=1 and pid="&id&" order by creatdate desc"
                  rs.Open sqltext,cn,1,1
                  do while not rs.EOF
              %>
                  <table width="95%" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#996600">
                    <tr> &nbsp;
                        <td class="font1" height="19">&nbsp;&nbsp; <font color="#000000"> <b> <font color="#FFFFFF">回复 </font> </b> </font> </td>
    <%if adminqx=1 then%>
     
                        <td class="font1"> <td align="right"> <A href='forum_details.asp?del= <%=rs("id")%>'> <font color="#FFFFFF">删除回复 </font> </a> </td>
                    </tr>
                  </table>
      <%end if%>
    30  修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • g125989100
    • 等级:
    • 可用分等级:
    • 总技术分:
    • 总技术分排名:
    发表于:2008-11-19 09:15:021楼 得分:0
    回复都在一个表里 根据id删除
    修改 删除 举报 引用 回复
    进入用户个人空间
    加为好友
    发送私信
    在线聊天
    • sy_binbin
    • 等级:
    • 可用分等级:
    • 总技术分:
    • 总技术分排名:
    • 3

    发表于:2008-11-19 12:01:552楼 得分:0
    部分??

    按照啥要求删除啊???
    修改 删除 举报 引用 回复

    网站简介广告服务网站地图帮助联系方式诚聘英才English 问题报告
    北京创新乐知广告有限公司 版权所有 京 ICP 证 070598 号
    世纪乐知(北京)网络技术有限公司 提供技术支持
    Copyright © 2000-2008, CSDN.NET, All Rights Reserved