<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!-- #include file="../inc/defendsql.asp" -->
<!-- #include file="../inc/conn.asp" -->
<!-- #include file="../inc/Nohtml.asp" -->
<!-- #include file="../inc/External.asp" -->

<%
if trim(session("validateCode")) <> trim(Request("txt_check")) then
ErrorMessage = "亲爱的，请输入正确的验证码哦？"
response.write(" <script>alert('"&ErrorMessage&"');history.go(-1);</script>")
response.end
end if

u_name=request.form("u_name")
us_url=request.form("u_url")
u_mail=request.form("u_mail")
u_con=request.form("u_content")
u_content=RemoveHTML(""&u_con&"",1000)

if u_name="" then
response.write "<Script language=JavaScript>alert('亲爱的，您还没有告诉我你的网站名称哦？');history.back();</Script>"
response.end 
end if

if u_mail="" then
response.write "<Script language=JavaScript>alert('亲爱的，你还没有告诉我你的邮箱呢？');history.back();</Script>"
response.end 
end if

if instr(u_mail,"@")<=0 or instr(u_mail,".")<=0 then
response.write "<Script language=JavaScript>alert('亲爱的，邮箱填写有错误，正确格式如：me@isea.so');history.back();</Script>"
response.end 
end if

if us_url="" then
response.write "<Script language=JavaScript>alert('亲爱的，你还没有告诉我你的网站地址呢？');history.back();</Script>"
response.end 
end if

if instr(us_url,".")<=0 then
response.write "<Script language=JavaScript>alert('亲爱的，网站地址错误，正确格式如：www.08296.com');history.back();</Script>"
response.end 
end if

if u_content="" then
response.write "<Script language=JavaScript>alert('亲爱的，为您的网站写点介绍吧？');history.back();</Script>"
response.end 
end if

if instr(u_content,"http://")>0 or instr(u_mail,"www")>0 then
response.write "<Script language=JavaScript>alert('您的信息已触发反垃圾系统，请检查修正后重新提交！');history.back();</Script>"
response.end 
end if

if u_name<>"" and u_mail<>"" and us_url<>"" and u_content<>"" then

if us_url ="" then
u_url=""
elseif instr(us_url,"http://")>0 then
u_url=us_url
else
u_url=trim("http://"&us_url)
end if

set rs=server.createobject("adodb.recordset")
sql="select * from web_link"
rs.open sql,conn,1,3
rs.addnew

rs("name")=""&u_name&""
rs("url")=""&u_url&""
rs("jieshao")=""&u_content&""
rs("image")=""&u_mail&""
rs("time")=now()
rs.update
rs.close
set rs=nothing
end if
response.write "<script>alert('恭喜，申请已成功提交，待站长审核通过后显示！');location.href='../Links'</script>"
%>
<!-- #include file="../inc/close.asp" -->