<%@ LANGUAGE="VBSCRIPT" %> <% rem ---------------------- rem ------主程序开始------ rem ---------------------- dim boardid dim announceid dim rootid dim topic dim url stats="论坛收藏夹" set rs=server.createobject("adodb.recordset") if membername="" then Errmsg=Errmsg+"
"+"
  • 您还没有登录。" Founderr=true end if if request("boardid")="" then founderr=true Errmsg=Errmsg+"
    "+"
  • 请指定论坛版面。" elseif not isInteger(request("boardid")) then founderr=true Errmsg=Errmsg+"
    "+"
  • 非法的版面参数。" else boardid=request("boardid") end if if request("id")="" then founderr=true Errmsg=Errmsg+"
    "+"
  • 请指定相关贴子。" elseif not isInteger(request("id")) then founderr=true Errmsg=Errmsg+"
    "+"
  • 非法的贴子参数。" else AnnounceID=request("id") end if if request("RootID")="" then founderr=true Errmsg=Errmsg+"
    "+"
  • 请指定相关贴子。" elseif not isInteger(request("RootID")) then founderr=true Errmsg=Errmsg+"
    "+"
  • 非法的贴子参数。" else RootID=request("RootID") end if call nav() call headline(1) if founderr then call Error() else url="dispbbs.asp?" url=url+"boardid="+boardid+"&rootid="+rootid+"&id="+announceid call chkurl() if founderr=true then call Error() else call favadd() if founderr=true then call Error() else call success() end if end if end if call endline() sub chkurl() sql="select topic,rootid,announceid,boardid from bbs1 where announceid="&cstr(announceid)&" and rootid="&cstr(rootid)&" and boardid="&cstr(boardid) rs.open sql,conn,1,1 if rs.eof and rs.bof then Errmsg=Errmsg+"
    "+"
  • 没有相关贴子。" Founderr=true else topic=rs("topic") end if rs.close end sub sub favadd() sql="select * from bookmark where url='"&trim(url)&"'" rs.open sql,conn,1,3 if not rs.eof and not rs.bof then Errmsg=Errmsg+"
    "+"
  • 该贴子已经在收藏夹中。" Founderr=true else rs.addnew rs("username")=membername rs("topic")=topic rs("url")=url rs("addtime")=Now() rs.update end if rs.close end sub sub success() %> align=center>
    >成功:帖子收藏
    >本帖子已经收入您在论坛的收藏夹

    > << 返回上一页
    <% end sub set rs=nothing rem ---------------------- rem ------主程序结束------ rem ---------------------- %>