当前位置:萝卜系统下载站 > 技术开发教程 > 详细页面

用ASP完成免费计数器提供-3

用ASP完成免费计数器提供-3

更新时间:2022-07-18 文章作者:未知 信息来源:网络 阅读次数:


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
%>
(出处:热点网络)

温馨提示:喜欢本站的话,请收藏一下本站!

本类教程下载

系统下载排行

网站地图xml | 网站地图html