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
%>
用ASP实现免费计数器提供-3
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 用ASP实现免费计数器提供-3
相关推荐
- 暂无文章
