home *** CD-ROM | disk | FTP | other *** search
/ bombers.k12.ar.us / bombers.k12.ar.us.tar / bombers.k12.ar.us / survey_unconfigured / SendFollowUpMessage2.asp < prev    next >
Text File  |  2006-10-25  |  10KB  |  227 lines

  1. <!--#Include File="Include/Top_inc.asp"-->
  2. <%
  3. '***********************************************************************
  4. '   Application: SelectSurveyASP Advanced v8.1.11
  5. '   Author: Aaron Baril for ClassApps.com
  6. '   Page Description: This page allows the user to input information for 
  7. '                      sending out follow-up messages for a previous message.
  8. '
  9. '   COPYRIGHT NOTICE                                
  10. '
  11. '   See attached Software License Agreement
  12. '
  13. '   (c) Copyright 2002 - 2006 by ClassApps.com.  All rights reserved.
  14. '***********************************************************************
  15. %>
  16. <!--#Include File="Include/SurveyUtility_inc.asp"-->
  17. <!--#Include File="Include/Utility_inc.asp"-->
  18. <!--#Include File="Include/Constants_inc.asp"-->
  19. <!--#Include File="Include/Config_inc.asp"-->
  20. <!--#Include File="Include/ID_inc.asp"-->
  21. <!--#Include File="Include/adovbs_inc.asp"-->
  22. <!--#Include File="Include/CurrentUser_inc.asp"-->
  23. <!--#Include File="Include/SurveySecurity_inc.asp"-->
  24. <%
  25.     'If the user does not have "Create" or "Admin" permission, redirect them to the access denied page.
  26.     If lngUserSecurityLevel <> SUR_SECURITY_LEVEL_CREATE And lngUserSecurityLevel <> SUR_SECURITY_LEVEL_ADMIN Then
  27.         Response.Redirect "AccessDenied.asp?Reason=" & SUR_ACCESS_DENIED_NOT_ADMIN_SECURITY_LEVEL
  28.     End If
  29.  
  30.     Dim lngEmailListID
  31.     Dim strEmailAddresses
  32.     Dim flgUsingEmailList
  33.     Dim flgDisplayFirstSurvey
  34.  
  35.     'Initialization            
  36.     lngEmailListID = Request.Form("EmailListID")
  37. %>    
  38. <html>
  39. <head>
  40.     <title>Send Follow-Up Message</title>
  41.     <link rel="stylesheet" href="Resources/StyleSheet/SurveyStyle.css">
  42. </head>
  43.  
  44. <script language ="JavaScript" src="ClientInclude/Utility.js"></script>
  45. <script language ="JavaScript">
  46. function submitCheck() 
  47. {
  48.     if (trim(document.forms['frmSendFollowUpMessage'].txtSubject.value) == "")
  49.     {    
  50.         alert("Please enter a value for the Subject.");
  51.         document.forms['frmSendFollowUpMessage'].txtSubject.focus();
  52.         return false;
  53.     }
  54.  
  55.     // Make sure a From email address was entered
  56.     if (trim(document.forms['frmSendFollowUpMessage'].txtFromAddress.value) == "")
  57.     {    
  58.         alert("Please enter a value for the 'From' email address.");
  59.         document.forms['frmSendFollowUpMessage'].txtFromAddress.focus();
  60.         return false;
  61.     }
  62.  
  63.     // Make sure the From email address is in a valid format
  64.     if (isValidEmailAddress(trim(document.forms['frmSendFollowUpMessage'].txtFromAddress.value)) == false)
  65.     {    
  66.         alert("The 'From' email address entered is not a valid format for an email address.");
  67.         document.forms['frmSendFollowUpMessage'].txtFromAddress.focus();
  68.         return false;
  69.     }
  70.     
  71.     // Make sure text was entered for the body of the email
  72.     if (trim(document.forms['frmSendFollowUpMessage'].txtEmailText.value) == "")
  73.     {    
  74.         alert("Please enter a value for the text of the email.");
  75.         document.forms['frmSendFollowUpMessage'].txtEmailText.focus();
  76.         return false;
  77.     }
  78.  
  79.     // Make sure the #SurveyLink# token is in the email text
  80.     var strEmailText = document.forms['frmSendFollowUpMessage'].txtEmailText.value;
  81.     if (strEmailText.indexOf('#SurveyLink#') == -1)
  82.     {
  83.         alert("The #SurveyLink# token must be included in the text of the email.");
  84.         document.forms['frmSendFollowUpMessage'].txtEmailText.focus();
  85.         return false;
  86.     }
  87.  
  88.     return true;
  89. }
  90. </script>
  91.  
  92. <body class="MainBodyStyle">
  93.  
  94. <!--#Include File="Include/FrameworkTop_inc.asp"-->
  95.  
  96. <table border="0" cellspacing="0" cellpadding="0" width="754" class="MediumBlueBackgroundColor">
  97.     <tr>
  98.         <td height="36" valign="center">
  99.               <span class="H1HeadingStyle"><a name="skipnav" tabindex="1">Send Follow-Up Message</a></span> <img style="cursor:hand" alt="Help" onClick="javascript:window.open('Help/Help.htm#EmailMessages', 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">
  100.         </td>
  101.     </tr>
  102. </table>
  103.  
  104. <!--#Include File="Include/FrameworkTop2_inc.asp"-->
  105.  
  106. <table width="740" border="0" cellpadding="0" cellspacing="6" class="LightGrayBackgroundColor">
  107.     <form action="SendFollowUpMessageAction.asp" method="post" name="frmSendFollowUpMessage" onSubmit="return submitCheck();">
  108.     <input type="hidden" name="EmailListID" value="<%=Request.Form("EmailListID")%>">
  109.     <input type="hidden" name="EmailListName" value="<%=Request.Form("EmailListName")%>">
  110.     <input type="hidden" name="EmailMessageID" value="<%=Request.Form("EmailMessageID")%>">
  111.     <input type="hidden" name="Subject" value="<%=Request.Form("Subject")%>">
  112.     <input type="hidden" name="NoResponse" value="<%=Request.Form("chkNoResponse")%>">
  113.     <input type="hidden" name="Declined" value="<%=Request.Form("chkDeclined")%>">
  114.     <input type="hidden" name="Responded" value="<%=Request.Form("chkResponded")%>">
  115.         <tr>
  116.             <td width="1" rowspan="2"></td>
  117.             <td height="34" valign="center">
  118.                 <span class="H2HeadingStyle">Step 2 of 2 -- Follow-Up Message Details</span>
  119.             </td>
  120.             <td width="1" rowspan="2"> </td>
  121.         </tr>
  122.         <tr>
  123.             <td valign="top" width="710" height="34">
  124.                 <span class="Normal">
  125.                     All fields marked with a red asterisk (<span class="Required">*</span>) are required.  
  126.                     You can personalize your email by including tokens in it, as described below.  When finished, 
  127.                     click the Send button to send the email to the designated recipients.
  128.                 </span>
  129.             </td>
  130.         </tr>
  131.     </table>
  132.     <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="1" background="Resources/Images/ThinDivider.gif"></td></tr>
  133.     <table border="0" cellpadding="0" cellspacing="6" width="740" class="WhiteBackgroundColor">
  134.         <tr>
  135.             <td height="8"></td>
  136.         </tr>
  137.         <tr>
  138.             <td width="1" rowspan="10"></td>
  139.             <td valign="top" class="NormalBold" width="160">
  140.                 <label for="txtSubject">Email Subject:</label><span class="Required">*</span>
  141.             </td>
  142.             <td valign="top" class="Normal" width="520">
  143.                 <input type="text" name="txtSubject" id="txtSubject" maxlength="125" style="width:545">
  144.             </td>
  145.             <td width="1" rowspan="10"> </td>
  146.         </tr>
  147.         <tr>
  148.             <td valign="top" class="NormalBold">
  149.                 <label for="txtFromAddress">'From' Address:</label><span class="Required">*</span>
  150.             </td>
  151.             <td valign="top" class="Normal">
  152.                 <span class="InlineHelpSpanStyle">Enter the email address that the email should appear to come from.</span>
  153.                 <input type="text" name="txtFromAddress" id="txtFromAddress" maxlength="50" style="width:545">
  154.             </td>
  155.         </tr>
  156.         <tr>
  157.             <td valign="top" class="NormalBold">
  158.                 <label for="txtCCAddress">'CC' Address(es):</label>
  159.             </td>
  160.             <td valign="top" class="Normal">
  161.                 <span class="InlineHelpSpanStyle">If desired, you may enter any email address(es) that should be CC'ed for each email.  Multiple email 
  162.                 addresses should be separated by a semi-colon.<span>
  163.                 <input type="text" name="txtCCAddress" id="txtCCAddress" maxlength="50" style="width:545">
  164.             </td>
  165.         </tr>
  166.         <tr>
  167.             <td valign="top" class="NormalBold">
  168.                 <label for="txtBCCAddress">'BCC' Address(es):</label>
  169.             </td>
  170.             <td valign="top" class="Normal">
  171.                 <span class="InlineHelpSpanStyle">If desired, you may enter any email address(es) that should be BCC'ed for each email.  Multiple email 
  172.                 addresses should be separated by a semi-colon.<span>
  173.                 <input type="text" name="txtBCCAddress" id="txtBCCAddress" maxlength="50" style="width:545">
  174.             </td>
  175.         </tr>
  176.         <tr>
  177.             <td valign="top" class="NormalBold">
  178.                 <label for="txtEmailText">Email Text:</label><span class="Required">*</span>
  179.             </td>
  180.             <td valign="top" class="Normal">
  181.                 <span class="InlineHelpSpanStyle">
  182.                     Enter the text of your email below.  You may include the following tokens, 
  183.                     each of which will be replaced, as noted, in the actual email:<br>
  184.                     #SurveyLink# - The location of the link to the survey (required)<br>
  185.                     #DeclineLink# - The location of the link a user can click to decline responding to the survey<br>
  186.                     #FirstName# - The first name of the email recipient<br>
  187.                     #LastName# - The last name of the recipient<br>
  188.                     #CustomData1# - The first custom data field<br>
  189.                     #CustomData2# - The second custom data field<br>
  190.                     #CustomData3# - The third custom data field
  191.                 <span>
  192.                 <textarea class="TextareaStyle" rows="8" name="txtEmailText" id="txtEmailText" style="width:545">Dear #FirstName#,
  193.  
  194. We are conducting a survey, and would appreciate your response.
  195.  
  196. The link to the survey is:
  197. #SurveyLink#
  198.  
  199. If you do not wish to respond to this survey, please click on the link below to decline:
  200. #DeclineLink#
  201.  
  202. Thanks in advance for responding to the survey,
  203. <%=GetUserFirstName()%>
  204. </textarea><br>
  205. <input type="checkbox" name="chkHTMLFormat" id="chkHTMLFormat"> <label for="chkHTMLFormat">Send email in HTML format</label>
  206.             </td>
  207.         </tr>
  208.         <tr>
  209.             <td colspan="2" align="right">
  210.                 <a href="javascript:window.history.go(-1);"><img border="0" alt="Back" src="Resources/Buttons/Back.gif" name="btnBack"></a>
  211.                 <a href="EmailMessageList.asp?EmailListID=<%=Request.Form("EmailListID")%>&EmailListName=<%=Request.Form("EmailListName")%>"><img border="0" alt="Cancel" src="Resources/Buttons/Cancel.gif" name="btnCancel"></a>
  212.                 <input type="image" border="0" alt="Send" src="Resources/Buttons/Send.gif" name="btnSend">
  213.             </td>
  214.         </tr>
  215.     </form>
  216. </table>
  217.  
  218. <!--#Include File="Include/FrameworkBottom_inc.asp"-->
  219.  
  220. </body>
  221. </html>
  222.  
  223. <%        
  224.     'Ensure that the web server returns the page
  225.     Response.Flush
  226. %>
  227.