📄 sendmail.asp
字号:
Gu_SendmailAddressFrom=SM_SendmailAddressFrom
end if
if SendmailName<>"" then
Gu_SendmailName=SendmailName
else
Gu_SendmailName=SM_SendmailName
end if
if SendmailBodyModify="0" then
Gu_SendmailBodyText=ArticleContent
else
Gu_SendmailBodyText=SM_SendmailBodyText
end if
dim GuMail
Set GuMail=Server.CreateObject("JMail.Message")
GuMail.silent=true
GuMail.Logging=true
GuMail.Charset="gb2312"
GuMail.ContentType="text/html"
GuMail.Priority=3
GuMail.MailServerUserName=GuSMTPUsername
GuMail.MailServerPassword=GuSMTPPassword
GuMail.From=Gu_SendmailAddressFrom
GuMail.FromName=Gu_SendmailName
GuMail.AddRecipient(Gu_SendmailAddressTo)
GuMail.Subject=Gu_SendmailSubject
GuMail.Body=Gu_SendmailBodyText&Gu_SendmailBodyOther
GuMail.Send(GuSMTPServer)
set GuMail=Nothing
Response.write "<center><table border=""0"" cellpadding=""0"" cellspacing=""1"" width=""558"" height=""80"" class=""T_BGColor_2""><tr><td class=""T_TD_BGColor_2_2"" align=""""> <img src=""Style/"&WebSiteStyle&"/Title_09.gif"" width=""60"" height=""60"" border=""0"" align=""absmiddle""> <font class=""BlueS12"">发送文章已提交成功,感谢你使用文章发送系统</font></td></tr></table></center>"
end if
end if
Response.write "<center><table border=""0"" width=""558"" height=""6""><tr><td></td></tr></table></center>"
end if
if SendmailAllow="1" then
if Trim(Request.QueryString("ID"))<>"" then
dim rsSM2,SortID,AsSortID,GuResourceID,GuResourceName,GuResourceNameColor,GuResourceContent
set rsSM2=Server.CreateObject("Adodb.RecordSet")
GuSQL="select Ar_SortID,Ar_AsSortID,Ar_Name,Ar_NameColor,Ar_Content from "&GuTablePrefix&"_Article where Ar_UserPublish='0' and Ar_ID="&Trim(Request.QueryString("ID"))
rsSM2.open GuSQL,GuConn,1,1
if rsSM2.eof and rsSM2.bof then
Response.write "<center><table border=""0"" cellpadding=""0"" cellspacing=""1"" width=""558"" height=""80"" class=""T_BGColor_2""><tr><td class=""T_TD_BGColor_2_2"" align=""center""><img src=""Style/"&WebSiteStyle&"/Title_07.gif"" width=""60"" height=""60"" border=""0"" align=""absmiddle""> <font class=""MaroonS12"">数据获取失败,没有找到相关文章</font></td></tr></table></center><br><br>"
else
SortID=rsSM2("Ar_SortID")
AsSortID=rsSM2("Ar_AsSortID")
GuResourceID=Request.QueryString("ID")
GuResourceName=rsSM2("Ar_Name")
GuResourceNameColor=rsSM2("Ar_NameColor")
GuResourceContent=rsSM2("Ar_Content")
' GuResourceContent=Replace(GuResourceContent,"src="&UploadPictureFolder0&"","img src="&WebSiteURL&""&UploadPictureFolder0&"")
' GuResourceContent=Replace(GuResourceContent,"src="""&UploadPictureFolder0&"","img src="""&WebSiteURL&""&UploadPictureFolder0&"")
' GuResourceContent=Server.HTMLEncode(GuResourceContent)
GuResourceContent=GuHTMLCodeFilter(GuResourceContent)
rsSM2.close
set rsSM2=Nothing
dim rsAr9,GuContentReplace0,GuContentReplace1,GuContentReplace2,iCR
set rsAr9=Server.CreateObject("Adodb.RecordSet")
GuSQL="select * from "&GuTablePrefix&"_Config where Co_ID=1"
rsAr9.open GuSQL,GuConn,1,1
if not(rsAr9.eof and rsAr9.bof) then
GuContentReplace0=rsAr9("Co_GuContentReplace0")
end if
rsAr9.close
set rsAr9=Nothing
if GuContentReplace0<>"" then
GuContentReplace1=split(GuContentReplace0,vbCrLf)
for iCR=0 to ubound(GuContentReplace1)
if not GuContentReplace1(iCR)="" then
GuContentReplace2=split(GuContentReplace1(iCR),"=")
GuResourceContent=Replace(GuResourceContent,""&GuContentReplace2(0)&"",""&GuContentReplace2(1)&"")
else
GuResourceContent=GuResourceContent
end if
next
end if
%>
<table border="0" cellpadding="0" cellspacing="1" width="558" height="10" class="T_BGColor_2">
<form name="Sendmail" method="post" action="Sendmail.asp?ID=<%=GuResourceID%>" onSubmit="return Sendmail_Check();">
<tr>
<td width="80" height="28" class="T_TD_BGColor_2_1" align="center"><font class="BlackS12">文章标题</font></td>
<td width="475" height="28" class="T_TD_BGColor_2_1" colspan="2"> <a href="Article.asp?ID=<%=GuResourceID%>" style="color:<%=GuResourceNameColor%>" class="BlackV12"><%=GuResourceName%></a></td>
</tr>
<tr>
<td width="80" height="28" class="T_TD_BGColor_2_2" align="center"><font class="BlackS12">收 信 人</font></td>
<td width="270" height="28" class="T_TD_BGColor_2_2"> <input type="text" name="SM_SendmailAddressTo" style="width:252;" class="CSS_InputText" maxlength="100"></td>
<td width="204" height="28" class="T_TD_BGColor_2_2"> <span id="JS_M_SendmailAddressTo" class="BlackS12">填写收信人邮箱地址</span></td>
</tr>
<tr>
<td width="80" height="28" class="T_TD_BGColor_2_2" align="center"><font class="BlackS12">邮件主题</font></td>
<td width="270" height="28" class="T_TD_BGColor_2_2"> <input type="text" name="SM_SendmailSubject" style="width:252;" class="CSS_InputText" maxlength="100" value="<%if SendmailSubject<>"" then Response.write SendmailSubject else Response.write GuResourceName end if%>"<%if SendmailSubjectModify="0" then Response.write" readonly" end if%>></td>
<td width="204" height="28" class="T_TD_BGColor_2_2"> <span id="JS_M_SendmailSubject" class="BlackS12">填写邮件主题</span></td>
</tr>
<tr>
<td width="80" height="28" class="T_TD_BGColor_2_2" align="center"><font class="BlackS12">发 信 人</font></td>
<td width="270" height="28" class="T_TD_BGColor_2_2"> <input type="text" name="SM_SendmailAddressFrom" style="width:252;" class="CSS_InputText" maxlength="100" value="<%if SendmailAddressFrom<>"" then Response.write SendmailAddressFrom end if%>"<%if SendmailAddressFromModify="0" then Response.write" readonly" end if%>></td>
<td width="204" height="28" class="T_TD_BGColor_2_2"> <span id="JS_M_SendmailAddressFrom" class="BlackS12">填写发信人邮箱地址</span></td>
</tr>
<tr>
<td width="80" height="28" class="T_TD_BGColor_2_2" align="center"><font class="BlackS12">邮件签名</font></td>
<td width="270" height="28" class="T_TD_BGColor_2_2"> <input type="text" name="SM_SendmailName" style="width:252;" class="CSS_InputText" maxlength="100" value="<%if SendmailName<>"" then Response.write SendmailName end if%>"<%if SendmailNameModify="0" then Response.write" readonly" end if%>></td>
<td width="204" height="28" class="T_TD_BGColor_2_2"> <font class="BlackS12">填写邮件签名</font></td>
</tr>
<tr>
<td width="80" height="88" class="T_TD_BGColor_2_2" valign="top"><table border="0" width="100%" height="10" cellspacing="0" cellpadding="0"><tr><td height="26" align="center"><font class="BlackS12">邮件正文</font></td></tr><tr><td height="1" class="T_BGColor_2"></td></tr></table></td>
<td width="270" height="88" class="T_TD_BGColor_2_2"> <textarea name="SM_SendmailBodyText" cols="1" rows="1" onKeyDown="GuTextareaLenCheck(document.Sendmail.SM_SendmailBodyText,document.Sendmail.GuTextareaLenInput,<%=SendmailContentKB%>)" onKeyUp="GuTextareaLenCheck(document.Sendmail.SM_SendmailBodyText,document.Sendmail.GuTextareaLenInput,<%=SendmailContentKB%>)" class="CSS_TextArea" style="width:252;height:78;"<%if SendmailBodyModify="0" then Response.write" readonly" end if%>><%=GuResourceContent%></textarea></td>
<td width="204" height="88" class="T_TD_BGColor_2_2" align="center"><table border="0" width="96%" height="10"><tr><td height="58"></td></tr><tr><td height="20"><input type="text" name="GuTextareaLenInput" value="<%=SendmailContentKB%>" class="CSS_InputText" style="width:60;text-align:right;" readonly> <span id="JS_M_SendmailBodyText" class="BlackS12"></span></td></tr></table></td>
</tr>
<%if SendmailValidationCode="1" then%>
<tr>
<td width="80" height="28" class="T_TD_BGColor_2_2" align="center"><font class="BlackS12">验 证 码</font></td>
<td width="270" height="28" class="T_TD_BGColor_2_2"> <input type="text" name="GuValidationCodeInput" class="CSS_InputText" style="width:60;" maxlength="6"> <img src="Include/ValidationCode.asp" style="cursor:pointer;width:46;height:12" onclick="this.src='Include/ValidationCode.asp?'+Math.random()" title="刷新验证码"></td>
<td width="204" height="28" class="T_TD_BGColor_2_2"> <font class="BlackS12">填写验证码,单击验证码即刷新</font></td>
</tr>
<%end if%>
<tr>
<td width="80" height="38" class="T_TD_BGColor_2_2" align="center"><input type="hidden" name="GuComm" size="1" value="Sendmail"><input type="hidden" name="GuResourceID" size="1" value="<%=GuResourceID%>"></td>
<td width="475" height="38" class="T_TD_BGColor_2_2" colspan="2"> <input type="submit" name="Submit" value="" class="Button_OK"> <input type="reset" value="" name="reset" class="Button_Reset"></td>
</tr>
</form>
</table>
<br>
<%
if SendmailNoteShow="1" then
dim rsSM8
set rsSM8=Server.CreateObject("Adodb.RecordSet")
GuSQL="select * from "&GuTablePrefix&"_Config where Co_ID=1"
rsSM8.open GuSQL,GuConn,1,1
if not(rsSM8.eof and rsSM8.bof) then
%>
<table border="0" cellpadding="0" cellspacing="1" width="558" height="10" class="T_BGColor_2">
<tr>
<td width="80" height="28" class="T_TD_BGColor_2_2" valign="top"><table border="0" width="100%" height="10" cellspacing="0" cellpadding="0"><tr><td height="26" align="center"><font class="BlackS12">发送说明</font></td></tr><tr><td height="1" class="T_BGColor_2"></td></tr></table></td>
<td width="475" height="28" class="T_TD_BGColor_2_2" align="center" valign="top"><table border="0" width="97%" height="10" cellspacing="0" cellpadding="0"><tr><td height="8"></td></tr><tr><td height="10"><font class="BlackS12"><%=rsSM8("Co_SendmailNoteText")%></font></td></tr><tr><td height="6"></td></tr></table></td>
</tr>
</table>
<br>
<%
end if
rsSM8.close
set rsSM8=Nothing
end if
end if
else
Response.write "<table border=""0"" cellpadding=""0"" cellspacing=""1"" width=""558"" height=""80"" class=""T_BGColor_2""><tr><td class=""T_TD_BGColor_2_2"" align=""center""><img src=""Style/"&WebSiteStyle&"/Title_07.gif"" width=""60"" height=""60"" border=""0"" align=""absmiddle""> <font class=""MaroonS12"">数据获取失败,没有找到相关数据</font></td></tr></table><br><br>"
end if
else
Response.write "<table border=""0"" cellpadding=""0"" cellspacing=""1"" width=""558"" height=""80"" class=""T_BGColor_2""><tr><td class=""T_TD_BGColor_2_2"" align=""center""><img src=""Style/"&WebSiteStyle&"/Title_07.gif"" width=""60"" height=""60"" border=""0"" align=""absmiddle""> <font class=""MaroonS12"">抱歉,发送文章功能已关闭,请联系网站管理员</font></td></tr></table><br><br>"
end if
%></td>
</tr>
</table></td>
</tr>
</table>
</center>
<!--#include file="Include/Bottom.asp"-->
</body>
</html>
<%CloseDatabase%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -