<!--#include file="Common/Inc_DatConn.asp"-->
<!--#include file="Common/Inc_Function.asp"-->
<%
mailcode=RtnReplaceInt(Request("mailcode"),0)
id=RtnReplaceInt(Request("id"),0)
strsubmit=Request("strsubmit")
if strsubmit="确定发布此信息" then
  set rdsvInfo = Server.CreateObject("ADODB.Recordset")
  sqlvInfo = "Select mailcode From Dat_Information Where State=0 and InfoKey = "&id
  rdsvInfo.Open sqlvInfo,Conn,1,1
  if not rdsvInfo.eof then
    dstrcode=rdsvInfo(0)
      	       rdsvInfo.Close
	       set rdsvInfo = nothing
  else
      Response.write("<script>alert(""信息不存在！"");location.href=""index.asp"";</script>")
      Response.end
  end if
      if md5(mailcode,16)<>dstrcode then
           Response.write("<script>alert(""验证码有误!"");location.href=""index.asp"";</script>")
           Response.end
      else
      conn.execute("Update Dat_Information Set State=1 Where InfoKey = ("&id&")")
      newcode=md5(cint(8899*Rnd+1000),16)
      conn.execute("Update Dat_Information Set mailcode="&newcode&" Where InfoKey = ("&id&")")
	       
                Response.write("<script>alert(""信息发布成功！"");location.href=""index.asp"";</script>")
                Response.end
       end if
       


else
call fy_Delinfogq(id)
      Response.write("<script>alert(""信息已经删除！"");location.href=""index.asp"";</script>")
      Response.end
end if
conn.close
set conn=nothing
%>