开发者网络 动网主机 支持论坛 邮局 帮助
当前位置:网络学院ASP技术客户端相关 → 用ASP实现免费计数器提供-1
用ASP实现免费计数器提供-1
日期:2000年9月15日 作者: 人气:     [ ]
要实现免费提供计数器,我们必须准备代表0-9这10个数字的gif图片,便依次命名为0.gif-9.gif.在主页目录下建立一个目
录free,把图片文件counter.asp,user.html,reg.asp,manage.asp,dele.asp,easpcount.asp放在free目录下.  
1.存放用户数据的记数文件counter.asp  
<%Response.Write "拒绝访问!" : Response.end%>  

2.用户申请程序:user.html  

<html><title>计数器申请</title>  

<body style="background-color:#f7f7fb">  

<form name="formname" action="reg.asp" method=post >  

<p align="center" style="font-size:24pt;font-weight:bold;color:#800000">计数器申请</p>  

<table border="0" cellspacing="0" width="300" style="font-size:10pt">  

<tr><td align="left">用户名称:<input type="text" size="30" name="name"></td></tr>  

<tr><td align="left">用户密码:<input type="password" size="30" name="pass"></td></tr>  

<tr><td align="left">主页名称:<input type="text" size="30" name="homename"></td></tr>  

<tr><td align="left">主页地址:<input type="text" size="30" name="url" ></td> </tr>  

<tr><td align="left">  

<input type="submit" value="完 成">  <input type="reset" value="取 消">  

</td></tr></table></form></body>  
3.处理用户申请程序reg.asp  
<%  
Response.Expires=0  
dim input()  
name = Request.Form("name")  
pass = Request.Form("pass")  
homename = Request.Form("homename")  
url = Request.Form("url")  
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  
for i=0 to counter-1  
if name=input(i) then  
Response.write "<body bgcolor=#f7f7fb><p> <p align='center'>对不起,已有这个用户名</p>"  
Response.write "<p align='center'><a href='javascript:history.go(-1);'>点击这里进行修改</a></p></body>"  
Response.end  
exit for  
end if  
next  
Set outfile = fs.CreateTextFile(infile)  
outfile.WriteLine input(0)  
outfile.WriteLine name  
outfile.WriteLine pass  
outfile.WriteLine homename  
outfile.WriteLine url  
outfile.WriteLine 0  
for i=1 to counter-1  
outfile.WriteLine input(i)  
next  
outfile.close  
set fs=nothing  
strs="<script src=http://gp/wwwroot/free/easpcount.asp?id="&name&"></script>"  
'src中"http://gp/wwwroot/"为你的主页空间主目录  
Response.write "<body bgcolor=#f7f7fb><p> <p align='center'><font style='color:red'>"&name&"</font> 你已申
请成功,请将以下代码粘贴到你的网页代码中</p>"  
Response.write "<p align='center' style='color:#800000'>"&server.htmlencode(strs)&"</p>"  
Response.end  
%>  
---------------------------------------------------  
writen by aspboy and powered by http://easp.126.com  

(出处:)

相关文章:
 
·SQL Server 2000 SP4发布
·Sql Server 2005最新CTP简介及截图
·微软发布数据库新测试版 最终版明夏登场
·网络社区论坛即将成为互联网下一热点
·SET NOCOUNT的用法和注意事项
·全正则的检测IP是否合法的函数
·判断一个access数据库中某个表是否存在的方法
·用Asp生成条形码
·数字小写到英文大写的转换
·在不支持FSO的服务器上使用XMLDOM创建HTML文件
相关软件:
 
·拓域会员核心系统 v1.02
·深博贴吧(仿百度)双数据库版 v1.5
·通用草稿自动保存系统SipoAutoSaver v2.0
·BJXSHOP网上开店专家 v6.0 SP1 Build 20060118
·企业网站智能管理系统(TZIMS) v1.5
·bzmtv v1.0 正式版
·宜兴二级域名申请系统SQL版
·Mslove交友系统 v3.0
·亿人通讯录 v3.0
·深博贴吧(仿百度)双数据库版 v1.0
说明:本站部分内容收集于网络,如有侵犯您的权益请来信告知,我们会第一时间进行处理,谢谢
 → 特别推荐
 → 热点TOP10

关于本站 | 诚聘英才 | 业务合作 | 联系我们 | 广告合作 | 收藏本站

海口动网先锋网络科技有限公司版权所有
Copyright ? 2000 - 2003 AspSky.Net
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077