⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p2radd_do.asp

📁 中文bux点击站源码。配合其他站点用
💻 ASP
字号:
<%@ LANGUAGE = VBScript %>
<!--#include file="conn.asp"-->

<!--#include file="checklogin.asp"-->

<%
  rs.Open "Select * From config",Conn
  MailSever = rs ("MailSever")
  MailUser = rs ("MailUser")
  MailPW = rs ("MailPW")
  EmailAddress = rs ("EmailAddress")
  rs.Close
  P2RName = Request ("P2RName")
  P2RLink = Request ("P2RLink")
  P2RType = Request ("P2RType")
  P2RTime = Request ("P2RTime")
  P2RValuation = Request ("P2RValuation")
  P2RVisit = Request ("P2RVisit")
  P2RLimit = Request ("P2RLimit")
  P2ROwner = Request ("P2ROwner")
  P2RValid = Request ("P2RValid")
  P2ROut = Request ("P2ROut")
  If P2RName = "" Then
     ConnClose
     Set Conn = nothing
     Session ("Message") = "您必须输入邮件广告名称。"
     Response.Redirect "error.asp"
     Response.End
  End If
  If P2RLink = "" Then
     Conn.Close
     Set Conn = nothing
     Session ("Message") = "您必须输入邮件广告连接。"
     Response.Redirect "error.asp"
     Response.End
  End If
  If P2RTime = "" Then
     Conn.Close
     Set Conn = nothing
     Session ("Message") = "您必须输入邮件广告时间。"
     Response.Redirect "error.asp"
     Response.End
  End If
  If P2RValuation = "" Then
     Conn.Close
     Set Conn = nothing
     Session ("Message") = "您必须输入邮件广告价值。"
     Response.Redirect "error.asp"
     Response.End
  End If
  If P2RLimit = "" Then
     Conn.Close
     Set Conn = nothing
     Session ("Message") = "您必须输入邮件广告点击限制。"
     Response.Redirect "error.asp"
     Response.End
  End If
  If P2RVisit = "" Then
     P2RVisit = 0
  End if
  If P2ROwner = "" Then
     P2ROwner = EmailAddress
  End if
  If P2RValid = "" Then
     P2RValid = True
  End if
  P2RName = "P2R_" & P2RName & ""
  rs.Open "Select * From p2r Where P2RName = '" & P2RName & "'",Conn
  If not Rs.Eof Then
     rs.Close
     Set rs = nothing
     Conn.Close
     Set Conn = nothing
     Session ("Message") = "同名邮件广告已经存在。"
     Response.redirect "error.asp"
     Response.End
  End if
  rs.Close
  rs.Open "Insert Into p2r(P2RName, P2RLink, P2RType, P2RTime, P2RValuation, P2RVisit, P2RLimit, P2ROwner, P2RValid) values('" & P2RName & "', '" & P2RLink & "', '" & P2RType & "', '" & P2RTime & "', '" & P2RValuation & "', '" & P2RVisit & "', '" & P2RLimit & "', '" & P2ROwner & "', " & P2RValid & ")",Conn
  re.Open "Alter Table member Add Column " & P2RName & " varchar(50) default None",Conn
  re.Open "Update member Set " & P2RName & " = 'None'",Conn
  MailSubject = "付费邮件"
  MailBody = "付费邮件内容开始<br>******************************************<br>付费邮件广告连接:<br><a href=http://" & DomainName & "/p2r.asp?P2RName=" & Request ("P2RName") & " target=_blank>" & Request ("P2RName") & "</a><br>******************************************<br>付费邮件内容结束<br><br>在" & SiteTitle & "做广告,广告费低廉,有保证的点击率和暴光率。有邮件、旗帜、文字链接等多种形式的广告。<br>订购广告:<a href=http://" & DomainName & "/advertise.asp target=_blank>http://" & DomainName & "/adver.asp</a>"
  MailFormat = "Html"
  MailPriority = "Normal"
  MailValid = True
  re.Open "Insert Into mailrecord(MailSubject, MailBody, MailFormat, MailPriority, MailValid) values('" & MailSubject & "', '" & MailBody & "', '" & MailFormat & "', '" & MailPriority & "', " & MailValid & ")",Conn
  
  Tmp = 0
  If P2ROut = "True" Then
  Server.ScriptTimeout = 9999
  rs.Open "Select Email From member Where Active = True And Valid = True And Vacation <> True order by ID",Conn
  While Not rs.EOF
  Tmp = Tmp + 1
  Email = rs ("Email")
  Set msg = Server.CreateObject("JMail.Message")
  msg.silent = true
  msg.Logging = true
  msg.Charset = "gb2312"
  msg.ContentType = "text/html"
  msg.MailServerUserName = "" & MailUser & ""
  msg.MailServerPassword = "" & MailPW & ""
  msg.From = "" & EmailAddress & ""
  msg.AddRecipient (Email)
  msg.Subject = "" & SiteTitle & MailSubject
  msg.Body = "您好,尊敬的" & SiteTitle & "会员:<br><br>这不是垃圾(SPAM)邮件,因为您是" & SiteTitle & "的会员,接受会员条款中关于阅读" & SiteTitle & "发送付费邮件的规定。如果您不希望再接收到此类邮件,请在会员区选择假期模式或者取消您自己的会员资格即可。<br><br>" & MailBody
  msg.Send ("" & MailSever & "")
  Set msg = nothing
  rs.MoveNext
  Wend
  End If
  
  Conn.Close
  Set Conn = nothing
  Session ("Message") = "站内付费邮件增加成功。同时发送了 " & Tmp & " 封站外付费邮件。"
  Response.redirect "success.asp"
  Response.End
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -