gusucode.com > 爱美尔女性商城源码 1.0源码程序 > webconfig.asp
<% dim webname,webemail,dizhi,youbian,dianhua,copyright,webbanner,weblogo,weburl,gonggao set rs=server.CreateObject("adodb.recordset") rs.Open "select webname,webemail,dizhi,youbian,dianhua,copyright,gonggao,weblogo,weburl,webbanner,keywords,description,qq,mailaddress from BJX_config",conn,1,1 webname=trim(rs("webname")) webemail=trim(rs("webemail")) dizhi=trim(rs("dizhi")) youbian=trim(rs("youbian")) dianhua=trim(rs("dianhua")) copyright=trim(rs("copyright")) weblogo=trim(rs("weblogo")) webbanner=trim(rs("webbanner")) weburl=trim(rs("weburl")) gonggao=trim(rs("gonggao")) keywords=trim(rs("keywords")) description1=trim(rs("description")) qq=trim(rs("qq")) mailaddress=trim(rs("mailaddress")) rs.Close set rs=nothing set rs=server.createobject("adodb.recordset") '显示信息 rs.open "select * from T_IndexPic where id=1",conn,1,1 if not rs.eof then title=rs("title") title1=rs("title1") title2=rs("title2") title3=rs("title3") Pic=rs("Pic") Pic1=rs("Pic1") Pic2=rs("Pic2") Pic3=rs("Pic3") Pic4=rs("Pic4") Pic5=rs("Pic5") Pic6=rs("Pic6") Pic7=rs("Pic7") Pic8=rs("Pic8") Pic9=rs("Pic9") Pic10=rs("Pic10") url=rs("url") url1=rs("url1") url2=rs("url2") url3=rs("url3") url4=rs("url4") url5=rs("url5") url6=rs("url6") url7=rs("url7") url8=rs("url8") url9=rs("url9") url10=rs("url10") end if if rs.state then rs.close set rs=nothing Rem 过滤HTML代码 function HTMLEncode(fString) if not isnull(fString) then fString = replace(fString, ">", ">") fString = replace(fString, "<", "<") fString = Replace(fString, CHR(32), " ") fString = Replace(fString, CHR(9), " ") fString = Replace(fString, CHR(34), """) fString = Replace(fString, CHR(39), "'") fString = Replace(fString, CHR(13), "") fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ") fString = Replace(fString, CHR(10), "<BR> ") 'fString=ChkBadWords(fString) HTMLEncode = fString else HTMLEncode=fstring end if end function Rem 过滤SQL非法字符 function checkStr(str) if isnull(str) then checkStr = "" exit function end if checkStr=replace(str,"'","''") end function Rem 判断数字是否整形 function isInteger(para) on error resume next dim str dim l,i if isNUll(para) then isInteger=false exit function end if str=cstr(para) if trim(str)="" then isInteger=false exit function end if l=len(str) for i=1 to l if mid(str,i,1)>"9" or mid(str,i,1)<"0" then isInteger=false exit function end if next isInteger=true if err.number<>0 then err.clear end function Function FilterHtml(str,strlen) Dim re Set re=new RegExp re.IgnoreCase =True re.Global=True re.Pattern="<(.[^>]*)>" str=re.Replace(str,"") set re=Nothing Dim l,t,c,i l=Len(str) t=0 For i=1 to l c=Abs(Asc(Mid(str,i,1))) If c>255 Then t=t+2 Else t=t+1 End If If t>=strlen Then cutStr=left(str,i)&"..." Exit For Else cutStr=str End If Next cutStr=Replace(cutStr,chr(10),"") cutStr=Replace(cutStr,chr(13),"") cutStr=Replace(cutStr," ","") FilterHTML= cutStr End Function %> <!--#include file="ParamChk.asp"-->