<%
dim webname,webemail,dizhi,biit,dianhua,copyright,weblogo,weburl,gonggao,zqq,qq1,qq2,qq3,gg1,gg2,gg3,gg4,gg5,gg6,gg7,gg8,gg1url,gg2url,gg3url,gg4url,gg5url,gg6url,gg7url,gg8url,rss
set rss=server.CreateObject("adodb.recordset")
rss.Open "select * from system",conn,1,1
webname=trim(rss("webname"))
webemail=trim(rss("webemail"))
dizhi=trim(rss("dizhi"))
dianhua=trim(rss("dianhua"))
copyright=trim(rss("copyright"))
weblogo=trim(rss("weblogo"))
weburl=trim(rss("weburl"))
gonggao=trim(rss("gonggao"))
qq1=trim(rss("qq1"))
qq2=trim(rss("qq2"))
qq3=trim(rss("qq3"))
gg1=trim(rss("gg1"))
gg2=trim(rss("gg2"))
gg3=trim(rss("gg3"))
gg4=trim(rss("gg4"))
gg5=trim(rss("gg5"))
gg6=trim(rss("gg6"))
gg7=trim(rss("gg7"))
gg8=trim(rss("gg8"))
gg1url=trim(rss("gg1url"))
gg2url=trim(rss("gg2url"))
gg3url=trim(rss("gg3url"))
gg4url=trim(rss("gg4url"))
gg5url=trim(rss("gg5url"))
gg6url=trim(rss("gg6url"))
gg7url=trim(rss("gg7url"))
gg8url=trim(rss("gg8url"))
zqq=trim(rss("zqq"))
rss.Close
set rss=nothing

Rem 过滤HTML代码
function HTMLEncode(fString)
if not isnull(fString) then
    fString = replace(fString, ">", "&gt;")
    fString = replace(fString, "<", "&lt;")

    fString = Replace(fString, CHR(32), "&nbsp;")
    fString = Replace(fString, CHR(9), "&nbsp;")
    fString = Replace(fString, CHR(34), "&quot;")
    fString = Replace(fString, CHR(39), "&#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 FormatTime(TestTime,style)
	Dim n,y,r,s,f,m
	n = Year(TestTime)
	y = Month(TestTime)
	r = Day(TestTime)
	s = Hour(TestTime)
	f = Minute(TestTime)
	m = Second(TestTime)
	if len(n) = 2 then n = "20" & n
	if len(y) = 1 then y = "0" & y
	if len(r) = 1 then r = "0" & r						
	if len(s) = 1 then s = "0" & s
	if len(f) = 1 then f = "0" & f
	if len(m) = 1 then m = "0" & m
	If style = 1 Then
		FormatTime = "<font color=""#FF0000"">"& n &"</font>年<font color=""#FF0000"">"& y &"</font>月<font color=""#FF0000"">"& r &"</font>日<font color=""#FF0000"">"& s &"</font>时"
	Elseif style = 2 Then
		FormatTime = r &"日 "& s & ":" & f & ":" & m
	Elseif style = 3 Then
		FormatTime = n &"年"& y &"月"& r &"日"
	Elseif style = 4 Then
		FormatTime = n & "/" & y & "/" & r
	Elseif style = 5 then
		FormatTime = n &"-"& y &"-"& r &"&nbsp;" & s & ":" & f
	Elseif style = 6 then
		FormatTime = n &"年"& y &"月"& r &"日" & s &":"& f
	Elseif style = 7 then
		FormatTime =  n & y & r & s & f & m
	Elseif style = 8 then
		FormatTime = n &"-"& y &"-"& r
	End if
End Function
%>