您现在的位置:计算机技术学习网 > 技术中心 > WEB编程 > ASP >

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

来源:网络 责任编辑:栏目编辑 发表时间:2013-07-02 04:22 点击:
ShowSource.asp
<%@ Language=JavaScript %>

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

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

// make sure its 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="/edu/UploadPic/2007-12/200712913283251.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":

    相关新闻>>

      发表评论
      请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
      用户名: 验证码:点击我更换图片
      最新评论 更多>>

      推荐热点

      • WAP常见问题问答大全(四)
      • ASP开发必备:WEB打印代码大全
      • ASP调用系统ping命令
      • asp缓存技术
      • ASP教程:第三篇 ASP基础
      • 用ASP+XML打造留言本(4)
      • 关于ASP Recordset 分页出现负数解决方法及建议
      • 用asp怎样编写文档搜索页面(5)
      • ASP处理多关键词查询实例代码
      网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
      Copyright © 2008-2015 计算机技术学习交流网. 版权所有

      豫ICP备11007008号-1