动网论坛,站长建站首选,国内使用量最多的论坛软件 动网论坛官方技术讨论区 站长工具 申请属于您自己的免费论坛
首页 | 新闻资讯 | 网站运营 | 网络编程 | 数据库 | 服务器 | 网页设计 | 图像媒体 | 网络应用 | 搜索优化 | 资源下载 | 动网主机 | DVBOX
    本站内  互联网 ASP论坛  ASP.Net论坛  PHP论坛
   Asp → 阅读文章

 用ASP实现免费计数器提供-2

作者来源: 
阅读 3057 人次 , 2000-9-15 

4.用户管理程序  
<%Response.Expires=0  
dim input()  
thisfile = server.mappath("counter.asp")  
Set fs = CreateObject("Scripting.FileSystemObject")  
Set thisfile = fs.OpenTextFile(thisfile,1,False)  
count = 0  
do while not thisfile.AtEndOfStream  
thisline = thisfile.readline  
Redim preserve input(count)  
input(count) = thisline  
count = count + 1  
loop  
thisfile.Close  
number=(count-1)/5  
set fs=nothing  
%>  
<html>  
<title>计数器管理系统</title>  
<body>  
<p align="center"><font style="font-size: 20pt">计数器管理系统</font></p>  
<p align="center">目前保留用户 <%=number%>个</p>  
<table width="760">  
<tr>  
<td width="100" ><font color="#FF00FF">编号</font></td>  
<td width="200"><font color="#FF00FF">用户名</font></td>  
<td width="360" ><font color="#FF00FF">网站名</font></td>  
<td width="100" ><font color="#FF00FF">删除</font></td>  
</tr>  
<%x=""  
for i=1 to number  
x=input((i-1)*5+1)  
Response.Write "<tr><td width='100'><font color=#00ffFF>" &i & "</font>"  
Response.Write "<td width=200 ><font color=#FFffFF>"&input((i-1)*5+1)&"</font></td>" Response.Write "<td
width=360 ><font color=#FF00FF>"&input((i-1)*5+4)&"</font></td>"  
Response.Write "<td width=100 align=left><a href=dele.asp?id=" &x& ">删除</a></td></tr>"  
next  
%>  
</table>  
</body>  
</html>  
5.用户删除处理程序dele.asp  
<%Response.Expires=0  
dim input()  
id=Request.QueryString("id")  
thisfile = server.mappath("counter.asp")  
Set fs = CreateObject("Scripting.FileSystemObject")  
Set infile = fs.OpenTextFile(thisfile,1,False)  
counter = 0  
do while not infile.AtEndOfStream  
thisline = infile.readline  
Redim preserve input(counter)  
input(counter) = thisline  
counter = counter + 1  
loop  
infile.Close  
number=(counter-1)/5  
Set outfile = fs.CreateTextFile(thisfile)  
outfile.WriteLine input(0)  
for i=1 to number  
if input((i-1)*5+1)<>id then  
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)  
outfile.WriteLine input((i-1)*5+5)  
end if  
next  
outfile.Close  
set fs=nothing  
Response.Redirect "manage.asp"  
%>  
---------------------------------------------------  
writen by aspboy and powered by http://easp.126.com    
 
 收藏本文  打印本文  论坛讨论  关闭窗口
· 上一篇:用ASP实现免费计数器提供-3
· 下一篇:用ASP实现免费计数器提供-1
· 正则表达式regular expression详述(一)
· 一个通用数据库显示程序
· ASP程序密码验证问题 (MS,缺陷)
· 构建你的网站新闻自动发布系统之二
· 在ASP中用EasyMailObject组件处理Exchange邮件源代码(4)


关于本站 | 联系我们 | 业务合作 | 客户案例 | 诚聘英才 | 广告合作 | 收藏本站
海口动网先锋网络科技有限公司版权所有
Copyright © 2000 - 2006 Cndw.Com
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077