If Len(Trim(strHTMLTop)) > 0 Or Len(Trim(strHTMLBottom)) > 0 Then
%>
MARGIN-LEFT: 0;
<%
ElseIf strDisplayBorderYN = SUR_BOOLEAN_POSITIVE Then
%>
MARGIN-LEFT: 10;
<%
Else
%>
MARGIN-LEFT: 3;
<%
End If
%>
MARGIN-RIGHT: 0;
MARGIN-BOTTOM: 0;
<%
'If not top HTML was provided, leave a 15-pixel margin at the top; otherwise, flush the survey with the top,
'and let the top HTML establish the look and feel.
If Len(Trim(strHTMLTop)) = 0 Then
%>
MARGIN-TOP: 15;
<%
Else
%>
MARGIN-TOP: 0;
<%
End If
%>
}
.Normal
{
COLOR: <% If Len(rsSurvey("question_text_font_color")) > 0 Then Response.Write rsSurvey("question_text_font_color") Else Response.Write SUR_DEFAULT_FONT_COLOR End If %>;
FONT-SIZE: <% If Len(rsSurvey("question_text_font_size")) > 0 Then Response.Write rsSurvey("question_text_font_size") Else Response.Write "12" End If %>px;
COLOR: <% If Len(rsSurvey("survey_name_font_color")) > 0 Then Response.Write rsSurvey("survey_name_font_color") Else Response.Write SUR_DEFAULT_FONT_COLOR End If %>;
FONT-SIZE: <% If Len(rsSurvey("survey_name_font_size")) > 0 Then Response.Write rsSurvey("survey_name_font_size") Else Response.Write "18" End If %>px;
}
.H2HeadingStyle
{
COLOR: <% If Len(rsSurvey("page_number_font_color")) > 0 Then Response.Write rsSurvey("page_number_font_color") Else Response.Write SUR_DEFAULT_FONT_COLOR End If %>;
FONT-SIZE: <% If Len(rsSurvey("page_number_font_size")) > 0 Then Response.Write rsSurvey("page_number_font_size") Else Response.Write "16" End If %>px;
}
.InlineHelpSpanStyle
{
COLOR: <% If Len(rsSurvey("question_subtext_font_color")) > 0 Then Response.Write rsSurvey("question_subtext_font_color") Else Response.Write SUR_DEFAULT_FONT_COLOR End If %>;
FONT-SIZE: <% If Len(rsSurvey("question_subtext_font_size")) > 0 Then Response.Write rsSurvey("question_subtext_font_size") Else Response.Write "10" End If %>px;
COLOR: <% If Len(rsSurvey("page_title_font_color")) > 0 Then Response.Write rsSurvey("page_title_font_color") Else Response.Write SUR_DEFAULT_FONT_COLOR End If %>;
'Based on the reason passed in, display the appropriate error message
Select Case CLng(Request.QueryString("Reason"))
Case SUR_ACCESS_DENIED_NOT_LIVE:
strPageTitle1 = "Unable to Access Survey"
strPageTitle2 = "Survey Is Not Live"
strMessage = "Sorry, but the survey '" & strTitle & "' is not currently live, so you cannot take it at this time."
If IsUserOwnerOrAdmin(lngSurveyID) = True Then
strMessage = strMessage & " Click <a href=""ChangeStatus.asp?SurveyID=" & lngSurveyID & "&DisplaySurvey=Yes&Launch=Yes&Status=Open"">here</a> to launch this survey."
End If
Case SUR_ACCESS_DENIED_ALREADY_TAKEN:
strPageTitle1 = "Unable to Access Survey"
strPageTitle2 = "Survey Response Already Exists"
strMessage = "You have already taken the survey '" & strTitle & "' and cannot take it again."
Case SUR_ACCESS_DENIED_MAX_RESPONSE_COUNT_EXCEEDED:
strPageTitle1 = "Unable to Take Survey"
strPageTitle2 = "Maximum Responses for Survey Exceeded"
strMessage = "You cannot take this survey because the maximum response count for the survey has been reached."
Case SUR_ACCESS_DENIED_MAX_RESPONSE_COUNT_PER_USER_EXCEEDED:
strPageTitle1 = "Unable to Take Survey"
strPageTitle2 = "Maximum Individual Responses for Survey Exceeded"
strMessage = "You cannot take this survey because you have reached the maximum response count per user."
Case SUR_ACCESS_DENIED_MAX_DAYS_FOR_UPDATE_REACHED:
strPageTitle1 = "Unable to Update Survey"
strPageTitle2 = "Maximum Days to Update Survey Exceeded"
strMessage = "You cannot update your response to this survey because the number of days during which an update is allowed have been reached."
Case SUR_ACCESS_DENIED_MANUAL_ENTRY_MODE:
strPageTitle1 = "Unable to Take Survey"
strPageTitle2 = "Survey Temporarily Closed"
strMessage = "This survey cannot currently be accessed because it has been temporarily closed by survey owner."
Case SUR_ACCESS_DENIED_ALREADY_RESPONDED_TO_MESSAGE:
strPageTitle1 = "Unable to Take Survey"
strPageTitle2 = "Survey Response Already Exists"
strMessage = "You have already responded to this email invitation for the survey '" & strTitle & "'. You cannot respond to the same email invitation more than once."
Case SUR_ACCESS_DENIED_IP_ADDRESS_OUT_OF_RANGE:
strPageTitle1 = "Unable to Take Survey"
strPageTitle2 = "IP Address Not in Valid Range"
strMessage = "You cannot take this survey because your IP address is not with the range of IP addresses that have been granted permission to take this survey."
Case SUR_ACCESS_DENIED_ALREADY_TAKEN_MULTIPLE:
strPageTitle1 = "Unable to Access Survey"
strPageTitle2 = "Survey Response Already Exists"
strMessage = "You have already taken the survey '" & strTitle & "'. You may take the survey again by clicking <a href='TakeSurvey.asp?PageNumber=1&SurveyID=" & Request.QueryString("SurveyID") & "'>here</a>."
End Select
%>
<html lang="<%=strSurveyLanguage%>">
<head>
<title><%=strPageTitle1%></title>
</head>
<body class="SurveyBodyStyle">
<%
'If an HTML header was provided, display it
If Len(strHTMLTop) > 0 Then
Response.Write strHTMLTop
End If
%>
<table border="0" cellspacing="0" cellpadding="5" width="760" align="<% If strSurveyAlignment = SUR_SURVEY_ALIGNMENT_CENTER Then Response.Write "center" End If %>">
<%
'Optionally display a logo at the top of the survey
If IsNull(strLogoPath) Or Len(strLogoPath) = 0 Then
%>
<tr>
<td height="44" valign="bottom">
<% If strDisplayBorderYN = SUR_BOOLEAN_NEGATIVE Then Response.Write " " End If %><span class="H1HeadingStyle"><a name="skipnav" tabindex="1"><%=strTitle%></a></span>
</td>
</tr>
<%
Else
'Whether the image alignment is left or right determines how the image and title are rendered
If strLogoAlignment = SUR_LOGO_ALIGNMENT_LEFT Then
<table style="background-color:<%=strBorderColor%>" cellspacing="0" cellpadding="<%=lngBorderWidth%>" width="760" align="<% If strSurveyAlignment = SUR_SURVEY_ALIGNMENT_CENTER Then Response.Write "center" End If %>"><tr><td>
<table style="background-color:<%=strSurveyBackgroundColor%>" cellspacing="0" cellpadding="0" width="760" align="<% If strSurveyAlignment = SUR_SURVEY_ALIGNMENT_CENTER Then Response.Write "center" End If %>"><tr><td>
If CLng(Request.QueryString("Reason")) = SUR_ACCESS_DENIED_NOT_ADMIN_SECURITY_LEVEL Or CLng(Request.QueryString("Reason")) = SUR_ACCESS_DENIED_INVALID_SURVEY_ID Then
%>
If you believe you received this message in error, please contact the application administrator:<br><br>
<%
Else
%>
If you believe you received this message in error, please contact the survey administrator:<br><br>