<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
<%
if Not ChkPost then 
response.redirect ("../../login/chklogin.asp?login=4")
response.end
end if

if session("id")="" then
response.Redirect("../../login/login1.asp")
response.end
end if

title=Replace_Text(request.form("messageTitle"))
content=Replace_Text(request.form("messageContent"))
sendemail=Replace_Text(request.form("sendemail"))
saveSendMessage=Replace_Text(request.form("saveSendMessage"))
sendContact=Replace_Text(request.form("sendContact"))
mycid=Replace_Text(request.form("mycid"))

if saveSendMessage<>"" then
set rs1=server.createobject("adodb.recordset")
sql1="select * from getprice1 where (id is null)" 
rs1.open sql1,conn,1,3
rs1.addnew
rs1("title")=title
rs1("content")=content

if sendemail<>"" then rs1("sendemail")=1

if needtrust<>"" then rs1("needtrust")=1

if sendContact<>"" then rs1("sendcontact")=1

if checkdate<>"" then 
rs1("checkdate")=1
rs1("limitedtime")=start_year&"年"&start_month&"月"&start_day
end if
rs1("requestinfo")=requestinfo
rs1("mycid")=mycid
rs1("sendcid")=session("id")
rs1("datetime")=now()
rs1.update
end if

set rs=server.createobject("adodb.recordset")
sql="select * from getprice where (id is null)" 
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("content")=content

if sendemail<>"" then rs("sendemail")=1

if needtrust<>"" then rs("needtrust")=1

if sendContact<>"" then rs("sendcontact")=1

if checkdate<>"" then 
rs("checkdate")=1
rs("limitedtime")=start_year&"年"&start_month&"月"&start_day
end if
rs("requestinfo")=requestinfo
rs("mycid")=mycid
rs("sendcid")=session("id")
rs("datetime")=now()
if saveSendMessage<>"" then 
rs("getprice1id")=rs1("id")
rs1.close
set rs1=noting
end if
rs.update

rs.close
set rs=noting

conn.close
set conn=nothing
%>
<%
if sendemail<>"" then
email="webmaster@shangji.cn"
topic="你好！"
mailbody="测试！"
sendjmail email,topic,mailbody
end if
'If SendJmail(email,Topic,MailBody) = 1 Then
'	Response.Write "<br/><br/>资料成功发送到您的注册邮箱！"
'Else
'	Response.Write "<br/><br/>未正确设置邮件发送或您填写的邮件地址有误，资料发送失败！"
'End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>操作成功</title>
<link href="../../images/css.css" rel="stylesheet" type="text/css">
<meta HTTP-EQUIV=refresh Content='1;url=receivemessagelist.asp'>
</head>
<table border="0" cellspacing="0" width="100%" cellpadding="0" height="418" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="100%" height="418" valign="middle" align="center">
<b>恭喜您，回复留言已发送成功！<a href="receivemessagelist.asp">返回</a></b></td>
</tr>
</table>
</body>
</html>