home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
bombers.k12.ar.us
/
bombers.k12.ar.us.tar
/
bombers.k12.ar.us
/
survey_unconfigured
/
ImportEmailAddresses.asp
< prev
next >
Wrap
Text File
|
2006-10-25
|
6KB
|
158 lines
<!--#Include File="Include/Top_inc.asp"-->
<%
'***********************************************************************
' Application: SelectSurveyASP Advanced v8.1.11
' Author: Aaron Baril for ClassApps.com
' Page Description: This page allows the user to import email addresses for an email list.
'
' COPYRIGHT NOTICE
'
' See attached Software License Agreement
'
' (c) Copyright 2002 - 2006 by ClassApps.com. All rights reserved.
'***********************************************************************
%>
<!--#Include File="Include/SurveyUtility_inc.asp"-->
<!--#Include File="Include/Utility_inc.asp"-->
<!--#Include File="Include/Constants_inc.asp"-->
<!--#Include File="Include/Config_inc.asp"-->
<!--#Include File="Include/adovbs_inc.asp"-->
<!--#Include File="Include/CurrentUser_inc.asp"-->
<!--#Include File="Include/SurveySecurity_inc.asp"-->
<%
'If the user does not have "Create" or "Admin" permission, redirect them to the access denied page.
If lngUserSecurityLevel <> SUR_SECURITY_LEVEL_CREATE And lngUserSecurityLevel <> SUR_SECURITY_LEVEL_ADMIN Then
Response.Redirect "AccessDenied.asp?Reason=" & SUR_ACCESS_DENIED_NOT_ADMIN_SECURITY_LEVEL
End If
%>
<html>
<head>
<title>Import Email Addresses</title>
<link rel="stylesheet" href="Resources/StyleSheet/SurveyStyle.css">
</head>
<script language ="JavaScript" src="ClientInclude/Utility.js"></script>
<script language ="JavaScript">
function submitCheck()
{
var strEmailText;
var arrEmailAddresses;
var arrEmailFirstName;
var i;
var strTemp;
// Check the list of email addresses. Split on the line feed, creating an array of
// email address/first name/last name/custom data 1/custom data 2/custom data 3 records
var strEmailAddresses = document.forms['frmImportEmailAddresses'].txtEmailAddresses.value;
arrEmailAddresses = strEmailAddresses.split('\n');
// Loop through each of the email address/first name/last name/custom data records
for (i = 0; i < arrEmailAddresses.length; i++)
{
// If the line has nothing but an Enter key on it, ignore it
if (arrEmailAddresses[i] != '\r')
{
// Split on the comma to create an array containing 1-4 items. The first item is the email address. Check
// to make sure the email address is valid.
arrEmailFirstName = arrEmailAddresses[i].split(",");
if (arrEmailFirstName[0].length > 0)
{
if (isValidEmailAddress(trim(arrEmailFirstName[0])) == false)
{
alert("The email addresses are not entered correctly. The following email address is not valid: " + trim(arrEmailFirstName[0]));
document.forms['frmImportEmailAddresses'].txtEmailAddresses.focus();
return false;
}
}
}
}
return true;
}
</script>
<body class="MainBodyStyle">
<!--#Include File="Include/FrameworkTop_inc.asp"-->
<table border="0" cellspacing="0" cellpadding="0" width="754" class="MediumBlueBackgroundColor">
<tr>
<td height="36" valign="center">
<span class="H1HeadingStyle"><a name="skipnav" tabindex="1">Import Email Addresses</a></span> <img style="cursor:hand" alt="Help" onClick="javascript:window.open('Help/Help.htm#EmailLists', null, 'menubar=no,toolbar=no,titlebar=no,status=no,left=10,top=10,scrollbars=yes,resizable=yes,height=550,width=770');" border="0" src="Resources/Images/Help.gif">
</td>
</tr>
</table>
<%
Dim lngEmailListID
Dim strEmailListName
'Initialization
lngEmailListID = Request.QueryString("EmailListID")
strEmailListName = Request.QueryString("EmailListName")
%>
<!--#Include File="Include/FrameworkTop2_inc.asp"-->
<table width="740" border="0" cellpadding="6" cellspacing="0" class="LightGrayBackgroundColor">
<form action="ImportEmailAddressesAction.asp" method="post" name="frmImportEmailAddresses" onSubmit="return submitCheck();">
<input type="hidden" value="<%=lngEmailListID%>" name="EmailListID">
<tr>
<td colspan="3" height="40" valign="center">
<table border="0" cellpadding="6" cellspacing="0" width="100%">
<tr>
<td>
<span class="H2HeadingStyle"> Email Address Import for '<%=strEmailListName%>' Email List</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="1" background="Resources/Images/ThinDivider.gif"></td></tr>
<table border="0" cellpadding="0" cellspacing="6" width="740" class="WhiteBackgroundColor">
<tr>
<td width="1" rowspan="10"></td>
<td align="left" width="730">
<span class="Normal">
<label for="txtEmailAddresses">Import your email list by simply pasting your email addresses on each line.</label>
The acceptable format
for each line is: Email Address, First Name, Last Name, Custom Data 1, Custom Data 2, Custom Data 3.
Each field must be separated by a comma, and each entry must be on its own line. If you wish to omit
any intermediate fields, you must insert a comma as a placeholder. The examples below, which demostrate
correct syntax, should be removed when actually submitting email addresses.
</span>
<br>
</td>
<td width="1" rowspan="10"></td>
</tr>
<tr>
<td valign="top" class="Normal" align="left">
<textarea class="TextareaStyle" rows="12" wrap="off" name="txtEmailAddresses" id="txtEmailAddresses" style="width:715">joe@mycompany.com,Joe
fred@yourcompany.com
alice@hercompany.com,,Johnson
sam@hiscompany.com,Sam,Johnson,President
eric@ourcompany.com,,,CEO,$250K,3 years</textarea>
<span class="InlineHelpSpanStyle">Field Order: Email Address, First Name, Last Name, Custom Data 1, Custom Data 2, Custom Data 3</span>
</td>
</tr>
<tr>
<td align="right">
<a href="EmailListList.asp"><img border="0" alt="Cancel" src="Resources/Buttons/Cancel.gif" name="btnCancel"></a>
<input type="image" border="0" alt="Import" src="Resources/Buttons/Import.gif" name="btnImport">
</td>
</tr>
</form>
</table>
<!--#Include File="Include/FrameworkBottom_inc.asp"-->
</body>
</html>
<%
'Ensure that the web server returns the page
Response.Flush
%>