www.gusucode.com > 盐城分类信息网asp源码程序 > admin/xinxi_editchk.asp
<!--#include file="conn.asp"--> <!--#include file="../err.asp"--> <!--#include file=cookies.asp--> <% function chkcnmai(char) if instr(char,"'") then response.write "错误字符!" response.end end if if instr(char,"|") then response.write "错误字符!" response.end end if if instr(char,"<") then response.write "错误字符!" response.end end if if instr(char,">") then response.write "错误字符!" response.end end if if instr(char,"&") then response.write "错误字符!" response.end end if if instr(char,"%") then response.write "错误字符!" response.end end if if instr(char,";") then response.write "错误字符!" response.end end if if instr(char,"$") then response.write "错误字符!" response.end end if end function dim rs,sql,class1,class2,biaoti,jiage,diqu,memo,username,userip,id,qq,dizhi,dianhua username=request.cookies("cnmai")("username") class1=trim(request("class1")) class2=trim(request("class2")) biaoti=trim(request("biaoti")) jiage=trim(request("jiage")) diqu=trim(request("diqu")) memo=trim(request("memo")) qq=trim(request("qq")) dianhua=trim(request("dianhua")) dizhi=trim(request("dizhi")) if class1="0" or class1="" then errcnmai(10) response.end end if if class2="0" or class2="" then errcnmai(11) response.end end if if biaoti="" then errcnmai(12) response.end end if chkcnmai(biaoti) if len(biaoti)>40 then errcnmai(21) response.end end if if memo="" then errcnmai(16) response.end end if if trim(request("name"))="" then errcnmai(17) response.end end if id=trim(request("id")) set rs=server.createobject("adodb.recordset") sql = "select * from xinxi where id="&cstr(id) rs.open sql,conn,1,3 if rs.eof then errcnmai(0) response.end end if rs("class1")=class1 rs("class2")=class2 rs("biaoti")=biaoti rs("leixing")=request("leixing") rs("jiage")=jiage rs("diqu")=diqu rs("memo")=memo rs("name")=trim(request("name")) rs("email")=trim(request("email")) rs("qq")=qq rs("dizhi")=dizhi rs("dianhua")=trim(request("dianhua")) rs.update rs.close set rs=nothing closedb response.write "<p align=""center"">修改<font color=ff0000>"&biaoti&"</font>成功!</p>" response.write "<meta http-equiv=refresh content=""1;URL=xinxi.asp"">" %>