<%
username=chkhtm(trim(Request("username")))
email=chkhtm(trim(Request("email")))
sex=chkhtm(trim(Request("sex")))
lb=chkhtm(trim(request("lb")))
title=chkhtm(trim(Request("title")))
content=chkhtm(trim(Request("content")))
bm=chkhtm(trim(request("bm")))
lyyzmm=trim(Request("lyyzmm"))
lyyzm=trim(Request("lyyzm"))
if lyyzmm<>"" and lyyzm<>"" then
if int(lyyzmm)<>int(lyyzm) then
Response.Write ""
Response.Write ""
Response.end
end if
end if
if username="" or email="" or sex="" or title="" or content="" or lb="" then
%>
<%
else
sh=chkhtm(trim(request("sh")))
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
Randomize
an= int((10-1+1) * RND +1)
if sex="男" then
tx="images/lylan-"&an&".gif"
else
tx="images/lynv-"&an&".gif"
end if
addtime=date()
content=replace(content,chr(13)," ")
conn.Execute "insert into [ly] ([adduser],[email],[sex],[tx],[title],[content],[ip],[addtime],[bm],[lb],[sh]) values('"&username&"','"&email&"','"&sex&"','"&tx&"','"&title&"','"&content&"','"&userip&"','"&addtime&"','"&bm&"','"&lb&"',"&sh&")"
conn.close:set conn=nothing
if sh=1 then
er=1
end if
Response.Redirect "ly.asp?er="&sh
end if
%>
<%
'rs.close:set rs=nothing
conn.close:set conn=nothing
%>