<%@ LANGUAGE="VBSCRIPT" %> <% dim rs,sql dim boardtype dim boardid dim announceid dim username dim rootid dim topic dim mailbody dim email dim announce stats="打包邮递" call chkInput() set rs=server.createobject("adodb.recordset") call nav() call headline(1) if foundErr then call Error() else call showPage() end if call endline() sub showPage() 'on error resume next if foundErr then call Error() else if request("action")="sendmail" then if IsValidEmail(trim(Request.Form("mail")))=false then errmsg=errmsg+"
"+"
  • 您的Email有错误!
  • " founderr=true else email=trim(Request.Form("mail")) end if call announceinfo() if founderr then call Error() else if EmailFlag=0 then errmsg=errmsg+"
    "+"
  • 本论坛不支持发送邮件。
  • " founderr=true call error() elseif EmailFlag=1 then call jmail(email) call success() elseif EmailFlag=2 then call Cdonts(email) call success() elseif EmailFlag=3 then call aspemail(email) call success() end if end if else call pag() end if end if if err.number<>0 then err.clear end sub sub announceinfo() sql="select boardtype from board where boardID="&BoardID rs.open sql,conn,1,1 if not(rs.bof and rs.eof) then boardtype=rs("boardtype") else foundErr = true ErrMsg=ErrMsg+"
    "+"
  • 您指定的论坛版面不存在
  • " exit sub end if rs.close 'Rs.open "Select topic from bbs1 Where announceID="&AnnounceID&"",conn,1,1 set rs=conn.execute("select topic from bbs1 where announceID="&rootID&"") if not(rs.bof and rs.eof) then topic=rs("topic") else foundErr = true ErrMsg=ErrMsg+"
    "+"
  • 您指定的贴子不存在
  • " exit sub end if rs.close mailbody=mailbody &"" mailbody=mailbody &"" mailbody=mailbody &"
    " mailbody=mailbody &"-  "&ForumName&"  ("&HostURL&""&ForumURL&"index.asp)
    " mailbody=mailbody &"--  "&boardtype&"  ("&HostURL&""&ForumURL&"bbs.asp?boardid="&boardid&")
    " mailbody=mailbody &"----  "&htmlencode(topic)&"  ("&HostURL&""&ForumURL&"dispbbs.asp?boardid="&boardid&"&rootid="&rootid&"&id="&announceid&")" mailbody=mailbody &"


    " Rs.open "Select UserName,Topic,dateandtime,body from bbs1 where boardid="&boardid&" and rootid="&rootid&" order by announceid",conn,1,1 do while not rs.eof announce=announce &"" announce=announce &"
    " announce=announce &"--  作者:"&rs("username")&"
    " announce=announce &"--  发布时间:"&rs("dateandtime")&"

    " announce=announce &"--  "&htmlencode(rs("topic"))&"
    " announce=announce &""&ubbcode(rs("body"))&"" announce=announce &"
    " rs.movenext loop rs.close mailbody=mailbody+announce mailbody=mailbody &"

    "&ads2&"
    " mailbody=mailbody &""&Copyright&"  "&Version&"" ' response.write mailbody ' mailbody="" end sub sub pag() %> align=center>
    valign=middle colspan=2 align=center> 打包邮递
    valign=middle colspan=2> 把本帖打包邮递。
    请正确输入你要邮递的邮件地址!
    >邮递的 Email 地址: >
    align=center>
    <% end sub sub chkInput 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 end sub sub success() %> align=center>
    >成功:打包邮递
    >恭喜您,您的打包邮递发送成功。
    > << 返回上一页
    <% end sub set rs=nothing %>