盾怪网教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

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

时间:2024/9/12作者:未知来源:盾怪网教程人气:

[摘要]5.easpcount.asp. <%Response.Expires=0 id=Request.QueryString("id") sername=Request.Ser...

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




Copyright © 2012-2018 盾怪网教程(http://www.dunguai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版