<!--#include file="inc/conn.asp"-->
<%
dim id,username,nm
id=trim(request("id"))
nm=Request.form("nm")
username=request("username")
et=request("et")
mdz=request("mdz")
mbt=request("mbt")
s1=request("neirong")
if Request.form("r1")="1" then
response.redirect "x_m.asp?cnmai=chk&id="&id&"&nam="&username&"&mdz="&mdz&"&et="&et&"&mbt="&escape(mbt)&"&s1="&escape(s1)&""
response.end
else



if not isnumeric(id) or id="" then
response.write "<li>参数错误！"
cl
response.end
end if
if nm="on" then
call cnmai()
else if request.cookies("cnmai")("username")="" or request.cookies("cnmai")("domain")="" or request.cookies("cnmai")("id")="" then 
response.write "<br>"
response.write "<li>你还没有登陆！"
response.write "<meta http-equiv=refresh content=""2;URL=login.asp"">"
response.end
    else 
    if request("cnmai")="chk" then
    call cnmai()
    response.end
    end if
    end if
end if
end if
%>

<%
sub cnmai()
dim rs,sql,neirong
if len(trim(request("neirong")))<2 then
response.write "<li>回复内容没有填写！"
cl
response.end
end if
set rs=server.createobject("adodb.recordset")
sql = "select * from hf "
rs.open sql,conn,1,3
rs.addnew
rs("username")=request.cookies("cnmai")("username")
rs("neirong")=trim(request("neirong"))
rs("xxusername")=trim(request("xxusername"))
rs("xxid")=id
rs.update
rs.close
set rs=nothing
Conn.Execute("Update jle_xinxi Set hfcs=hfcs+1 where id="&cstr(id))
Conn.Execute("Update jle_xinxi Set fbsj=now() where id="&cstr(id))
closedb
response.write "<li>回复成功！"
cl
end sub
%>
<%sub cl()
response.write "<meta http-equiv=refresh content=""2;URL=x.asp?cnmai="&id&""">"
end sub%>