home *** CD-ROM | disk | FTP | other *** search
/ bombers.k12.ar.us / bombers.k12.ar.us.tar / bombers.k12.ar.us / survey / Survey.asp < prev    next >
Text File  |  2006-11-29  |  67KB  |  1,318 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 update and manage general
  7. '                     information about the survey.
  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/Config_inc.asp"-->
  17. <!--#Include File="Include/Utility_inc.asp"-->
  18. <!--#Include File="Include/SurveyUtility_inc.asp"-->
  19. <!--#Include File="Include/adovbs_inc.asp"-->
  20. <!--#Include File="Include/CurrentUser_inc.asp"-->
  21. <!--#Include File="Include/Constants_inc.asp"-->
  22. <!--#Include File="Include/SurveySecurity_inc.asp"-->
  23. <%
  24.     'If the user does not have "Create" or "Admin" permission, redirect them to the access denied page.
  25.     If lngUserSecurityLevel <> SUR_SECURITY_LEVEL_CREATE And lngUserSecurityLevel <> SUR_SECURITY_LEVEL_ADMIN Then
  26.         Response.Redirect "AccessDenied.asp?Reason=" & SUR_ACCESS_DENIED_NOT_ADMIN_SECURITY_LEVEL
  27.     End If
  28.  
  29.     Dim rsSurvey
  30.     Dim rsHiddenFields
  31.     Dim rsIPAddresses
  32.     Dim strSQL
  33.     Dim lngResponseCount
  34.     Dim lngQuestionCount
  35.     Dim strValue
  36.     Dim strStatus
  37.     Dim strTitle
  38.     Dim strNav
  39.     Dim lngSurveyID
  40.     Dim rsTemplates
  41.     Dim lngRespondentAccessLevel
  42.     Dim strBackgroundColor
  43.     Dim strRedirectURL
  44.                         
  45.     'Initialize the survey id
  46.     lngSurveyID = Request.QueryString("SurveyID")
  47.     Set rsTemplates = Server.CreateObject("ADODB.Recordset")
  48.     Set rsHiddenFields = Server.CreateObject("ADODB.Recordset")
  49.     Set rsIPAddresses = Server.CreateObject("ADODB.Recordset")
  50.             
  51.     'The page is always in EDIT mode.
  52.     strNav = Request.QueryString("Nav")
  53.  
  54.     'In order to edit a survey, the user must be the survey owner or an admin.
  55.     If IsUserOwnerOrAdmin(lngSurveyID) = False Then
  56.         Response.Redirect "AccessDenied.asp?SurveyID=" & lngSurveyID & "&Reason=" & SUR_ACCESS_DENIED_NOT_OWNER
  57.     End If
  58. %>
  59. <html>
  60. <head>
  61.     <title>Survey Administration -- Modify Survey</title>
  62.     <link rel="stylesheet" href="Resources/StyleSheet/SurveyStyle.css">
  63. </head>
  64.  
  65. <script language ="JavaScript" src="ClientInclude/Utility.js"></script>
  66. <script language="JavaScript">
  67. function deleteSurvey()
  68. {
  69.     if (confirm("Are you sure you want to delete this survey?") == true) //OK
  70.     {
  71.         window.location.href = 'DeleteSurvey.asp?SurveyID=<%=lngSurveyID%>';
  72.     }
  73. }
  74.  
  75. function deleteResponses()
  76. {
  77.     if (confirm("Are you sure you want to delete all of the responses to this survey?") == true) //OK
  78.     {
  79.         window.location.href = 'DeleteResponses.asp?SurveyID=<%=Request.QueryString("SurveyID")%>&Nav=<%=strNav%>';
  80.     }
  81. }
  82.  
  83. function submitCheck() 
  84. {
  85.     var owners;
  86.     var i;
  87.     var strTemp;
  88.  
  89.     // Make sure that a title has been entered
  90.     if (trim(document.forms['frmSurvey'].txtTitle.value) == "")
  91.     {    
  92.         alert("Please enter a value for the Title.");
  93.         document.forms['frmSurvey'].txtTitle.focus();
  94.         return false;
  95.     }
  96.  
  97.     if (trim(document.forms['frmSurvey'].txtStartDate.value) != "")
  98.     {
  99.         if (<%=RenderJSDateValidationRoutineName%>(trim(document.forms['frmSurvey'].txtStartDate.value)) == false)
  100.         {
  101.             document.forms['frmSurvey'].txtStartDate.focus();
  102.             return false;
  103.         }
  104.     }
  105.     
  106.     if (trim(document.forms['frmSurvey'].txtEndDate.value) != "")
  107.     {
  108.         if (<%=RenderJSDateValidationRoutineName%>(trim(document.forms['frmSurvey'].txtEndDate.value)) == false)
  109.         {
  110.             document.forms['frmSurvey'].txtEndDate.focus();
  111.             return false;
  112.         }
  113.     }
  114.     
  115.     if (trim(document.forms['frmSurvey'].txtStartDate.value) != "" && trim(document.forms['frmSurvey'].txtEndDate.value) != "")
  116.     {
  117.         if (<%=RenderJSDateComparisonRoutineName%>('<%=SUR_DATE_DELIMITER%>', trim(document.forms['frmSurvey'].txtEndDate.value), trim(document.forms['frmSurvey'].txtStartDate.value)) == true)
  118.         {
  119.             alert("The end date cannot be earlier than the start date.");
  120.             document.forms['frmSurvey'].txtEndDate.focus();
  121.             return false;
  122.         }
  123.     }
  124.  
  125.     // If a value was entered for the modify survey within days field, make sure it's numeric
  126.     if (trim(document.forms['frmSurvey'].txtModifySurveyWithinDays.value) != "")
  127.     {
  128.         if (isNumeric(trim(document.forms['frmSurvey'].txtModifySurveyWithinDays.value)) == false)
  129.         {
  130.             alert("Please enter a numeric value for the number days during which a survey is updateable.");
  131.             document.forms['frmSurvey'].txtModifySurveyWithinDays.focus();
  132.             return false;
  133.         }
  134.     }
  135.  
  136.     // If the completion action requires a message, make sure that one has been provided
  137.     if (trim(document.forms['frmSurvey'].cboCompletionAction.value) == '<%=SUR_COMPLETION_ACTION_DISPLAY_MESSAGE%>')
  138.     {
  139.         if (trim(document.forms['frmSurvey'].txtSurveyCompleteMessage.value) == '')
  140.         {    
  141.             alert("Please enter a completion message for the survey.");
  142.             document.forms['frmSurvey'].txtSurveyCompleteMessage.focus();
  143.             return false;
  144.         }
  145.     }
  146.         
  147.     // If the completion action requires a URL, make sure that one has been provided
  148.     if (trim(document.forms['frmSurvey'].cboCompletionAction.value) == '<%=SUR_COMPLETION_ACTION_REDIRECT%>')
  149.     {
  150.         if (trim(document.forms['frmSurvey'].txtSurveyCompleteRedirectURL.value) == '')
  151.         {    
  152.             alert("Please enter a completion URL for the survey.");
  153.             document.forms['frmSurvey'].txtSurveyCompleteRedirectURL.focus();
  154.             return false;
  155.         }
  156.     }
  157.  
  158.     // If the completion action is to immediately view the reports, make sure that the report security is not High
  159.     if (trim(document.forms['frmSurvey'].cboCompletionAction.value) == '<%=SUR_COMPLETION_ACTION_DISPLAY_RESULTS%>')
  160.     {
  161.         if (document.forms['frmSurvey'].cboReportSecurity.value == '<%=SUR_REPORT_SECURITY_OWNERS_ONLY%>')
  162.         {    
  163.             alert("In order to select '<%=SUR_COMPLETION_ACTION_DISPLAY_RESULTS%>' as the completion action, the 'Report Security' option cannot be 'High'.");
  164.             document.forms['frmSurvey'].cboReportSecurity.focus();
  165.             return false;
  166.         }
  167.     }
  168.  
  169.     // If the Continue button is checked, make sure that a completion URL was entered.
  170.     if (document.forms['frmSurvey'].chkContinueButton.checked == true)
  171.     {
  172.         if (trim(document.forms['frmSurvey'].txtSurveyCompleteRedirectURL.value) == '')
  173.         {    
  174.             alert("In order to display the Continue button, you must enter a completion URL for the survey.");
  175.             document.forms['frmSurvey'].txtSurveyCompleteRedirectURL.focus();
  176.             return false;
  177.         }
  178.     }
  179.  
  180.     // If the cancel button action requires a URL, make sure that one has been provided
  181.     if (trim(document.forms['frmSurvey'].cboCancelButtonDisplay.value) == '<%=SUR_CANCEL_BUTTON_REDIRECT%>')
  182.     {
  183.         if (trim(document.forms['frmSurvey'].txtCancelButtonRedirectURL.value) == '')
  184.         {    
  185.             alert("Please enter a redirect URL for the Cancel button.");
  186.             document.forms['frmSurvey'].txtCancelButtonRedirectURL.focus();
  187.             return false;
  188.         }
  189.     }
  190.  
  191.     if (trim(document.forms['frmSurvey'].txtMaximumResponses.value) != "")
  192.     {    
  193.         if (isNumeric(trim(document.forms['frmSurvey'].txtMaximumResponses.value)) == false)
  194.         {
  195.             alert("Please enter a numeric value for the Maximum Responses for the survey.");
  196.             document.forms['frmSurvey'].txtMaximumResponses.focus();
  197.             return false;
  198.         }
  199.     }
  200.         
  201.     if (trim(document.forms['frmSurvey'].txtMaximumResponsesPerUser.value) != "")
  202.     {    
  203.         if (isNumeric(trim(document.forms['frmSurvey'].txtMaximumResponsesPerUser.value)) == false)
  204.         {
  205.             alert("Please enter a numeric value for the Maximum Responses per User.");
  206.             document.forms['frmSurvey'].txtMaximumResponsesPerUser.focus();
  207.             return false;
  208.         }
  209.     }
  210.  
  211.     // Check to make sure that the the current user has entered his username in the list of owners
  212.     owners = document.forms['frmSurvey'].txtOwners.value;
  213.         
  214.     if (owners.indexOf('<%=GetUsername()%>') >= 0) // means that the current user's login is in the string
  215.     {
  216.         // Nothing to do here
  217.     }
  218.     else
  219.     {
  220.         alert("You must include your own login in the list of owners");
  221.         document.forms['frmSurvey'].txtOwners.value = owners + '\;' + '<%=GetUsername()%>';
  222.         document.forms['frmSurvey'].txtOwners.focus();
  223.         return false;
  224.     }
  225.     
  226.     if (trim(document.forms['frmSurvey'].txtAdminEmailAddress.value) == '')
  227.     {    
  228.         alert("Please enter a value for the Admin email address.");
  229.         document.forms['frmSurvey'].txtAdminEmailAddress.focus();
  230.         return false;
  231.     }
  232.  
  233.     // Check the admin email address
  234.     var strEmailAddresses = document.forms['frmSurvey'].txtAdminEmailAddress.value;
  235.     
  236.     // Check to make sure that there are no commas
  237.     if (strEmailAddresses.indexOf(',') != -1)
  238.     {
  239.         alert("There should not be any commas in the admin email address.");
  240.         document.forms['frmSurvey'].txtAdminEmailAddresses.focus();
  241.         return false;
  242.     }
  243.         
  244.     // Check to make sure that all of the email addresses are in the correct format
  245.     var arrEmailAddresses = strEmailAddresses.split(';');
  246.     for (i = 0; i < arrEmailAddresses.length; i++)
  247.     {
  248.         strTemp = trim(arrEmailAddresses[i]);
  249.         if (strTemp.length > 0) 
  250.         {
  251.             if (isValidEmailAddress(trim(arrEmailAddresses[i])) == false)
  252.             {
  253.                 alert("The following Admin Email address is not a valid format for an email address: " + arrEmailAddresses[i]);
  254.                 document.forms['frmSurvey'].txtAdminEmailAddress.focus();
  255.                 return false;
  256.             }
  257.         }
  258.     }
  259.  
  260.     return true;
  261. }
  262. </script>
  263.  
  264. <body class="MainBodyStyle" onLoad="javascript:document.forms['frmSurvey'].txtTitle.focus();">
  265. <%
  266.     'Select the general survey information for display on the update screen    
  267.     Set rsSurvey = Server.CreateObject("ADODB.Recordset")
  268.     strSQL = "SELECT status, title, template_id, survey_language, completion_action, " & _
  269.                 "response_count, start_date, end_date, maximum_responses_for_survey, " & _
  270.                 "maximum_responses_per_user, report_security, page_numbering_format, respondent_access_level, " & _
  271.                 "modify_survey_within_days, admin_email_address, survey_complete_redirect_url, " & _
  272.                 "survey_complete_display_close, survey_complete_display_continue, survey_complete_display_reports, " & _
  273.                 "created_date, launched_date, closed_date, question_numbering_format, " & _
  274.                 "back_button_display, cancel_button_display, cancel_button_redirect_url, " & _
  275.                 "highlight_responses_yn, survey_complete_message, response_email_addresses, owners " & _
  276.                 "FROM sur_survey " & _
  277.                 "WHERE survey_id = " & lngSurveyID
  278.     rsSurvey.Open ConvertSQL(strSQL), SURVEY_APP_CONNECTION, adOpenForwardOnly, adLockReadOnly, adCmdText
  279.     rsSurvey.MoveFirst
  280.     strStatus = rsSurvey("status")
  281.     strTitle = rsSurvey("title")
  282.     lngRespondentAccessLevel = rsSurvey("respondent_access_level")
  283. %>
  284.  
  285. <!--#Include File="Include/FrameworkTop_inc.asp"-->
  286.  
  287. <table border="0" cellspacing="0" cellpadding="0" width="754" class="MediumBlueBackgroundColor">
  288.     <tr>
  289.         <td height="36" valign="center">
  290.               <span class="H1HeadingStyle"><a name="skipnav" tabindex="1">Survey Options</a></span> <img style="cursor:hand" alt="Help" onClick="javascript:window.open('Help/Help.htm#SurveyOptions', 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">
  291.         </td>
  292.     </tr>
  293. </table>
  294.  
  295. <!--#Include File="Include/FrameworkTop2_inc.asp"-->
  296.  
  297. <form name="frmSurvey" method="post" action="SurveyAction.asp" onSubmit="return submitCheck();">
  298.     <input type="hidden" name="SurveyID" value="<%=lngSurveyID%>">
  299.     <input type="hidden" name="Nav" value="<%=strNav%>">
  300.     <table border="0" cellpadding="0" cellspacing="6" width="740" class="LightGrayBackgroundColor">
  301.         <tr>
  302.             <td width="1" rowspan="20"></td>
  303. <%
  304.             'Determine the value to display
  305.             strValue = "'" & strTitle & "' Survey"
  306. %>        
  307.             <td valign="middle" height="26">
  308.                 <span class="H2HeadingStyle"><%=strValue%></span>
  309.             </td>
  310.             <td width="1" rowspan="20"></td>
  311.         </tr>
  312.         <tr>
  313.             <td height="18" valign="top" class="Normal">
  314.                 Please make changes in the form below. Note that all fields marked with an asterisk (<span class="Required">*</span>) are required.
  315.             </td>
  316.         </tr>
  317.     </table>
  318.     <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="1" background="Resources/Images/ThinDivider.gif"></td></tr>
  319.     <table border="0" cellpadding="0" cellspacing="6" width="740" class="WhiteBackgroundColor">
  320.         <tr>
  321.             <td width="1" rowspan="20"></td>
  322.             <td colspan="2" valign="center" height="38" align="left">
  323.                 <span class="QuestionSectionHeadingSpanStyle">General Information</span>
  324.             </td>
  325.             <td width="1" rowspan="20"></td>
  326.         </tr>
  327.         <tr>
  328. <%
  329.             'Determine the value to display
  330.             strValue = strTitle
  331. %>        
  332.             <td width="160" valign="top" class="NormalBold">
  333.                 <label for="txtTitle">Title:</label><span class="Required">*</span>
  334.             </td>
  335.             <td width="580" valign="top" class="Normal">
  336.                 <input type="text" name="txtTitle" id="txtTitle" maxlength="50" value="<%=strValue%>" style="width:480">
  337.             </td>
  338.         </tr>
  339.         <tr>
  340.             <td valign="top" class="NormalBold">
  341.                 <label for="cboTemplateID">Template:</label>
  342.             </td>
  343. <%
  344.             'Determine the value to display
  345.             strValue = rsSurvey("template_id")
  346. %>        
  347.             <td valign="top" class="Normal">
  348.                 <span class="InlineHelpSpanStyle">Set the look and feel of your survey by selecting a template.  To change the look 
  349.                 and feel, you may modify or create a new template for this survey.<br></span>
  350.                 <select name="cboTemplateID" id="cboTemplateID" style="width:200">
  351.                     <option <% If CStr(strValue) = CStr(SUR_DEFAULT_TEMPLATE_ID) Then Response.Write "selected" End If %> value="<%=SUR_DEFAULT_TEMPLATE_ID%>">[Default Template]</option>
  352. <%
  353.                     'Select the list of all templates that the current user can user.
  354.                     strSQL = "SELECT template_id, template_name " & _
  355.                              "FROM sur_template " & _
  356.                              "WHERE active_yn = " & SQLEncode(SUR_BOOLEAN_POSITIVE) & _
  357.                              "AND template_id <> " & SUR_DEFAULT_TEMPLATE_ID
  358.                     'If the user is not an admin, limit the templates to only those templates where either the user is an owner
  359.                     'or where the template is publicly usable.
  360.                     If lngUserSecurityLevel <> SUR_SECURITY_LEVEL_ADMIN Then
  361.                         strSQL = strSQL & " AND (user_id = " & GetUserID() & " OR allow_use_yn = " & SQLEncode(SUR_BOOLEAN_POSITIVE) & ")"
  362.                     End If
  363.  
  364.                     strSQL = strSQL & " ORDER BY template_name"
  365.                     rsTemplates.Open ConvertSQL(strSQL), SURVEY_APP_CONNECTION, adOpenForwardOnly, adLockReadOnly, adCmdText
  366.                     If Not rsTemplates.EOF Then
  367.                         rsTemplates.MoveFirst
  368.                         Do While Not rsTemplates.EOF
  369. %>
  370.                             <option <% If CStr(strValue) = CStr(rsTemplates("template_id")) Then Response.Write "selected" End If %> value="<%=rsTemplates("template_id")%>"><%=rsTemplates("template_name")%></option>
  371. <%
  372.                             rsTemplates.MoveNext
  373.                         Loop
  374.                     End If
  375. %>
  376.                 </select>
  377.                 <img onClick="javascript:window.open('PreviewTemplate.asp?TemplateID=' + document.forms['frmSurvey'].cboTemplateID.value);" alt="Preview the look and feel of the selected template" border="0" src="Resources/Buttons/PreviewSmall.gif" onMouseOver="this.style.cursor='hand'">
  378.             </td>
  379.         </tr>
  380.         <tr>
  381.             <td valign="middle" class="NormalBold">
  382.                 <label for="cboSurveyLanguage">Survey Language:</label>
  383.             </td>
  384. <%
  385.             'Determine the value to display
  386.             strValue = rsSurvey("survey_language")
  387. %>        
  388.             <td valign="top" class="Normal">
  389.                 <select name="cboSurveyLanguage" id="cboSurveyLanguage" style="width:200">
  390.                     <option <% If strValue = "af" Then Response.Write "selected" End If %> value="af">Afrikaans</option>
  391.                     <option <% If strValue = "sq" Then Response.Write "selected" End If %> value="sq">Albanian</option>
  392.                     <option <% If strValue = "ar-dz" Then Response.Write "selected" End If %> value="ar-dz">Arabic (Algeria)</option>
  393.                     <option <% If strValue = "ar-bh" Then Response.Write "selected" End If %> value="ar-bh">Arabic (Bahrain)</option>
  394.                     <option <% If strValue = "ar-eg" Then Response.Write "selected" End If %> value="ar-eg">Arabic (Egypt)</option>
  395.                     <option <% If strValue = "ar-iq" Then Response.Write "selected" End If %> value="ar-iq">Arabic (Iraq)</option>
  396.                     <option <% If strValue = "ar-jo" Then Response.Write "selected" End If %> value="ar-jo">Arabic (Jordan)</option>
  397.                     <option <% If strValue = "ar-kw" Then Response.Write "selected" End If %> value="ar-kw">Arabic (Kuwait)</option>
  398.                     <option <% If strValue = "ar-lb" Then Response.Write "selected" End If %> value="ar-lb">Arabic (Lebanon)</option>
  399.                     <option <% If strValue = "ar-ly" Then Response.Write "selected" End If %> value="ar-ly">Arabic (Libya)</option>
  400.                     <option <% If strValue = "ar-ma" Then Response.Write "selected" End If %> value="ar-ma">Arabic (Morocco)</option>
  401.                     <option <% If strValue = "ar-om" Then Response.Write "selected" End If %> value="ar-om">Arabic (Oman)</option>
  402.                     <option <% If strValue = "ar-qa" Then Response.Write "selected" End If %> value="ar-qa">Arabic (Qatar)</option>
  403.                     <option <% If strValue = "ar-sa" Then Response.Write "selected" End If %> value="ar-sa">Arabic (Saudi Arabia)</option>
  404.                     <option <% If strValue = "ar-sy" Then Response.Write "selected" End If %> value="ar-sy">Arabic (Syria)</option>
  405.                     <option <% If strValue = "ar-tn" Then Response.Write "selected" End If %> value="ar-tn">Arabic (Tunisia)</option>
  406.                     <option <% If strValue = "ar-ae" Then Response.Write "selected" End If %> value="ar-ae">Arabic (U.A.E.)</option>
  407.                     <option <% If strValue = "ar-ye" Then Response.Write "selected" End If %> value="ar-ye">Arabic (Yemen)</option>
  408.                     <option <% If strValue = "eu" Then Response.Write "selected" End If %> value="eu">Basque</option>
  409.                     <option <% If strValue = "be" Then Response.Write "selected" End If %> value="be">Belarusian</option>
  410.                     <option <% If strValue = "bg" Then Response.Write "selected" End If %> value="bg">Bulgarian</option>
  411.                     <option <% If strValue = "ca" Then Response.Write "selected" End If %> value="ca">Catalan</option>
  412.                     <option <% If strValue = "zh-hk" Then Response.Write "selected" End If %> value="zh-hk">Chinese (Hong Kong, SAR)</option>
  413.                     <option <% If strValue = "zh-cn" Then Response.Write "selected" End If %> value="zh-cn">Chinese (PRC)</option>
  414.                     <option <% If strValue = "zh-sg" Then Response.Write "selected" End If %> value="zh-sg">Chinese (Singapore)</option>
  415.                     <option <% If strValue = "zh-tw" Then Response.Write "selected" End If %> value="zh-tw">Chinese (Taiwan)</option>
  416.                     <option <% If strValue = "hr" Then Response.Write "selected" End If %> value="hr">Croatian</option>
  417.                     <option <% If strValue = "cs" Then Response.Write "selected" End If %> value="cs">Czech</option>
  418.                     <option <% If strValue = "da" Then Response.Write "selected" End If %> value="da">Danish</option>
  419.                     <option <% If strValue = "nl-be" Then Response.Write "selected" End If %> value="nl-be">Dutch (Belgium)</option>
  420.                     <option <% If strValue = "nl" Then Response.Write "selected" End If %> value="nl">Dutch (Standard)</option>
  421.                     <option <% If strValue = "en-au" Then Response.Write "selected" End If %> value="en-au">English (Australia)</option>
  422.                     <option <% If strValue = "en-bz" Then Response.Write "selected" End If %> value="en-bz">English (Belize)</option>
  423.                     <option <% If strValue = "en-ca" Then Response.Write "selected" End If %> value="en-ca">English (Canada)</option>
  424.                     <option <% If strValue = "en" Then Response.Write "selected" End If %> value="en">English (Caribbean)</option>
  425.                     <option <% If strValue = "en-gb" Then Response.Write "selected" End If %> value="en-gb">English (Great Britain)</option>
  426.                     <option <% If strValue = "en-ie" Then Response.Write "selected" End If %> value="en-ie">English (Ireland)</option>
  427.                     <option <% If strValue = "en-jm" Then Response.Write "selected" End If %> value="en-jm">English (Jamaica)</option>
  428.                     <option <% If strValue = "en-nz" Then Response.Write "selected" End If %> value="en-nz">English (New Zealand)</option>
  429.                     <option <% If strValue = "en-za" Then Response.Write "selected" End If %> value="en-za">English (South Africa)</option>
  430.                     <option <% If strValue = "en" Then Response.Write "selected" End If %> value="en">English (Standard)</option>
  431.                     <option <% If strValue = "en-us" Then Response.Write "selected" End If %> value="en-us">English (United States)</option>
  432.                     <option <% If strValue = "en-tt" Then Response.Write "selected" End If %> value="en-tt">English (Trinidad)</option>
  433.                     <option <% If strValue = "et" Then Response.Write "selected" End If %> value="et">Estonian</option>
  434.                     <option <% If strValue = "fo" Then Response.Write "selected" End If %> value="fo">Faeroese</option>
  435.                     <option <% If strValue = "fa" Then Response.Write "selected" End If %> value="fa">Farsi</option>
  436.                     <option <% If strValue = "fi" Then Response.Write "selected" End If %> value="fi">Finnish</option>
  437.                     <option <% If strValue = "fr-be" Then Response.Write "selected" End If %> value="fr-be">French (Belgium)</option>
  438.                     <option <% If strValue = "fr-ca" Then Response.Write "selected" End If %> value="fr-ca">French (Canada)</option>
  439.                     <option <% If strValue = "fr-lu" Then Response.Write "selected" End If %> value="fr-lu">French (Luxembourg)</option>
  440.                     <option <% If strValue = "fr" Then Response.Write "selected" End If %> value="fr">French (Standard)</option>
  441.                     <option <% If strValue = "fr-ch" Then Response.Write "selected" End If %> value="fr-ch">French (Switzerland)</option>
  442.                     <option <% If strValue = "gd-ie" Then Response.Write "selected" End If %> value="gd-ie">Gaelic (Ireland)</option>
  443.                     <option <% If strValue = "gd" Then Response.Write "selected" End If %> value="gd">Gaelic (Scotland)</option>
  444.                     <option <% If strValue = "de-at" Then Response.Write "selected" End If %> value="de-at">German (Austria)</option>
  445.                     <option <% If strValue = "de-li" Then Response.Write "selected" End If %> value="de-li">German (Liechtenstein)</option>
  446.                     <option <% If strValue = "de-lu" Then Response.Write "selected" End If %> value="de-lu">German (Luxembourg)</option>
  447.                     <option <% If strValue = "de" Then Response.Write "selected" End If %> value="de">German (Standard)</option>
  448.                     <option <% If strValue = "de-ch" Then Response.Write "selected" End If %> value="de-ch">German (Switzerland)</option>
  449.                     <option <% If strValue = "el" Then Response.Write "selected" End If %> value="el">Greek</option>
  450.                     <option <% If strValue = "he" Then Response.Write "selected" End If %> value="he">Hebrew</option>
  451.                     <option <% If strValue = "hi" Then Response.Write "selected" End If %> value="hi">Hindi</option>
  452.                     <option <% If strValue = "hu" Then Response.Write "selected" End If %> value="hu">Hungarian</option>
  453.                     <option <% If strValue = "is" Then Response.Write "selected" End If %> value="is">Icelandic</option>
  454.                     <option <% If strValue = "in" Then Response.Write "selected" End If %> value="in">Indonesian</option>
  455.                     <option <% If strValue = "it" Then Response.Write "selected" End If %> value="it">Italian (Standard)</option>
  456.                     <option <% If strValue = "it-ch" Then Response.Write "selected" End If %> value="it-ch">Italian (Switzerland)</option>
  457.                     <option <% If strValue = "ja" Then Response.Write "selected" End If %> value="ja">Japanese</option>
  458.                     <option <% If strValue = "ko" Then Response.Write "selected" End If %> value="ko">Korean (Standard)</option>
  459.                     <option <% If strValue = "ko" Then Response.Write "selected" End If %> value="ko">Korean (Johab)</option>
  460.                     <option <% If strValue = "lv" Then Response.Write "selected" End If %> value="lv">Latvian</option>
  461.                     <option <% If strValue = "lt" Then Response.Write "selected" End If %> value="lt">Lithuanian</option>
  462.                     <option <% If strValue = "mk" Then Response.Write "selected" End If %> value="mk">Macedonian</option>
  463.                     <option <% If strValue = "ms" Then Response.Write "selected" End If %> value="ms">Malaysian</option>
  464.                     <option <% If strValue = "mt" Then Response.Write "selected" End If %> value="mt">Maltese</option>
  465.                     <option <% If strValue = "no" Then Response.Write "selected" End If %> value="no">Norwegian (Bokmal)</option>
  466.                     <option <% If strValue = "nn-no" Then Response.Write "selected" End If %> value="nn-no">Norwegian (Nynorsk)</option>
  467.                     <option <% If strValue = "pl" Then Response.Write "selected" End If %> value="pl">Polish</option>
  468.                     <option <% If strValue = "pt-br" Then Response.Write "selected" End If %> value="pt-br">Portuguese (Brazil)</option>
  469.                     <option <% If strValue = "pt" Then Response.Write "selected" End If %> value="pt">Portuguese (Standard)</option>
  470.                     <option <% If strValue = "rm" Then Response.Write "selected" End If %> value="rm">Rhaeto-Romanic</option>
  471.                     <option <% If strValue = "ro-mo" Then Response.Write "selected" End If %> value="ro-mo">Romanian (Moldavia)</option>
  472.                     <option <% If strValue = "ro" Then Response.Write "selected" End If %> value="ro">Romanian (Standard)</option>
  473.                     <option <% If strValue = "ru-mo" Then Response.Write "selected" End If %> value="ru-mo">Russian (Moldavia)</option>
  474.                     <option <% If strValue = "ru" Then Response.Write "selected" End If %> value="ru">Russian (Standard)</option>
  475.                     <option <% If strValue = "sz" Then Response.Write "selected" End If %> value="sz">Sami (Lappish)</option>
  476.                     <option <% If strValue = "sr" Then Response.Write "selected" End If %> value="sr">Serbian (Cyrillic)</option>
  477.                     <option <% If strValue = "sr" Then Response.Write "selected" End If %> value="sr">Serbian (Latin)</option>
  478.                     <option <% If strValue = "sk" Then Response.Write "selected" End If %> value="sk">Slovak</option>
  479.                     <option <% If strValue = "sl" Then Response.Write "selected" End If %> value="sl">Slovenian</option>
  480.                     <option <% If strValue = "sb" Then Response.Write "selected" End If %> value="sb">Sorbian</option>
  481.                     <option <% If strValue = "es-ar" Then Response.Write "selected" End If %> value="es-ar">Spanish (Argentina)</option>
  482.                     <option <% If strValue = "es-bo" Then Response.Write "selected" End If %> value="es-bo">Spanish (Bolivia)</option>
  483.                     <option <% If strValue = "es-cl" Then Response.Write "selected" End If %> value="es-cl">Spanish (Chile)</option>
  484.                     <option <% If strValue = "es-co" Then Response.Write "selected" End If %> value="es-co">Spanish (Colombia)</option>
  485.                     <option <% If strValue = "es-cr" Then Response.Write "selected" End If %> value="es-cr">Spanish (Costa Rica)</option>
  486.                     <option <% If strValue = "es-do" Then Response.Write "selected" End If %> value="es-do">Spanish (Dominican Republic)</option>
  487.                     <option <% If strValue = "es-ec" Then Response.Write "selected" End If %> value="es-ec">Spanish (Ecuador)</option>
  488.                     <option <% If strValue = "es-sv" Then Response.Write "selected" End If %> value="es-sv">Spanish (El Salvador)</option>
  489.                     <option <% If strValue = "es-gt" Then Response.Write "selected" End If %> value="es-gt">Spanish (Guatemala)</option>
  490.                     <option <% If strValue = "es-hn" Then Response.Write "selected" End If %> value="es-hn">Spanish (Honduras)</option>
  491.                     <option <% If strValue = "es-mx" Then Response.Write "selected" End If %> value="es-mx">Spanish (Mexico)</option>
  492.                     <option <% If strValue = "es-ni" Then Response.Write "selected" End If %> value="es-ni">Spanish (Nicaragua)</option>
  493.                     <option <% If strValue = "es-pa" Then Response.Write "selected" End If %> value="es-pa">Spanish (Panama)</option>
  494.                     <option <% If strValue = "es-pe" Then Response.Write "selected" End If %> value="es-pe">Spanish (Peru)</option>
  495.                     <option <% If strValue = "es-py" Then Response.Write "selected" End If %> value="es-py">Spanish (Paraguay)</option>
  496.                     <option <% If strValue = "es-pr" Then Response.Write "selected" End If %> value="es-pr">Spanish (Puerto Rico)</option>
  497.                     <option <% If strValue = "es" Then Response.Write "selected" End If %> value="es">Spanish (Spain û Modern)</option>
  498.                     <option <% If strValue = "es" Then Response.Write "selected" End If %> value="es">Spanish (Spain û Traditional)</option>
  499.                     <option <% If strValue = "es-uy" Then Response.Write "selected" End If %> value="es-uy">Spanish (Uruguay)</option>
  500.                     <option <% If strValue = "es-ve" Then Response.Write "selected" End If %> value="es-ve">Spanish (Venezuela)</option>
  501.                     <option <% If strValue = "sx" Then Response.Write "selected" End If %> value="sx">Sutu</option>
  502.                     <option <% If strValue = "sv-fi" Then Response.Write "selected" End If %> value="sv-fi">Swedish (Finland)</option>
  503.                     <option <% If strValue = "sv" Then Response.Write "selected" End If %> value="sv">Swedish (Standard)</option>
  504.                     <option <% If strValue = "th" Then Response.Write "selected" End If %> value="th">Thai</option>
  505.                     <option <% If strValue = "ts" Then Response.Write "selected" End If %> value="ts">Tsonga</option>
  506.                     <option <% If strValue = "tn" Then Response.Write "selected" End If %> value="tn">Tswana</option>
  507.                     <option <% If strValue = "tr" Then Response.Write "selected" End If %> value="tr">Turkish</option>
  508.                     <option <% If strValue = "uk" Then Response.Write "selected" End If %> value="uk">Ukrainian</option>
  509.                     <option <% If strValue = "ur" Then Response.Write "selected" End If %> value="ur">Urdu</option>
  510.                     <option <% If strValue = "ve" Then Response.Write "selected" End If %> value="ve">Venda</option>
  511.                     <option <% If strValue = "vi" Then Response.Write "selected" End If %> value="vi">Vietnamese</option>
  512.                     <option <% If strValue = "xh" Then Response.Write "selected" End If %> value="xh">Xhosa</option>
  513.                     <option <% If strValue = "ji" Then Response.Write "selected" End If %> value="ji">Yiddish</option>
  514.                     <option <% If strValue = "zu" Then Response.Write "selected" End If %> value="zu">Zulu</option>
  515.                 </select>
  516.             </td>
  517.         </tr>
  518.         <tr> 
  519.             <td valign="middle" class="NormalBold">
  520.                 <label for="cboStatus">Status:</label>
  521.             </td>
  522.             <td valign="top" class="Normal">
  523. <%
  524.                 'Get the number of questions associated with this survey
  525.                 lngQuestionCount = GetQuestionCount(lngSurveyID)
  526.  
  527.                 'Only display this message if the status equals 'New' and the question count = 0
  528.                 If strStatus = SUR_STATUS_DESIGN And lngQuestionCount = 0 Then
  529. %>                
  530.                     <span class="InlineHelpSpanStyle">The status can be changed to something other than 'Design' only after at least one question has been added to the survey.<br></span>
  531. <%
  532.                 End If
  533. %>
  534.                 <select name="cboStatus" id="cboStatus" width="30" style="width:200">
  535. <%
  536.                     'Display the Design status if the survey is either in design or is open.  Once a survey has been 
  537.                     'set to live, a survey can go back to being in design.
  538.                     If strStatus = SUR_STATUS_DESIGN Or strStatus = SUR_STATUS_OPEN Then
  539. %>                
  540.                         <option selected value="<%=SUR_STATUS_DESIGN%>"><%=SUR_STATUS_DESIGN%></option>
  541. <%
  542.                     End If
  543.  
  544.                     'If the status is new, only display the Live option if the survey has questions
  545.                     If (strStatus <> SUR_STATUS_DESIGN) Or (strStatus = SUR_STATUS_DESIGN And lngQuestionCount > 0) Then
  546. %>                    
  547.                         <option <% If strStatus = SUR_STATUS_OPEN Then Response.Write("SELECTED") End If %> value="<%=SUR_STATUS_OPEN%>"><%=SUR_STATUS_OPEN%></option>
  548. <%                    
  549.                     End If
  550.                     
  551.                     'Only display Inactive and Closed status if the current status is not New.  When the status is New, 
  552.                     'the only change that can be made is to make the survey Live
  553.                     If strStatus <> SUR_STATUS_DESIGN Then
  554. %>                
  555.                         <option <% If strStatus = SUR_STATUS_CLOSED Then Response.Write("SELECTED") End If %> value="<%=SUR_STATUS_CLOSED%>"><%=SUR_STATUS_CLOSED%></option>
  556. <%
  557.                     End If
  558. %>                    
  559.                 </select>
  560.             </td>
  561.         </tr>
  562.         <tr>
  563. <%
  564.             'Determine the value to display.  
  565.             'Call a custom function to format the date in the format MM/DD/YYYY or DD/MM/YYYY
  566.             strValue = CustomDateFormatDisplay(rsSurvey("start_date"))
  567. %>        
  568.             <td valign="middle" class="NormalBold">
  569.                 <label for="txtStartDate">Start Date:</label>
  570.             </td>
  571.             <td valign="top" class="Normal">
  572.                 <input name="txtStartDate" id="txtStartDate" value="<%=strValue%>" style="width:80" size="10" maxlength="10" type="text">
  573.                 <span class="InlineHelpSpanStyle"><%=DisplayInternationalizedDateFormat()%></span>
  574.             </td>
  575.         </tr>
  576.         <tr>
  577. <%
  578.             'Determine the value to display
  579.             'Call a custom function to format the date in the format MM/DD/YYYY or DD/MM/YYYY
  580.             strValue = CustomDateFormatDisplay(rsSurvey("end_date"))
  581. %>        
  582.             <td valign="middle" class="NormalBold">
  583.                 <label for="txtEndDate">End Date:</label>
  584.             </td>
  585.             <td valign="top" class="Normal">
  586.                 <input name="txtEndDate" id="txtEndDate" value="<%=strValue%>" style="width:80" size="10" maxlength="10" type="text">
  587.                 <span class="InlineHelpSpanStyle"><%=DisplayInternationalizedDateFormat%></span>
  588.             </td>
  589.         </tr>
  590.         <tr> 
  591.             <td valign="middle" class="NormalBold" height="25">
  592.                 Date Created:
  593.             </td>
  594.             <td valign="middle" class="Normal">
  595.                 <%=CustomDateFormatDisplay(DateValue(rsSurvey("created_date")))%>
  596.             </td>
  597.         </tr>
  598. <%
  599.         'Only display the date launched if the survey is not in New status    
  600.         If strStatus <> SUR_STATUS_DESIGN Then
  601. %>
  602.             <tr> 
  603.                 <td valign="middle" class="NormalBold" height="25">
  604.                     Date Launched:
  605.                 </td>
  606.                 <td valign="middle" class="Normal">
  607.                     <%=CustomDateFormatDisplay(DateValue(rsSurvey("launched_date")))%>
  608.                 </td>
  609.             </tr>
  610. <%
  611.         End If
  612.  
  613.         'Only display the date closed if the status is Closed
  614.         If strStatus = SUR_STATUS_CLOSED Then
  615. %>
  616.             <tr> 
  617.                 <td valign="middle" class="NormalBold" height="25">
  618.                     Date Closed:
  619.                 </td>
  620.                 <td valign="middle" class="Normal">
  621. <%
  622.                     If Not IsNull(rsSurvey("closed_date")) Then
  623.                         Response.Write CustomDateFormatDisplay(DateValue(rsSurvey("closed_date")))
  624.                     Else
  625. %>
  626.                          
  627. <%
  628.                     End If
  629. %>                    
  630.                 </td>
  631.             </tr>
  632. <%
  633.         End If
  634.  
  635.         'Only display the response count if the survey is not in New status    
  636.         If strStatus <> SUR_STATUS_DESIGN Then
  637.             'Get the total number of responses
  638.             lngResponseCount = CLng(rsSurvey("response_count"))
  639. %>                    
  640.             <tr> 
  641.                 <td valign="middle" class="NormalBold" height="25">
  642.                     Responses:
  643.                 </td>
  644.                 <td valign="middle" class="Normal">
  645.                     <%=lngResponseCount%>
  646.                 </td>
  647.             </tr>
  648. <%
  649.         End If
  650. %>
  651.     </table>
  652.     <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="1" background="Resources/Images/ThinDivider.gif"></td></tr>
  653.     <table border="0" cellpadding="0" cellspacing="6" width="740" class="LightGrayBackgroundColor">
  654.         <tr>
  655.             <td width="1" rowspan="20"></td>
  656.             <td colspan="2" valign="center" height="38" align="left">
  657.                 <span class="QuestionSectionHeadingSpanStyle">Respondent Access Level</span>
  658.             </td>
  659.             <td width="1" rowspan="20"></td>
  660.         </tr>
  661.         <tr>
  662.             <td colspan="2" valign="top" class="Normal">
  663.                 <label for="optRespondentAccessLevel">Select the desired respondent access level from the choices below.</label>
  664.             </td>
  665.         </tr>
  666.         <tr>
  667.             <td valign="top" colspan="2" align="left">
  668.                 <table cellpadding="0" cellspacing="0" border="0" width="620">
  669.                     <tr>
  670.                         <td width="25" valign="top">
  671.                             <input <% If CStr(lngRespondentAccessLevel) = CStr(SUR_RESPONDENT_ACCESS_LEVEL_SINGLE_UPDATEABLE_LOGIN) Then Response.Write "checked" End If %> type="radio" name="optRespondentAccessLevel" id="optRespondentAccessLevel" value="<%=SUR_RESPONDENT_ACCESS_LEVEL_SINGLE_UPDATEABLE_LOGIN%>">
  672.                         </td>
  673.                         <td valign="top">
  674.                             <span class="NormalBold">Single Response, Login Required</span><span class="Normal"> - Respondents must log 
  675.                             in before responding to the survey, and are prevented from responding to the survey more than once.  Respondents 
  676.                             that return to a completed survey can edit their original responses.<br></span>
  677.                         </td>
  678.                     </tr>
  679.                     <tr>
  680.                         <td colspan="2" height="8"></td>
  681.                     </tr>
  682.                     <tr>
  683.                         <td width="25" valign="top">
  684.                             <input <% If CStr(lngRespondentAccessLevel) = CStr(SUR_RESPONDENT_ACCESS_LEVEL_SINGLE_FORWARD_ONLY_LOGIN) Then Response.Write "checked" End If %> type="radio" name="optRespondentAccessLevel" id="optRespondentAccessLevel" value="<%=SUR_RESPONDENT_ACCESS_LEVEL_SINGLE_FORWARD_ONLY_LOGIN%>">
  685.                         </td>
  686.                         <td valign="top">
  687.                             <span class="NormalBold">Single Response, Login Required (Not Updateable)</span><span class="Normal"> - Respondents must log 
  688.                             in before responding to the survey, and are prevented from responding to the survey more than once.  Respondents 
  689.                             that attempt to return to a completed survey are not able to modify their original responses.<br></span>
  690.                         </td>
  691.                     </tr>
  692.                     <tr>
  693.                         <td colspan="2" height="8"></td>
  694.                     </tr>
  695.                     <tr>
  696.                         <td width="25" valign="top">
  697.                             <input <% If CStr(lngRespondentAccessLevel) = CStr(SUR_RESPONDENT_ACCESS_LEVEL_SINGLE_UPDATEABLE_ANONYMOUS) Then Response.Write "checked" End If %> type="radio" name="optRespondentAccessLevel" id="optRespondentAccessLevel" value="<%=SUR_RESPONDENT_ACCESS_LEVEL_SINGLE_UPDATEABLE_ANONYMOUS%>">
  698.                         </td>
  699.                         <td valign="top">
  700.                             <span class="NormalBold">Single Response, Anonymous Access Allowed</span><span class="Normal"> - Respondents are allowed to 
  701.                             respond to a survey anonymously (without logging in).  Respondents may also log in before responding to a survey.  Either way, 
  702.                             respondents are prevented from responding to the survey more than once.  Respondents that return to a completed survey 
  703.                             can edit their original responses.<br></span>
  704.                         </td>
  705.                     </tr>
  706.                     <tr>
  707.                         <td colspan="2" height="8"></td>
  708.                     </tr>
  709.                     <tr>
  710.                         <td width="25" valign="top">
  711.                             <input <% If CStr(lngRespondentAccessLevel) = CStr(SUR_RESPONDENT_ACCESS_LEVEL_SINGLE_FORWARD_ONLY_ANONYMOUS) Then Response.Write "checked" End If %> type="radio" name="optRespondentAccessLevel" id="optRespondentAccessLevel" value="<%=SUR_RESPONDENT_ACCESS_LEVEL_SINGLE_FORWARD_ONLY_ANONYMOUS%>">
  712.                         </td>
  713.                         <td valign="top">
  714.                             <span class="NormalBold">Single Response, Anonymous Access Allowed (Not Updateable)</span><span class="Normal"> - Respondents are allowed to 
  715.                             respond to a survey anonymously (without logging in).  Respondents may also log in before responding to a survey.  Either way, 
  716.                             respondents are prevented from responding to the survey more than once.  Respondents that attempt to return to a completed 
  717.                             survey are not able to modify their original responses.<br></span>
  718.                         </td>
  719.                     </tr>
  720.                     <tr>
  721.                         <td colspan="2" height="8"></td>
  722.                     </tr>
  723.                     <tr>
  724.                         <td width="25" valign="top">
  725.                             <input <% If CStr(lngRespondentAccessLevel) = CStr(SUR_RESPONDENT_ACCESS_LEVEL_MULTIPLE_LOGIN) Then Response.Write "checked" End If %> type="radio" name="optRespondentAccessLevel" id="optRespondentAccessLevel" value="<%=SUR_RESPONDENT_ACCESS_LEVEL_MULTIPLE_LOGIN%>">
  726.                         </td>
  727.                         <td valign="top">
  728.                             <span class="NormalBold">Multiple Response, Login Required (Not Updateable)</span><span class="Normal"> - Respondents must log 
  729.                             in before responding to the survey, and may respond to the survey as many times as they want.  Respondents cannot 
  730.                             update prior responses.<br></span>
  731.                         </td>
  732.                     </tr>
  733.                     <tr>
  734.                         <td colspan="2" height="8"></td>
  735.                     </tr>
  736.                     <tr>
  737.                         <td width="25" valign="top">
  738.                             <input <% If CStr(lngRespondentAccessLevel) = CStr(SUR_RESPONDENT_ACCESS_LEVEL_MULTIPLE_ANONYMOUS) Then Response.Write "checked" End If %> type="radio" name="optRespondentAccessLevel" id="optRespondentAccessLevel" value="<%=SUR_RESPONDENT_ACCESS_LEVEL_MULTIPLE_ANONYMOUS%>">
  739.                         </td>
  740.                         <td valign="top">
  741.                             <span class="NormalBold">Multiple Response, Anonymous Access Allowed (Not Updateable)</span><span class="Normal"> - Respondents are allowed to 
  742.                             respond to a survey anonymously (without logging in).  Respondents may also log in before responding to a survey.  Either way, 
  743.                             respondents may respond to the survey as many times as they want.  Respondents cannot update prior responses.<br></span>
  744.                         </td>
  745.                     </tr>
  746.                     <tr>
  747.                         <td colspan="2" height="8"></td>
  748.                     </tr>
  749.                     <tr>
  750.                         <td width="25" valign="top">
  751.                             <input <% If CStr(lngRespondentAccessLevel) = CStr(SUR_RESPONDENT_ACCESS_LEVEL_MANUAL_ENTRY) Then Response.Write "checked" End If %> type="radio" name="optRespondentAccessLevel" id="optRespondentAccessLevel" value="<%=SUR_RESPONDENT_ACCESS_LEVEL_MANUAL_ENTRY%>">
  752.                         </td>
  753.                         <td valign="top">
  754.                             <span class="NormalBold">Manual Response Entry</span><span class="Normal"> - Survey owners and application 
  755.                             administrators can enter unlimited responses.  This access level takes precedence over all other 
  756.                             access levels, and prevents standard respondents from taking the survey. After completing each response, the 
  757.                             user is returned to the start of the survey to submit a new response.<br></span>
  758.                         </td>
  759.                     </tr>
  760.                     <tr>
  761.                         <td colspan="2" height="8"></td>
  762.                     </tr>
  763.                 </table>
  764.             </td>
  765.         </tr>
  766.     </table>
  767.     <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="1" background="Resources/Images/ThinDivider.gif"></td></tr>
  768.     <table border="0" cellpadding="0" cellspacing="6" width="740" class="WhiteBackgroundColor">
  769.         <tr>
  770.             <td width="1" rowspan="20"></td>
  771.             <td colspan="2" valign="center" height="38" align="left">
  772.                 <span class="QuestionSectionHeadingSpanStyle">Survey Completion Properties</span>
  773.             </td>
  774.             <td width="1" rowspan="20"></td>
  775.         </tr>
  776.         <tr>
  777.             <td valign="top" class="NormalBold" width="160">
  778.                 <label for="cboCompletionAction">Completion Action:</label><span class="Required">*</span>
  779.             </td>
  780. <%
  781.             'Determine the value to display
  782.             strValue = rsSurvey("completion_action")
  783. %>        
  784.             <td valign="top" class="Normal">
  785.                 <select name="cboCompletionAction" id="cboCompletionAction" style="width:290">
  786.                     <option <% If strValue = SUR_COMPLETION_ACTION_DISPLAY_MESSAGE Then Response.Write("selected") End If %> value="<%=SUR_COMPLETION_ACTION_DISPLAY_MESSAGE%>"><%=SUR_COMPLETION_ACTION_DISPLAY_MESSAGE%></option>
  787.                     <option <% If strValue = SUR_COMPLETION_ACTION_DISPLAY_RESULTS Then Response.Write("selected") End If %> value="<%=SUR_COMPLETION_ACTION_DISPLAY_RESULTS%>"><%=SUR_COMPLETION_ACTION_DISPLAY_RESULTS%></option>
  788.                     <option <% If strValue = SUR_COMPLETION_ACTION_REDIRECT Then Response.Write("selected") End If %> value="<%=SUR_COMPLETION_ACTION_REDIRECT%>"><%=SUR_COMPLETION_ACTION_REDIRECT%></option>
  789.                     <option <% If strValue = SUR_COMPLETION_ACTION_CLOSE Then Response.Write("selected") End If %> value="<%=SUR_COMPLETION_ACTION_CLOSE%>"><%=SUR_COMPLETION_ACTION_CLOSE%></option>
  790.                 </select>
  791.             </td>
  792.         </tr>
  793.         <tr>
  794. <%
  795.             'Determine the value to display
  796.             strValue = rsSurvey("survey_complete_message")
  797. %>        
  798.             <td valign="top" class="NormalBold">
  799.                 <label for="txtSurveyCompleteMessage">Completion Message:</label>
  800.             </td>
  801.             <td valign="top" class="Normal">
  802.                 <span class="InlineHelpSpanStyle">Enter a message to display to the user after completing the survey.  You may use 
  803.                 HTML to format the message as desired.<br></span>
  804.                 <textarea class="TextareaStyle" name="txtSurveyCompleteMessage" id="txtSurveyCompleteMessage" rows="3" style="width:480px"><%=strValue%></textarea>
  805.             </td>
  806.         </tr>
  807.         <tr>
  808.             <td valign="top" class="NormalBold">
  809.                 <label for="txtSurveyCompleteRedirectURL">Completion URL:</label>
  810.             </td>
  811.             <td valign="top" class="Normal">
  812. <%
  813.             'Determine the value to display
  814.             strValue = rsSurvey("survey_complete_redirect_url")
  815. %>        
  816.                 <span class="InlineHelpSpanStyle">Enter the URL for the Continue button or to redirect to after completing the survey.</span><br>
  817.                 <input type="text" name="txtSurveyCompleteRedirectURL" id="txtSurveyCompleteRedirectURL" value="<%=strValue%>" maxlength="150" style="width:480">
  818.             </td>
  819.         </tr>
  820.         <tr>
  821.             <td valign="top" class="NormalBold">
  822.                 <label for="chkCloseButton">Buttons:</label><label for="chkContinueButton"> </label><label for="chkReportsButton"> </label>
  823.             </td>
  824.             <td valign="top" class="Normal">
  825.                 <span class="InlineHelpSpanStyle"> Select the buttons to display beneath the message entered above.</span><br>
  826. <%
  827.                 'Determine the value to display
  828.                 strValue = rsSurvey("survey_complete_display_close")
  829. %>        
  830.                 <input <% If strValue = SUR_BOOLEAN_POSITIVE Then Response.Write "checked" End If %> type="checkbox" name="chkCloseButton" id="chkCloseButton"> <span class="InlineHelpSpanStyle">Close Button</span>        
  831. <%
  832.                 'Determine the value to display
  833.                 strValue = rsSurvey("survey_complete_display_continue")
  834. %>        
  835.                 <input <% If strValue = SUR_BOOLEAN_POSITIVE Then Response.Write "checked" End If %> type="checkbox" name="chkContinueButton" id="chkContinueButton"> <span class="InlineHelpSpanStyle">Continue Button</span>        
  836. <%
  837.                 'Determine the value to display
  838.                 strValue = rsSurvey("survey_complete_display_reports")
  839. %>        
  840.                 <input <% If strValue = SUR_BOOLEAN_POSITIVE Then Response.Write "checked" End If %> type="checkbox" name="chkReportsButton" id="chkReportsButton"> <span class="InlineHelpSpanStyle">View Reports Button</span>
  841.             </td>
  842.         </tr>
  843.         <tr>
  844. <%
  845.             'Determine the value to display
  846.             strValue = rsSurvey("response_email_addresses")
  847. %>        
  848.             <td valign="top" class="NormalBold">
  849.                 <label for="txtResponseEmailAddresses">Send Responses To:</label>
  850.             </td>
  851.             <td valign="top" class="Normal">
  852.                 <span class="InlineHelpSpanStyle">Enter the email addresses, each separated by a semi-colon, that responses 
  853.                 should be sent to upon completion.  Leave blank if the responses should not be emailed. 
  854.                 </span>
  855.                 <br>
  856.                 <input type="text" name="txtResponseEmailAddresses" id="txtResponseEmailAddresses" value="<%=strValue%>" maxlength="1024" size="23" style="width:480">
  857.             </td>
  858.         </tr>
  859.     </table>
  860.     <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="1" background="Resources/Images/ThinDivider.gif"></td></tr>
  861.     <table border="0" cellpadding="0" cellspacing="6" width="740" class="LightGrayBackgroundColor">
  862.         <tr>
  863.             <td width="1" rowspan="20"></td>
  864.             <td colspan="2" valign="center" height="38" align="left">
  865.                 <span class="QuestionSectionHeadingSpanStyle">Navigation Properties</span>
  866.             </td>
  867.             <td width="1" rowspan="20"></td>
  868.         </tr>
  869.         <tr>
  870.             <td valign="top" class="NormalBold" width="160">
  871.                 <label for="cboBackButtonDisplay">Back Button:</label>
  872.             </td>
  873. <%
  874.             'Determine the value to display
  875.             strValue = rsSurvey("back_button_display")
  876. %>        
  877.             <td valign="top" class="Normal">
  878.                 <select name="cboBackButtonDisplay" id="cboBackButtonDisplay" style="width:290">
  879.                     <option <% If strValue = SUR_BACK_BUTTON_DO_NOT_DISPLAY Then Response.Write("selected") End If %> value="<%=SUR_BACK_BUTTON_DO_NOT_DISPLAY%>"><%=SUR_BACK_BUTTON_DO_NOT_DISPLAY%></option>
  880.                     <option <% If strValue = SUR_BACK_BUTTON_DISPLAY Then Response.Write("selected") End If %> value="<%=SUR_BACK_BUTTON_DISPLAY%>"><%=SUR_BACK_BUTTON_DISPLAY%></option>
  881.                 </select>
  882.             </td>
  883.         </tr>
  884.         <tr>
  885.             <td valign="top" class="NormalBold">
  886.                 <label for="cboCancelButtonDisplay">Cancel Button:</label>
  887.             </td>
  888. <%
  889.             'Determine the value to display
  890.             strValue = rsSurvey("cancel_button_display")
  891. %>        
  892.             <td valign="top" class="Normal">
  893.                 <select name="cboCancelButtonDisplay" id="cboCancelButtonDisplay" style="width:290">
  894.                     <option <% If strValue = SUR_CANCEL_BUTTON_CLOSE Then Response.Write("selected") End If %> value="<%=SUR_CANCEL_BUTTON_CLOSE%>"><%=SUR_CANCEL_BUTTON_CLOSE%></option>
  895.                     <option <% If strValue = SUR_CANCEL_BUTTON_DO_NOT_DISPLAY Then Response.Write("selected") End If %> value="<%=SUR_CANCEL_BUTTON_DO_NOT_DISPLAY%>"><%=SUR_CANCEL_BUTTON_DO_NOT_DISPLAY%></option>
  896.                     <option <% If strValue = SUR_CANCEL_BUTTON_END_OF_SURVEY Then Response.Write("selected") End If %> value="<%=SUR_CANCEL_BUTTON_END_OF_SURVEY%>"><%=SUR_CANCEL_BUTTON_END_OF_SURVEY%></option>
  897.                     <option <% If strValue = SUR_CANCEL_BUTTON_REDIRECT Then Response.Write("selected") End If %> value="<%=SUR_CANCEL_BUTTON_REDIRECT%>"><%=SUR_CANCEL_BUTTON_REDIRECT%></option>
  898.                 </select>
  899.             </td>
  900.         </tr>
  901.         <tr>
  902.             <td valign="top" class="NormalBold">
  903.                 <label for="txtCancelButtonRedirectURL">Cancel Button URL:</label>
  904.             </td>
  905.             <td valign="top" class="Normal">
  906. <%
  907.             'Determine the value to display
  908.             strValue = rsSurvey("cancel_button_redirect_url")
  909. %>        
  910.                 <span class="InlineHelpSpanStyle">Enter the URL to redirect to if the user clicks the Cancel button while taking a survey.</span><br>
  911.                 <input type="text" name="txtCancelButtonRedirectURL" id="txtCancelButtonRedirectURL" value="<%=strValue%>" maxlength="150" style="width:480">
  912.             </td>
  913.         </tr>
  914.     </table>
  915.     <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="1" background="Resources/Images/ThinDivider.gif"></td></tr>
  916.     <table border="0" cellpadding="0" cellspacing="6" width="740" class="WhiteBackgroundColor">
  917.         <tr>
  918.             <td width="1" rowspan="20"></td>
  919.             <td colspan="2" valign="bottom" height="30" align="left">
  920.                 <span class="QuestionSectionHeadingSpanStyle">Hidden Fields</span>
  921.             </td>
  922.             <td width="1" rowspan="20"></td>
  923.         </tr>
  924.         <tr>
  925.             <td valign="center" width="160">
  926.                 <span class="NormalBold" >
  927.                     Configured Fields:
  928.                 </span>
  929.             </td>
  930.             <td valign="top" class="Normal">
  931. <%
  932.                 strSQL = "SELECT hidden_field_type, hidden_field_key " & _
  933.                      "FROM sur_hidden_field " & _
  934.                      "WHERE survey_id = " & lngSurveyID & _
  935.                      " ORDER BY order_number"
  936.                 rsHiddenFields.Open ConvertSQL(strSQL), SURVEY_APP_CONNECTION, adOpenForwardOnly, adLockReadOnly, adCmdText
  937.                 If rsHiddenFields.EOF = True Then
  938. %>
  939.                     <table cellpadding="3" cellspacing="0" width="540" border="0" summary="This section displays a list of all hidden fields associated with this survey.">
  940.                         <tr>
  941.                             <th id="NoneAvailableMessage" valign="center" width="420" align="left">
  942.                                 <span class="InlineHelpSpanStyle">
  943. <%
  944.                                     'Hidden fields can only be configured if the survey has not responses
  945.                                     If CLng(lngResponseCount) = 0 Then
  946. %>
  947.                                         There are no hidden fields configured for this survey. Click the "Configure..." button to add fields or to learn more about hidden fields.
  948. <%
  949.                                     Else
  950. %>
  951.                                         There are no hidden fields configured for this survey. Hidden fields can only be added to a survey that does not have any responses.
  952. <%
  953.                                     End If
  954. %>
  955.                                     
  956.                                 </span>
  957.                             </th>
  958.                             <th id="Configure" valign="top" width="120" align="right">
  959. <%
  960.                                 'Hidden fields can only be configured if the survey has not responses
  961.                                 If CLng(lngResponseCount) = 0 Then
  962. %>
  963.                                     <a href="HiddenFieldList.asp?SurveyID=<%=lngSurveyID%>&SurveyName=<%=strTitle%>"><img border="0" src="Resources/Buttons/Configure.gif" alt="Configure hidden fields"></a>
  964. <%
  965.                                 End If
  966. %>
  967.                             </th>
  968.                         </tr>
  969.                     </table>
  970. <%
  971.                 Else
  972. %>
  973.                     <table cellpadding="3" cellspacing="0" width="540" border="0" summary="This section displays a list of all hidden fields associated with this survey.">
  974.                         <tr>
  975.                             <th id="FieldType" width="200" align="left" class="TableHeadingColor">
  976.                                 <span class="NormalBold">
  977.                                     Field Type
  978.                                 </span>
  979.                             </th>
  980.                             <th id="FieldName" width="200" align="left" class="TableHeadingColor">
  981.                                 <span class="NormalBold">
  982.                                     Field Name
  983.                                 </span>
  984.                             </th>
  985.                             <th id="Configure" width="140" align="right" valign="center" rowspan="25" class="WhiteBackgroundColor">
  986. <%
  987.                                 'Hidden fields can only be configured if the survey has not responses
  988.                                 If CLng(lngResponseCount) = 0 Then
  989. %>
  990.                                     <a href="HiddenFieldList.asp?SurveyID=<%=lngSurveyID%>&SurveyName=<%=strTitle%>"><img border="0" src="Resources/Buttons/Configure.gif" alt="Configure hidden fields"></a>
  991. <%
  992.                                 Else
  993. %>
  994.                                     <a href="javascript:alert('Hidden fields can only be added to a survey that does not have any responses.');"><img border="0" src="Resources/Buttons/Configure.gif" alt="Configure hidden fields"></a>
  995. <%
  996.                                 End If
  997. %>
  998.                             </th>
  999.                         </tr>
  1000. <%
  1001.                             rsHiddenFields.MoveFirst
  1002.                             Do While Not rsHiddenFields.EOF
  1003. %>
  1004.                                 <tr>
  1005.                                     <td align="left">
  1006.                                         <span class="Normal">
  1007.                                             <%=rsHiddenFields("hidden_field_type")%>
  1008.                                         </span>
  1009.                                     </td>
  1010.                                     <td align="left">
  1011.                                         <span class="Normal">
  1012.                                             <%=rsHiddenFields("hidden_field_key")%>
  1013.                                         </span>
  1014.                                     </td>
  1015.                                 </tr>
  1016. <%
  1017.                                 rsHiddenFields.MoveNext
  1018.                             Loop
  1019.                             
  1020.                             'Clean up 
  1021.                             rsHiddenFields.Close
  1022.                             Set rsHiddenFields = Nothing
  1023. %>
  1024.                     </table>
  1025. <%                
  1026.                 End If
  1027. %>
  1028.             </td>
  1029.         </tr>
  1030.     </table>
  1031.     <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="1" background="Resources/Images/ThinDivider.gif"></td></tr>
  1032.     <table border="0" cellpadding="0" cellspacing="6" width="740" class="LightGrayBackgroundColor">
  1033.         <tr>
  1034.             <td width="1" rowspan="20"></td>
  1035.             <td colspan="2" valign="center" height="30" align="left">
  1036.                 <span class="QuestionSectionHeadingSpanStyle">IP Address Validation</span>
  1037.             </td>
  1038.             <td width="1" rowspan="20"></td>
  1039.         </tr>
  1040.         <tr>
  1041.             <td valign="center" width="160">
  1042.                 <span class="NormalBold">
  1043.                     IP Address Ranges:
  1044.                 </span>
  1045.             </td>
  1046.             <td valign="top" class="Normal">
  1047. <%
  1048.                 strSQL = "SELECT ip_address_first, ip_address_second " & _
  1049.                      "FROM sur_ip_address " & _
  1050.                      "WHERE survey_id = " & lngSurveyID & _
  1051.                      " ORDER BY ip_address_first, ip_address_second"
  1052.                 rsIPAddresses.Open ConvertSQL(strSQL), SURVEY_APP_CONNECTION, adOpenForwardOnly, adLockReadOnly, adCmdText
  1053.                 If rsIPAddresses.EOF = True Then
  1054. %>
  1055.                     <table cellpadding="3" cellspacing="0" width="540" border="0" summary="This section displays a list of all IP address ranges associated with this survey.">
  1056.                         <tr>
  1057.                             <th id="NoIPAddressesMessage" valign="center" width="420" align="left">
  1058.                                 <span class="InlineHelpSpanStyle">
  1059.                                     There are no IP address ranges configured for this survey. Click the "Configure..." button to add IP address validation or to learn more.
  1060.                                 </span>
  1061.                             </th>
  1062.                             <th id="Configure" valign="top" width="120" align="right">
  1063.                                 <a href="IPAddressList.asp?SurveyID=<%=lngSurveyID%>&SurveyName=<%=strTitle%>"><img border="0" src="Resources/Buttons/Configure.gif" alt="Configure IP address ranges"></a>
  1064.                             </th>
  1065.                         </tr>
  1066.                     </table>
  1067. <%
  1068.                 Else
  1069. %>
  1070.                     <table cellpadding="3" cellspacing="0" width="540" border="0" summary="This section displays a list of all IP address ranges associated with this survey.">
  1071.                         <tr>
  1072.                             <th id="FirstIPAddress" width="200" align="left" class="TableHeadingColor">
  1073.                                 <span class="NormalBold">
  1074.                                     First IP Address
  1075.                                 </span>
  1076.                             </th>
  1077.                             <th id="SecondIPAddress" width="200" align="left" class="TableHeadingColor">
  1078.                                 <span class="NormalBold">
  1079.                                     Second IP Address
  1080.                                 </span>
  1081.                             </th>
  1082.                             <th id="Configure" width="140" align="right" valign="center" rowspan="25" class="LightGrayBackgroundColor">
  1083.                                 <a href="IPAddressList.asp?SurveyID=<%=lngSurveyID%>&SurveyName=<%=strTitle%>"><img border="0" src="Resources/Buttons/Configure.gif" alt="Configure IP address ranges"></a>
  1084.                             </th>
  1085.                         </tr>
  1086. <%
  1087.                             rsIPAddresses.MoveFirst
  1088.                             Do While Not rsIPAddresses.EOF
  1089. %>
  1090.                                 <tr>
  1091.                                     <td align="left">
  1092.                                         <span class="Normal">
  1093.                                             <%=rsIPAddresses("ip_address_first")%>
  1094.                                         </span>
  1095.                                     </td>
  1096.                                     <td align="left">
  1097.                                         <span class="Normal">
  1098.                                             <%=rsIPAddresses("ip_address_second")%>
  1099.                                         </span>
  1100.                                     </td>
  1101.                                 </tr>
  1102. <%
  1103.                                 rsIPAddresses.MoveNext
  1104.                             Loop
  1105.                             
  1106.                             'Clean up 
  1107.                             rsIPAddresses.Close
  1108.                             Set rsIPAddresses = Nothing
  1109. %>
  1110.                     </table>
  1111. <%                
  1112.                 End If
  1113. %>
  1114.             </td>
  1115.         </tr>
  1116.     </table>
  1117.     <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="1" background="Resources/Images/ThinDivider.gif"></td></tr>
  1118.     <table border="0" cellpadding="0" cellspacing="6" width="740" class="WhiteBackgroundColor">
  1119.         <tr>
  1120.             <td width="1" rowspan="20"></td>
  1121.             <td colspan="2" valign="center" height="38" align="left">
  1122.                 <span class="QuestionSectionHeadingSpanStyle">Numbering Properties</span>
  1123.             </td>
  1124.             <td width="1" rowspan="20"></td>
  1125.         </tr>
  1126.         <tr>
  1127.             <td valign="top" class="NormalBold" width="160">
  1128.                 <label for="cboPageNumbering">Page Numbering:</label>
  1129.             </td>
  1130. <%
  1131.             'Determine the value to display
  1132.             strValue = rsSurvey("page_numbering_format")
  1133. %>        
  1134.             <td valign="top" class="Normal">
  1135.                 <select name="cboPageNumbering" id="cboPageNumbering" style="width:290">
  1136.                     <option <% If strValue = SUR_PAGE_NUMBERING_DISPLAY_PAGE_NUMBER_ONLY Then Response.Write("selected") End If %> value="<%=SUR_PAGE_NUMBERING_DISPLAY_PAGE_NUMBER_ONLY%>"><%=SUR_PAGE_NUMBERING_DISPLAY_PAGE_NUMBER_ONLY%></option>
  1137.                     <option <% If strValue = SUR_PAGE_NUMBERING_DISPLAY_PROGRESS_BAR Then Response.Write("selected") End If %> value="<%=SUR_PAGE_NUMBERING_DISPLAY_PROGRESS_BAR%>"><%=SUR_PAGE_NUMBERING_DISPLAY_PROGRESS_BAR%></option>
  1138.                     <option <% If strValue = SUR_PAGE_NUMBERING_DISPLAY_PROGRESS Then Response.Write("selected") End If %> value="<%=SUR_PAGE_NUMBERING_DISPLAY_PROGRESS%>"><%=SUR_PAGE_NUMBERING_DISPLAY_PROGRESS%></option>
  1139.                     <option <% If strValue = SUR_PAGE_NUMBERING_DO_NOT_DISPLAY Then Response.Write("selected") End If %> value="<%=SUR_PAGE_NUMBERING_DO_NOT_DISPLAY%>"><%=SUR_PAGE_NUMBERING_DO_NOT_DISPLAY%></option>
  1140.                 </select>
  1141.             </td>
  1142.         </tr>
  1143.         <tr>
  1144.             <td valign="top" class="NormalBold">
  1145.                 <label for="cboQuestionNumbering">Question Numbering:</label>
  1146.             </td>
  1147. <%
  1148.             'Determine the value to display
  1149.             strValue = rsSurvey("question_numbering_format")
  1150. %>        
  1151.             <td valign="top" class="Normal">
  1152.                 <select name="cboQuestionNumbering" id="cboQuestionNumbering" style="width:290">
  1153.                     <option <% If strValue = SUR_QUESTION_NUMBERING_DO_NOT_DISPLAY Then Response.Write("selected") End If %> value="<%=SUR_QUESTION_NUMBERING_DO_NOT_DISPLAY%>"><%=SUR_QUESTION_NUMBERING_DO_NOT_DISPLAY%></option>
  1154.                     <option <% If strValue = SUR_QUESTION_NUMBERING_ENTIRE_SURVEY Then Response.Write("selected") End If %> value="<%=SUR_QUESTION_NUMBERING_ENTIRE_SURVEY%>"><%=SUR_QUESTION_NUMBERING_ENTIRE_SURVEY%></option>
  1155.                     <option <% If strValue = SUR_QUESTION_NUMBERING_EACH_PAGE Then Response.Write("selected") End If %> value="<%=SUR_QUESTION_NUMBERING_EACH_PAGE%>"><%=SUR_QUESTION_NUMBERING_EACH_PAGE%></option>
  1156.                 </select>
  1157.             </td>
  1158.         </tr>
  1159.     </table>
  1160.     <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="1" background="Resources/Images/ThinDivider.gif"></td></tr>
  1161.     <table border="0" cellpadding="0" cellspacing="6" width="740" class="LightGrayBackgroundColor">
  1162.         <tr>
  1163.             <td width="1" rowspan="20"></td>
  1164.             <td colspan="2" valign="center" height="38" align="left">
  1165.                 <span class="QuestionSectionHeadingSpanStyle">Other Administrative Properties</span>
  1166.             </td>
  1167.             <td width="1" rowspan="20"></td>
  1168.         </tr>
  1169.         <tr>
  1170. <%
  1171.             'Determine the value to display
  1172.             strValue = rsSurvey("report_security")
  1173. %>        
  1174.             <td valign="top" class="NormalBold" width="160">
  1175.                 <label for="cboReportSecurity">Report Security:</label>
  1176.             </td>
  1177.             <td valign="top" class="Normal">
  1178.                 <span class="InlineHelpSpanStyle">Select 'High' if you want the reports accessible only to survey owners.  'Semi-private' allows all users to view 
  1179.                 the overview results and only owners to view the individual results.  'Public' allows all users to view all reports.<br></span>
  1180.                 <select name="cboReportSecurity" id="cboReportSecurity" style="width:290">
  1181.                     <option <% If strValue = SUR_REPORT_SECURITY_OWNERS_ONLY Then Response.Write("selected") End If %> value="<%=SUR_REPORT_SECURITY_OWNERS_ONLY%>"><%=SUR_REPORT_SECURITY_OWNERS_ONLY%></option>
  1182.                     <option <% If strValue = SUR_REPORT_SECURITY_SEMI_PRIVATE Then Response.Write("selected") End If %> value="<%=SUR_REPORT_SECURITY_SEMI_PRIVATE%>"><%=SUR_REPORT_SECURITY_SEMI_PRIVATE%></option>
  1183.                     <option <% If strValue = SUR_REPORT_SECURITY_PUBLIC Then Response.Write("selected") End If %> value="<%=SUR_REPORT_SECURITY_PUBLIC%>"><%=SUR_REPORT_SECURITY_PUBLIC%></option>
  1184.                 </select>
  1185.             </td>
  1186.         </tr>
  1187.         <tr>
  1188. <%
  1189.             'Determine the value to display
  1190.             strValue = rsSurvey("highlight_responses_yn")
  1191. %>        
  1192.             <td valign="top" class="NormalBold">
  1193.                 <label for="cboHighlightResponses">Highlight Responses:</label>
  1194.             </td>
  1195.             <td valign="top" class="Normal">
  1196.                 <span class="InlineHelpSpanStyle">If 'Yes' is selected, when the user views the overview report, an 
  1197.                 image will appear next to each response selected by the user.<br></span>
  1198.                 <select name="cboHighlightResponses" id="cboHighlightResponses" style="width:80">
  1199.                     <option <% If strValue = SUR_BOOLEAN_NEGATIVE Then Response.Write "selected" End If %> value="<%=SUR_BOOLEAN_NEGATIVE%>"><%=SUR_BOOLEAN_NEGATIVE_DISPLAY%></option>
  1200.                     <option <% If strValue = SUR_BOOLEAN_POSITIVE Then Response.Write "selected" End If %> value="<%=SUR_BOOLEAN_POSITIVE%>"><%=SUR_BOOLEAN_POSITIVE_DISPLAY%></option>
  1201.                 </select>
  1202.             </td>
  1203.         </tr>
  1204.         <tr>
  1205. <%
  1206.             'Determine the value to display
  1207.             If rsSurvey("maximum_responses_for_survey") <> SUR_UNLIMITED_RESPONSES Then
  1208.                 strValue = rsSurvey("maximum_responses_for_survey")
  1209.             Else
  1210.                 strValue = ""
  1211.             End If    
  1212. %>        
  1213.             <td valign="top" class="NormalBold">
  1214.                 <label for="txtMaximumResponses">Maximum Responses:</label>
  1215.             </td>
  1216.             <td valign="top" class="Normal">
  1217.                 <span class="InlineHelpSpanStyle">Enter the maximum number of responses for this survey.  Leave blank for unlimited responses.<br></span>
  1218.                 <input name="txtMaximumResponses" id="txtMaximumResponses" value="<%=strValue%>" style="width:80" size="10" maxlength="10" type="text">
  1219.             </td>
  1220.         </tr>
  1221.         <tr>
  1222. <%
  1223.             'Determine the value to display
  1224.             If rsSurvey("maximum_responses_per_user") <> SUR_UNLIMITED_RESPONSES Then
  1225.                 strValue = rsSurvey("maximum_responses_per_user")
  1226.             Else
  1227.                 strValue = ""
  1228.             End If
  1229. %>        
  1230.             <td valign="top" class="NormalBold">
  1231.                 <label for="txtMaximumResponsesPerUser">Responses per User:</label>
  1232.             </td>
  1233.             <td valign="top" class="Normal">
  1234.                 <span class="InlineHelpSpanStyle">For Multiple Response surveys only, enter the maximum number of responses 
  1235.                 per user. Leave blank for unlimited responses.<br></span>
  1236.                 <input name="txtMaximumResponsesPerUser" id="txtMaximumResponsesPerUser" value="<%=strValue%>" style="width:80" size="10" maxlength="10" type="text">
  1237.             </td>
  1238.         </tr>
  1239.         <tr>
  1240.             <td valign="top" class="NormalBold">
  1241.                 <label for="txtModifySurveyWithinDays">Days for Update:</label>
  1242.             </td>
  1243.             <td valign="top" class="Normal">
  1244. <%
  1245.                 'Determine the value to display
  1246.                 strValue = rsSurvey("modify_survey_within_days")
  1247. %>        
  1248.                 <span class="InlineHelpSpanStyle">Enter the number of days during which a respondent may update their response.  
  1249.                 This option applies to respondent access levels that are updateable.<br></span>
  1250.                  <input type="text" name="txtModifySurveyWithinDays" id="txtModifySurveyWithinDays" value="<%=strValue%>" style="width:80" size="10" maxlength="4">
  1251.             </td>
  1252.         </tr>
  1253.     </table>
  1254.     <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="1" background="Resources/Images/ThinDivider.gif"></td></tr>
  1255.     <table border="0" cellpadding="0" cellspacing="6" width="740" class="WhiteBackgroundColor">
  1256.         <tr>
  1257.             <td width="1" rowspan="20"></td>
  1258.             <td colspan="2" valign="center" height="38" align="left">
  1259.                 <span class="QuestionSectionHeadingSpanStyle">Administrator Properties</span>
  1260.             </td>
  1261.             <td width="1" rowspan="20"></td>
  1262.         </tr>
  1263.         <tr>
  1264. <%
  1265.             'Determine the value to display
  1266.             strValue = rsSurvey("owners")
  1267. %>        
  1268.             <td valign="top" class="NormalBold" width="160">
  1269.                 <label for="txtOwners">Owners:</label><span class="Required">*</span>
  1270.             </td>
  1271.             <td valign="top" class="Normal">
  1272.                 <span class="InlineHelpSpanStyle">Enter the usernames for all owners of this survey.  Separate each name with a
  1273.                 semi-colon, and make sure that your username is in the list.</span><br>
  1274.                 <input type="text" name="txtOwners" id="txtOwners" value="<%=strValue%>" maxlength="150" size="23" style="width:480">
  1275.             </td>
  1276.         </tr>
  1277.         <tr>
  1278. <%
  1279.             'Determine the value to display
  1280.             strValue = rsSurvey("admin_email_address")
  1281. %>        
  1282.             <td valign="top" class="NormalBold">
  1283.                 <label for="txtAdminEmailAddress">Admin Email:</label><span class="Required">*</span>
  1284.             </td>
  1285.             <td valign="top" class="Normal">
  1286.                 <span class="InlineHelpSpanStyle">Enter the email address for the administrator of the application.</span><br>
  1287.                 <input type="text" name="txtAdminEmailAddress" id="txtAdminEmailAddress" value="<%=strValue%>" maxlength="150" size="23" style="width:480">
  1288.             </td>
  1289.         </tr>
  1290.         <tr>
  1291.             <td align="right" valign="middle" colspan="2">
  1292. <%
  1293.                 If strNav = "Survey" Then
  1294.                     strRedirectURL = "Survey.asp?SurveyID=" & lngSurveyID
  1295.                 Else
  1296.                     strRedirectURL = "SurveyList.asp"
  1297.                 End If
  1298. %>
  1299.                 <a href="<%=strRedirectURL%>"><img border="0" alt="Cancel" name="btnCancel" src="Resources/Buttons/Cancel.gif"></a>
  1300.                 <input type="image" border="0" alt="Save" src="Resources/Buttons/Save.gif" name="btnSave">
  1301.             </td>
  1302.         </tr>
  1303.     </form>
  1304. </table>
  1305.  
  1306. <!--#Include File="Include/FrameworkBottom_inc.asp"-->
  1307.  
  1308. </body>
  1309. </html>
  1310. <%
  1311.     'Clean up
  1312.     rsSurvey.Close
  1313.     Set rsSurvey = Nothing
  1314.  
  1315.     'Ensure that the web server returns the page
  1316.     Response.Flush
  1317. %>
  1318.