中国站长下载-为中国站长提供最好最全的建站资源! 首 页发布资源有事留言繁體中文
设为首页
加入收藏
联系我们
 
您当前的位置:中国站长下载 -> 文章中心 -> 网页编程 -> ASP编程 -> 文章内容  虚拟主机 域名注册 退出登录 用户管理
栏目导航
· ASP编程 · .NET编程
· PHP编程 · JSP编程
· CGI 专区
热门文章
· sndvol32 - sndvol3...
· [组图] FLASH:《大话李白》...
· 个人网站到底能赚多...
· [图文] Rundll.exe是病毒吗...
· [组图] Flash:制作MV
· 价值12万元的网站SE...
· 网站创业者,你需要...
· 一个成功的网站设计...
· [图文] FLASH:韩国导航条解...
· 中国网站的赚钱模式...
相关文章
· 不能ASP图像组件来生...
不能ASP图像组件来生成图像的ASP计数器程序(一)
作者:不详  来源:不详  发布时间:2006-8-13 0:57:41  发布人:chinazhan

 减小字体 增大字体

    
  不能ASP图像组件来生成图像的ASP计数器程序
  这是我去年编的一个ASP程序,那时用惯了C语言,所以对Basic反而忘了,但由于觉得ASP很热门,所以试着编了这个程序,程序没经过优化,代码很长,主要是数据那时候不知道该怎么用:) 别笑我,因为现在我会用啦!!
  这是个简单的计数器申请系统,采用文本,所以只要是支持ASP的空间就都可以测试!!
  其中TXT目录放的是所有人的计数文本文件
  number是用来统计当前申请计数器的最大人数 初始化内容为0
  apply.asp applycheck.asp是用来提供申请计数器的
  header 是我用C语言从一个256色的bmp图像中提取出来的bmp图像的头部信息,太大了,有时间的人可以改为2色的bmp图像的头部信息,当然代码改变了。我取为256色只是为了方便编制下面的counter.asp
  counter.asp 当然是计数器的核心程序啦!!
  里面还有一个counter.txt 时隔久了,不知有没有用,反正我也把它放上去嘛算啦!!
  
  
  ZIP下载地方:
  http://grwy.online.ha.cn/explorer
  
  下面只例举出来几个ASP程序的源程序:
  --------------apply.asp----------------
  <%set fsFilesys=CreateObject("Scripting.FileSystemObject")
  set myText=fsFilesys.OpenTextFile(Server.MapPath("/explorer/")&"/counter/number.txt")
  counter=mytext.readline
  mytext.close
  counter=counter+1
  user=counter
  %>
  <html>
  
  <head>
  <title></title>
  <style type="text/css"><!--
  .p9 { font-family: "宋体"; font-size: 9pt}a {text-transform: none; text-decoration: none;}
  a:hover {text-decoration: underline; color: #002255;}
  --></style>
  </head>
  
  <body bgcolor="#FFE0D7">
  
  <table border="1" cellspacing="0" cellpadding="0" bgcolor="#0E3700">
   <tr bgcolor="#EEF9FF">
   <td valign="middle" align="center" bgcolor="#FFFCD2" width="694"><span class="p9"><font
   color="#1F9B00"><a href="../../index.html" target="_blank">网站主页</a> </font></span></td>
   <td valign="middle" align="center" bgcolor="#FFFCD2" width="694"><span class="p9"><font
   color="#1F9B00"><a href="../../zdlink/zdjx.htm" target="_blank">网站精选</a> </font></span></td>
   <td valign="middle" align="center" bgcolor="#FFFCD2" width="694"><span class="p9"><font
   color="#1F9B00"><a href="../../program/bcyd111.htm" target="_blank">编程圆地</a> </font></span></td>
   <td valign="middle" align="center" bgcolor="#FFFCD2" width="694"><span class="p9"><font
   color="#1F9B00"><a href="../../zypic/zyfg.htm" target="_blank">中雁风光</a> </font></span></td>
   <td valign="middle" align="center" bgcolor="#FFFCD2" width="694"><span class="p9"><font
   color="#1F9B00"><a href="../../downfile/ljxz.htm" target="_blank">软件下载</a> </font></span></td>
   <td align="center" bgcolor="#FFFCD2" width="695"><p align="center"><span class="p9"><font
   color="#1F9B00"><a href="http://grwy.online.ha.cn/explorer/diablo2/diablo.htm"
   target="_blank">暗黑帝国</a> </font></span></td>
   <td align="center" bgcolor="#FFFCD2" width="695"><p align="center"><span class="p9"><font
   color="#1F9B00"><a href="../../myworld/myworld.htm" target="_blank">我的天地</a> </font></span></td>
   <td align="center" bgcolor="#FFFCD2" width="695"><p align="center"><span class="p9"><font
   color="#1F9B00"><a href="../../nomoneysource/mfzy.htm" target="_blank">免费资源</a> </font></span></td>
   <td align="center" bgcolor="#FFFCD2" ><span class="p9"><font color="#1F9B00"></font></span><font
   size="4"><img src="http://counter.hongzhi.com/cgi-bin/Count.exe?df=3079" width="53"
   height="12" align="absmiddle"></font><span class="p9"><font color="#1F9B00"></font></span></td>
   </tr>
  </table>
  
  <p align="center"><span class="p9"><br>
  </span></p>
  
  <p align="center"> </p>
  <div align="center"><center>
  
  <table>
   <tr>
   <td><span class="p9"><font color="#0080C0"><strong><big>探索者免费计数器申请</big></strong></font></span></td>
   </tr>
   <tr>
   <td ><form name="apply" action="applaycheck.asp?user=<%=counter%>" method="POST"><span class="p9">
   <br>你是第<%=counter%>位来本站申请计数器的人,欢迎你!
  </span>
   <span class="p9"><br>三项都是是必填项</span><br><br>
  <span class="p9">你的用户名是:<%=counter%><BR>点击开始申请就会得到一段代码,<br>加入你的页面就可开始统计了。
   </span>
   <p align="center"><span class="p9"><input type="submit" value="开始申请" class="p9"></p>
   </form>
   </td>
   </tr>
  </table>
  </center></div>
  
  </body>
  </html>
  
  ------------applycheck.asp---------------------
  <style type="text/css"><!--
  .p9 { font-family: "宋体"; font-size: 9pt}a {text-transform: none; text-decoration: none;}
  a:hover {text-decoration: underline; color: #002255;}
  --></style>
  </head>
  <body>
  <span class="p9">
  <%user=request.querystring("user")%>
  <%set fsFilesys=CreateObject("Scripting.FileSystemObject")
  set myText=fsFilesys.OpenTextFile(Server.MapPath("/explorer/")&"/counter/number.txt")
  counter=myText.ReadLine
  counter=counter+1
  myText.close
  set myText=fsFilesys.CreateTextFile(Server.MapPath("/explorer/")&"/counter/number.txt",true)
  mytext.writeline(counter)
  mytext.close%>
  
  你的计数器申请成功!只要将以下代码加入你的页面,就能在你的页面得到一个计数器:<br><br>
  <font color="#ff0000">
  <p><a href="http://grwy.online.ha.cn/explorer"><img src="http://home.lz.gs.cninfo.net/explorer/counter/counter.asp?user=<%=user%>"<br>
  border="0" alt="探索者计数器" width="64"
  height="16"></a></p>
  
  </span>
  <a href="http://grwy.online.ha.cn/explorer"><img src="http://-2/explorer/counter/counter.asp?user=<%=user%>"
  border="0" alt="探索者计数器" width="64" height="16"></a>
  
  <%set myText=fsFilesys.CreateTextFile(Server.MapPath("/explorer/")&"/counter/txt/"&user&".ddd",true)
  myText.writeline("0")
  mytext.close%>
  </body>
  by qianfengyun Explorer Sudio
  (转自chinaasp)
  
    做人要厚道,请注明转自chinazhan中国站长(www.ChinaZhan.com)。

 
[] [返回上一页] [打 印] [收 藏]
∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论...]
中国站长下载
中国站长下载

本页只接受PR>=4 IT类站点连接,申请连接,谢谢您们的支持!希望我们的下载站能够真正帮到中国的站长们!
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图
Copyright © 2005-2006 ChinaZhan.Net. All Rights Reserved .