%Server.ScriptTimeout=300 fc=Trim(Request.QueryString("fc")) '显示字体颜色 if fc="" then fc="ffffff" bg=Trim(Request.QueryString("bg")) '显示背景颜色 if fc="" then fc="FFFF00" if bg="" then bg="000000" bc=Trim(Request.QueryString("bc")) '显示body颜色 if fc="" then fc="FFFF00" if bc="" then bc="ADD5FE" sername=Request.ServerVariables("SERVER_NAME") scrname=Request.ServerVariables("SCRIPT_NAME") Response.Write "document.write(" & chr(34) & "
" & chr(34) & ");" '计数器的外观 countfile=Server.Mappath("count.txt") Set fs=CreateObject("Scripting.FileSystemObject") if fs.FileExists(countfile)=False then Response.Write "document.ce_counter.countshow.value='错误:ID 未注册'" Response.End end if n=Year(date()) y=Month(date()) r=Day(date()) s=Hour(time()) f=Minute(time()) m=Second(time()) 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 sj = n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m Set thisfile=fs.OpenTextFile(countfile,1,False) dim ly() countly=0 do while not thisfile.AtEndOfStream thisline = thisfile.readline Redim preserve ly(countly) ly(countly) = thisline countly = countly + 1 loop thisfile.close 'sameip=0 'change=0 'if Request.ServerVariables("REMOTE_ADDR")=ly(9) and DateDiff("n",ly(10),sj)<10 then sameip=1 'if sameip=0 then ly(7)=ly(7)+1 if DateDiff("d",ly(10),sj)<>0 then ly(8)=1 else ly(8)=ly(8)+1 end if 'change=1 'end if 'if change=1 then set outfile=fs.CreateTextFile(countfile) for i=0 to 8 outfile.WriteLine ly(i) next outfile.WriteLine Request.ServerVariables("REMOTE_ADDR") outfile.WriteLine sj outfile.Close 'end if Response.Write "s=new Array(2);" Response.Write "s[0]='共第" & ly(7) & " 位';" 'Response.Write "s[1]='自 " & left(ly(4),10) & " 起';" 'Response.Write "s[2]='已统计 " & DateDiff("d",ly(4),sj)+1 & " 天';" Response.Write "s[1]='今日第 " & ly(8) & " 位';" 'Response.Write "s[2]='中国企业网';" 'Response.Write "s[3]='';" Response.Write "var id, p=0;" Response.Write "function show()" Response.Write "{" Response.Write "document.ce_counter.countshow.value=s[p];" Response.Write "p=p+1;" Response.Write "if (p>1){" Response.Write "p=0;" Response.Write "}" Response.Write "id=setTimeout('show()', 3000);" Response.Write "}" Response.Write "show();" %>