5.easpcount.asp. <%Response.Expires=0 id=Request.QueryString("id") sername=Request.ServerVariables("SERVER_NAME") scrname=Request.ServerVariables("SCRIPT_NAME") linkurl="http://" & sername & Left(scrname,(len(scrname)-9)) & "easpcount.asp?id=" &id infile = server.mappath("counter.asp") Set fs = CreateObject("Scripting.FileSystemObject") Set thisfile = fs.OpenTextFile(infile,1,False) counter = 0 do while not thisfile.AtEndOfStream thisline = thisfile.readline Redim preserve input(counter) input(counter) = thisline counter = counter + 1 loop thisfile.Close number=(counter-1)/5 x=0 Set outfile = fs.CreateTextFile(infile) application.lock outfile.WriteLine input(0) for i=1 to number outfile.WriteLine input((i-1)*5+1) outfile.WriteLine input((i-1)*5+2) outfile.WriteLine input((i-1)*5+3) outfile.WriteLine input((i-1)*5+4) if input((i-1)*5+1)=id then x=i outfile.WriteLine input((i-1)*5+5)+1 else outfile.WriteLine input((i-1)*5+5) end if next outfile.Close application.unlock set fs=nothing if x=0 then response.end count=cstr(input((x-1)*5+5)) countlen=len(count) for i=1 to 6-countlen linkurl="http://"&sername&Left(scrname,(len(scrname)-13))"/"&"0.gif" %><%=linkurl%> document.write('<img src="<%=linkurl%>">') <%=linkurl%> <%next for i=1 to countlen mdir=mid(count,i,1) linkurl="http://"&sername&Left(scrname,(len(scrname)-13))"/"&mdir&".gif" %> <%=linkurl%> document.write('<img src="<%=linkurl%>">') <% next %> (出处:热点网络)
|