一个免费的邮件列表源程序(三)
来源:网络 责任编辑:栏目编辑 发表时间:2013-07-01 13:20 点击:次
Subscribe.asp
<%@ 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%"> </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 youe 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> );
<%@ 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%"> </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 youe 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> );
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>