当前位置: 首页 > 图文教程 > 网络编程 > ASP > 一个投票系统的源程序(coveryourasp.com)

ASP
Asp+Sql 对数据库的各种操作
ASP:6行代码实现无组件上传
ASP中几种分页显示的比较
ASP中数据库调用中常见错误的现象和解决
ASP实用技巧:强制刷新和判断文件地址
asp全站防止注入的代码
ASP如何获取客户端真实IP地址
ASP实现可显示和隐藏的树型菜单
如何用ASP获取真实IP地址
ASP与SQL数据库连接代码
拒绝攻击 万能Asp防注入代码
草根站长成长计划:跟我学新云采集入门(2)
ASP技巧:提高使用Request集合的效率
Asp用存储过程实现数据分页
做网页时常用的ASP函数
Asp编码优化技巧八则
ASP中Cache技术的应用
用ASP封IP的方法,防止固定IP垃圾留言
ASP实现一行多列显示方法实例程序
ASP实现动态添加表单内容的实例程序

ASP 中的 一个投票系统的源程序(coveryourasp.com)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 24 ::
收藏到网摘: n/a

  SurveyDescr.asp
<!--#include file = "include/Startup.asp"-->
<!--#include file = "utils/Survey.asp"-->

<%
// ============================================
// NOTE: all source code downloaded from CoverYourASP was written by
// James Shaw (unless stated otherwise), and is copyright (c) 2000 by
// James Shaw. You may use this source code on your web sites, but
// please don't publish or distribute in any way.
//
// I would appreciate an HTML comment in any code you use, i.e.
//         <!-- portions (c) [email protected]>
// (see Footer(), documented in SSI.asp for details on how to do this)
//
// <shameless plug>
//      Please contact me to discuss any ASP contract work you may have.
// </shameless plug>
// ============================================

// output relevant meta tags
Init( "Survey your readers" );

// output common top of page
Header( 'Survey your readers' );

// output page content
Content ( );

// output common bottom of page
Footer( );

// ============================================
// the content of this page - every page has a function 'Content' that
// is called above.
// ============================================
function Content ( )
{
   Out ( '<td colspan=2 width="80%" valign="top">' );

      // if the survey hasnt been submitted yet...
      if ( !Request.Form.Count )
      {
         //...display some blah, blah
         Out ( 'Finally, surveys come to CoverYourASP! I\'ve been wanting to ask you guys and gals
questions for a long time, and now I can. It\'s up to you if you want to answer of course!' );

         Out ( '<p>Of course, the real benefit to you is that if you tell me what you like I\'ll probably
provide it. If you send in your <a href="Donate.asp">donations</a> the probability increases rather
dramatically!' );

         Out ( '<p>Take the example survey below if you have the time and inclination. I plan to post more
in a special survey category, and start offering incentives to take them.' );

         Out ( '<p>Afterwards, look at the code. I think you\'ll be surprised how simple it is to create
surveys with this code. This page has one function call in it, with just one parameter - the name of the
survey! All questions, answers and results are stored in the database.' );
      }

      // show the survey, or process it's input
      ProcessSurvey ( 'Who are you and what do you think?' );

      if ( !Request.Form.Count )
         Out ( '<p><a href="ShowSource.asp?page=SurveyDescr"><img src="/upload/tech/20091103/20091103102618_6c524f9d5d7027454a783c841250ba71.gif"" align="right"
border=0></a>Please submit the survey first before looking at the source code - this link is on the result
page too!' );
      else
         Out ( '<p><center><a href="ShowSource.asp?page=SurveyDescr"><img src="/upload/tech/20091103/20091103102618_6c524f9d5d7027454a783c841250ba71.gif""
border=0></a></center>' );

   Out ( '</td>' );
 &nb