<% '========================================================= ' File: sendpage.asp ' Version:5.0 ' Date: 2002-9-10 ' Script Written by satan '========================================================= ' Copyright (C) 2001,2002 AspSky.Net. All rights reserved. ' Web: http://www.aspsky.net,http://www.dvbbs.net ' Email: info@aspsky.net,eway@aspsky.net '========================================================= dim announceid dim username dim rootid dim topic dim mailbody dim email dim content dim postname dim incepts dim announce dim sendmail stats="发送帖子" if Cint(GroupSetting(15))=0 then Errmsg=Errmsg+"
"+"
  • 您没有将本页面发送的权限,请登陆或者同管理员联系。" founderr=true 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 founderr then call nav() call head_var(2,0,"","") call dvbbs_error() else call nav() call head_var(1,BoardDepth,0,0) 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 dvbbs_error() else call announceinfo() if founderr then dvbbs_error() else if Forum_Setting(2)=0 then errmsg=errmsg+"
    "+"
  • 本论坛不支持发送邮件。
  • " founderr=true call dvbbs_error() elseif Forum_Setting(2)=1 then call jmail(email,topic,mailbody) sucmsg="恭喜您,您的页面发送成功!" call dvbbs_suc() elseif Forum_Setting(2)=2 then call Cdonts(email,topic,mailbody) sucmsg="恭喜您,您的页面发送成功!" call dvbbs_suc() elseif Forum_Setting(2)=3 then call aspemail(email,topic,mailbody) sucmsg="恭喜您,您的页面发送成功!" call dvbbs_suc() end if end if end if else call pag() end if call activeonline() end if call footer() sub announceinfo() set rs=server.createobject("adodb.recordset") set rs=conn.execute("select title from topic where topicID="&AnnounceID) if not(rs.bof and rs.eof) then topic="您的朋友"&postname&"给您发来了一个"&Forum_info(0)&"上的贴子" else foundErr = true ErrMsg=ErrMsg+"
    "+"
  • 您指定的贴子不存在
  • " exit sub end if rs.close set rs=nothing mailbody=mailbody &"" mailbody=mailbody &"
    " mailbody=mailbody &""&incepts&",您好:

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

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

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

    " mailbody=mailbody &"您可以到"&topic&"这里浏览这个贴子
    " mailbody=mailbody &""&Copyright&"  "&Version&"" mailbody=mailbody &"
    " ' response.write mailbody ' mailbody="" end sub sub pag() %>
    发送邮件给朋友
    通过邮件发送本帖子给您的朋友。 下列所有项必填,并请输入正确的邮件地址!
    你可以添加一些自己的信息在下面的内容框内。至于这个帖子的主题和 URL 你可以不必写,因为本程序会在发送的 Email 中自动添加的!
    您的姓名:
    您朋友的名字:
    您朋友的 Email:
    消息内容:
    <%end sub%>