当前位置: 移动技术网 > IT编程>开发语言>.net > 一个免费的邮件列表源程序(三)

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

2019年01月14日  | 移动技术网IT编程  | 我要评论
subscribe.<%@ language=javascript %> <!--#include file = "include/setglobals.asp"
subscribe.
<%@ language=javascript %>

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

<%
// output relevant meta tags
init( "subscription" );

// output common top of page
header( <a href="work.asp">work</a> --> subscription, 3 );

// output page content
content ( );

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

<% /* standard page elements */ %>
<!--#include file = "utils/init.asp"-->
<!--#include file = "utils/database.asp"-->
<!--#include file = "utils/header.asp"-->
<!--#include file = "utils/footer.asp"-->

<%
// ============================================
// the content of this page
// ============================================
function content ( )
{
   out ( <td width="20%">&nbsp;</td> );
   out ( <td width="60%"> );
    
      // if the form has an email address, validate it first
      // so that if it fails we can show the form to fix
      var semail = "";
      var bsubmitted = (request.form.count > 0);

      // has the form been submitted?
      if ( bsubmitted )
      {
         // get the email address from the form...
          semail = "" + request.form ( "email" );

         // validate the email address and moan if it fails
         if ( !isvalidemail ( semail ) )
         {
            out ( <h5><font color="red">" + semail + " <i>appears</i> to be an invalid email address - please try again!</font></h5> );
            out ( <p><font color="red">if you disagree, please <a href="contact.asp">contact me</a> directly.</font><p> );
            // pretend the form hasn been sent yet
            bsubmitted = false;
         }
      }

      // show the form if not submitted yet
      if ( !bsubmitted )
      {
         out ( if you e interested in hearing whenever a new article is posted, or an existing one is updated, type in your email address below and hit <b>subscribe!</b> );

如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网