动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > ASP实例
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ ASP实例 ]的信息

本月文章推荐
.使用JScript.NET创建asp.net页面.
.显示页面show.asp--基于web的QQ程.
.聊天室建设详解三.
.用户注册及跟踪代码(一).
.聊天室自做 Follow Me.
.纯ASP(VBscript)写的全球IP地址搜.
.利用ASP+XML架设在线考试系统&nb.
.利用ASP.NET来访问Excel文档.
.FrontPage创建HTML/ASP混合页面.
.在ASP应用中验证用户身份(1).
.Web在线代理(Asp版).
.用ASP、VB和XML建立互联网应用程.
.用asp怎样编写文档搜索页面(5).
.Javascript+HTML仿造VB里的Month.
.用asp怎样编写文档搜索页面(2).
.Win2k IIS 远程执行命令漏洞.
.一个漂亮的点击计数器.
.网络寻呼机数据库版总结.
.用ASP发 WAP MAIL(-).
.购物车范例(处理页面).

一个免费的邮件列表源程序(二)

发表日期:2000-8-18 |


ShowSource.asp
<%@ Language=JavaScript %>

<!--#include file = "include/SetGlobals.asp"-->

<%
// get the page to display from the URL
var sPage = "" + Request.QueryString ( "page" );

// make sure it's a page we allow them to view!
switch ( sPage )
{
case "Wider":
case "COM":
case "Handle404":
case "Categories":
case "CategoryPage":
case "Columns":
case "ResultsPage":
case "Date":
case "Contact":
case "Subscribe":
case "MailToList":
   break;

default:
   Response.Redirect ( "NaughtyNaughty!" );
}

// output relevant meta tags
Init( "ASP source example" );

// output common top of page
Header( '<a href="work.asp">Work</a> --> <a href="' + sPage + '.asp">"' + sPage + '.asp"</a> --> Source', 3 );

// output page content
Content ( );

// output common bottom of page
Footer ( );
%>

<% /* standard page elements */ %>
<!--#include file = "utils/Init.asp"-->
<!--#include file = "utils/Header.asp"-->
<!--#include file = "utils/Footer.asp"-->
<!--#include file = "utils/ShowFile.asp"-->

<%
// ============================================
// the content of this page
// ============================================
function Content ( )
{
   Out ( '<td width="20%">&nbsp;</td>' );
   Out ( '<td width="60%">' );

      // create handle to FileSystemObject
      var oFSO = Server.CreateObject ( 'Scripting.FileSystemObject' );

      // each source file that we show source for could have a related
      // documentation file for us to display before and after the
      // source. for now, I use a generic header and footer file. the
      // 'true' tells ShowFile to pass through any HTML to the browser.

      ShowFile ( oFSO, 'Generic.pre', true, false );

      switch ( sPage )
      {
      case "Categories":
      case "CategoryPage":
      case "Columns":
         Out ( '<p><img src="images/new.gif">&nbsp;<a href="Categories.zip">Download</a> all the source for the category demonstration!<p>' );
         break;
      }

      ShowSource ( oFSO, sPage + '.asp', true );

      // show any extra utility file(s) too
      switch ( sPage )
      {
      case "Wider":
         ShowSource ( oFSO, 'include/SetGlobals.asp', true );
         ShowSource ( oFSO, 'utils/Header.asp', true );
         break;

      case "Categories":
      case "CategoryPage":
      case "Columns":
      case "Subscribe":
      case "MailToList":
         ShowSource ( oFSO, 'utils/Database.asp', true );
         break;

      case "Categories":
      case "CategoryPage":
      case "Columns":
         ShowSource ( oFSO, 'utils/ShowCategory.asp', true );
         break;
      }

      // show the generic footer
      ShowFile ( oFSO, 'Generic.pst', true, false );

      // we've finished with the object so free the resource
      oFSO = null;

      Out ( '<p><center><a href="FSO.asp"><img src="images/source.gif" border=0></a></center>' );

   Out ( '</td>' );
   Out ( '<td width="20%">&nbsp;</td>' );
}
%>
     
utils/ShowFile.asp
<%
// have we advertized our mailing list yet?
var bDoneLink = false;

// ============================================
// display the contents of the given file
// ============================================
function ShowFile ( oFSO, sFile, bPassHTML, bShowName )
{
   var ForReading = 1;
   // var ForWriting = 2;
   // var ForAppending = 8;

   // open asp file for reading
   var fFile = oFSO.OpenTextFile ( Server.MapPath( sFile ), ForReading );

   // read entire file contents into variable
   var s = fFile.ReadAll ( );

   if ( !bPassHTML )
   {
      // replace & with &amp; so HTML displayed, not interpreted
      s = s.replace ( /&/g, '&amp;' );

      // replace < with &lt; so HTML displayed, not interpreted
      s = s.replace ( /</g, '&lt;' );

      // replace newline with HTML equivalent
      s = s.replace ( /\n/g, '<br>' );

      // replace tabs with 3 spaces
      s = s.replace ( /\t/g, '&nbsp;&nbsp;&nbsp;' );

      // show filename and change font color for source code
      s = '<font color="black">' + s + '</font>';

      if ( bShowName )
         s = '<h4>' + sFile + '</h4>' + s;
   }

   Out ( s );

   fFile.Close ( );
}

// ============================================
// show a source file outside the table
// ============================================
function ShowSource ( oFSO, sFile, bShowName )
{
   // advertize our mailing list before the first source file
   if ( !bDoneLink )
   {
      bDoneLink = true;
      Out ( '<p><b>Get informed when the source code below changes!</b> <a href="subscribe.asp">Subscribe to our mailing list.</a>' );
   }

   Out ( '</td>' );
   Out ( '<td width="20%">&nbsp;</td></tr><tr><td colspan=3 width="100%" bgcolor="#ff9900">' );

      // show news file
      ShowFile ( oFSO, sFile, false, bShowName );

   Out ( '</td></tr><tr><td width="20%">&nbsp;</td>' );
   Out ( '<td width="60%">' );
}
%>
上一篇:一个免费的邮件列表源程序(一) 人气:12395
下一篇:一个免费的邮件列表源程序(三) 人气:11585
浏览全部邮件列表源程序的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-10-14 25175学生成绩管理系统 v2.88
2008-10-14 冰雪CMS v2.0 bulid 081013
2008-10-14 Modoer多功能点评系统 v1.1 Beta
2008-10-14 乐风CMS乐风影视版 v2008.10.13
2008-10-14 FeitecCMS 40T免费资源网整站源码
2008-10-14 Asoft签到管理系统 v3.0 Pack2
2008-10-14 金博人才招聘求职网黄金版 v4.2
2008-10-14 游戏推广无限制版本
2008-10-14 AmEav WebSite 业网站管理系统 英
2008-10-11 联系人分组工具 v1.1 中文破解版
2008-10-11 FaceMelter变脸 v2.0 汉化破解版
2008-10-11 PathTracker道路跟踪仪 v1.2 破解
2008-10-11 Rooms手机聊天室 v0.6.7 破解版
2008-10-11 RemoteDesktop远程桌面 v1.0 破解
2008-10-11 ProRemote远程调音台 v1.0.1 破解
2008-10-11 PicShare照片共享 v1.0.0 破解版
2008-10-11 Photogene照片编辑器 v1.5 汉化破
2008-10-11 WriteRoom共享文档 v1.0 破解版
  发表评论
姓 名: 验证码:
内 容:
站长工具:网站收录查询 | Google PR查询 | ALEXA排名查询 | CSS在线编辑器 | 广告代码 | js/vbs加密 | md5加密 | 进制转换 | UTF-8 转换工具 | Html转换js | Html转换asp | Html转换php | Html转换perl
实用工具:汉字翻译拼音 | 拼音字典 | 符号对照表 | 个税计算 | 实时汇率查询换算 | 经典小工具 | 汉字简繁转换 | 普通单位换算 | 公制单位换算 | 生辰老黄历 | 国内电话区号 | 国家代码与域名缩写 | 文字加密解密 | 健康查询 | 万年历 | 汉字横竖排版 | 手机号码查询 | 计算器 | ip搜索
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号
ホームページ制作 不動産検索システム 求人情報
防水工事·改修工事 フットサル大会 探偵
SEO対策 中国語教室 ホームページ作成