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

📄 cpbook_save.asp

📁 站完全依据SEO技术建立
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="sendmail.asp"-->
<%
if request("action")="reh" then
response.write"<meta http-equiv=""refresh"" content=""0;URL="&request("back")&".asp?id="&request("id")&"#view"">"
response.end
else
user=request("user")
lx=request("lx")
book=request("book")
book_id=request("book_id")
adcp=request("adcp")

cityping=split(cityping,"|")
for i=0 to UBound(cityping)
if instr(user,cityping(i)) or instr(lx,cityping(i)) or instr(book,cityping(i)) then
response.write"<script>alert('留言签写出错,下面是产生错误的可能原因:\n\n·在您的留言资料中含有敏感字符');history.go(-1);</script>"
response.end
end if
next
'=====================================
if adcp=1 then
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.open "select * from cp where id="&book_id&"",conn,1,1
yp_id=rs("yp_id")
rs.close
rs.open "select * from yp where id="&yp_id&"",conn,1,1
toname=rs("user")
tomail=rs("mail")
rs.close
set rs=nothing

else

Set rs=Server.CreateObject("Adodb.RecordSet")
rs.open "select * from sca where id="&book_id&"",conn,1,1
yp_id=rs("yp_id")
rs.close
rs.open "select * from yp where id="&yp_id&"",conn,1,1
toname=rs("user")
tomail=rs("mail")
rs.close
set rs=nothing
end if
'=====================================
Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from bookcp"
rs.open sql,conn,1,3
rs.addnew
rs("user")=user
rs("lx")=lx
rs("book_id")=book_id
rs("book")=book
rs("adcp")=adcp
rs("yp_id")=yp_id
rs.update
rs.close
set rs=nothing
'=====================================
if adcp=1 then
if citymailkey3=1 then
mailtitle=toname&" 有人对您的广告留言了!"
mailbody=toname&":"&vbcrlf&vbcrlf&"  "&book&vbcrlf&vbcrlf&"咨询人:"&user&vbcrlf&"联系方式:"&lx&vbcrlf&vbcrlf&"详情请登录:"&cityurl&"sca_view.asp?id="&book_id
sendmail
end if
else
if citymailkey2=1 then
mailtitle=toname&" 有人对您的产品留言了!"
mailbody=toname&":"&vbcrlf&vbcrlf&"  "&book&vbcrlf&vbcrlf&"咨询人:"&user&vbcrlf&"联系方式:"&lx&vbcrlf&vbcrlf&"详情请登录:"&cityurl&"cp_view.asp?id="&book_id
sendmail
end if
end if
'=====================================
response.redirect"cpbook_save.asp?action=reh&back="&request("back")&"&id="&book_id&""
end if
%>

⌨️ 快捷键说明

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