<%@ LANGUAGE="VBSCRIPT" %> <% dim rs,sql dim boardtype dim boardid dim announceid dim username dim rootid dim topic dim mailbody dim email dim content dim postname dim incepts dim announce Rem ------获取参数(get or post的)------ Rem ------包括版面的ID和页次------ 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 if request("postname")="" then errmsg=errmsg+"
    "+"
  • 请输入您的姓名。
  • " founderr=true else postname=request("postname") end if if request("incept")="" then errmsg=errmsg+"
    "+"
  • 请输入收件人姓名。
  • " founderr=true else incepts=request("incept") end if if request("content")="" then errmsg=errmsg+"
    "+"
  • 邮件内容不能为空。
  • " founderr=true else content=request("content") end if if founderr then call error() else 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 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") topic="您的朋友"&postname&"给您发来了一个"&ForumName&"上的贴子" else foundErr = true ErrMsg=ErrMsg+"
    "+"
  • 您指定的贴子不存在
  • " exit sub end if rs.close mailbody=mailbody &"" mailbody=mailbody &"
    " mailbody=mailbody &""&incepts&",您好:

    " mailbody=mailbody &"您的朋友"&postname&"给您发来了一个"&ForumName&"--"&boardtype&"上的贴子

    " mailbody=mailbody &"标题是:"&htmlencode(topic)&"

    " mailbody=mailbody &""&htmlencode(content)&"

    " mailbody=mailbody &"您可以到"&topic&"这里浏览这个贴子
    " mailbody=mailbody &"

    "&ads2&"
    " mailbody=mailbody &""&Copyright&"  "&Version&"" mailbody=mailbody &"

    " ' response.write mailbody ' mailbody="" end sub sub pag() %> align=center>
    valign=middle colspan=2 align=center> 发送邮件给朋友
    valign=middle colspan=2> 通过邮件发送本帖子给您的朋友。 下列所有项必填,并请输入正确的邮件地址!
    你可以添加一些自己的信息在下面的内容框内。至于这个帖子的主题和 URL 你可以不必写,因为本程序会在发送的 Email 中自动添加的!
    >您的姓名: >
    >您朋友的名字: >
    >您朋友的 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 stats="发送页面" %>