'Based on the reason passed in, display the appropriate error message
Select Case CLng(Request.QueryString("Reason"))
Case SUR_ACCESS_DENIED_NOT_OWNER:
strPageTitle1 = "Unable to Access Survey"
strPageTitle2 = "Insufficient Permissions to Manage Survey"
strMessage = "You do not have permission to manage or modify the survey '" & strTitle & "' because you are not an owner or administrator."
Case SUR_ACCESS_DENIED_NOT_ADMIN_SECURITY_LEVEL:
strPageTitle1 = "Unable to Access Survey"
strPageTitle2 = "Insufficient Permissions to Manage Survey"
strMessage = "You have not been granted administrative permissions. Administrative permissions are needed to create or modify surveys."
Case SUR_ACCESS_DENIED_NOT_PERMISSION_TO_VIEW_REPORT:
strPageTitle1 = "Unable to View Report"
strPageTitle2 = "Insufficient Permissions to View Report"
strMessage = "You cannot view this report because you are not an owner and because the survey's reports are not public."
Case SUR_ACCESS_DENIED_NOT_PERMISSION_TO_PAGE_FILTERS:
strPageTitle1 = "Unable to Manage Filters"
strPageTitle2 = "Insufficient Permissions to Manage Filters"
strMessage = "You cannot manage report filters because you do not have access rights to this report."
Case SUR_ACCESS_DENIED_NOT_EMAIL_LIST_OWNER:
strPageTitle1 = "Unable to Delete Email List"
strPageTitle2 = "Insufficient Permissions to Delete Email List"
strMessage = "You cannot delete this email list because you are not the owner."
Case SUR_ACCESS_DENIED_NOT_TEMPLATE_OWNER:
strPageTitle1 = "Unable to Delete Template"
strPageTitle2 = "Insufficient Permissions to Delete Template"
strMessage = "You cannot delete this template because you are not the owner."
Case SUR_ACCESS_DENIED_NOT_LIBRARY_OWNER:
strPageTitle1 = "Unable to Delete Library"
strPageTitle2 = "Insufficient Permissions to Delete Library"
strMessage = "You cannot delete this library because you are not the owner."
Case SUR_ACCESS_DENIED_INVALID_SURVEY_ID:
strPageTitle1 = "Unable to Access Survey"
strPageTitle2 = "Invalid Survey ID"
strMessage = "The survey ID used in trying to take this survey is not valid. There are no surveys in the system with that survey ID."
Case SUR_ACCESS_DENIED_NOT_OWNER_FOR_RESULTS_SHARING
strPageTitle1 = "Unable to Access Results Sharing"
strPageTitle2 = "Insufficient Permissions to Access Results Sharing"
strMessage = "You cannot access the results sharing for this survey because you are not an owner or administrator of the survey."
Case SUR_ACCESS_DENIED_REPORT_SHARE_INACTIVE:
strPageTitle1 = "Unable to Access Reports"
strPageTitle2 = "Inactive Report Share"
strMessage = "You cannot access the reports for the survey '" & strTitle & "' because the report share is not currently active."
Case SUR_ACCESS_DENIED_REPORT_SHARE_DELETED:
strPageTitle1 = "Unable to Access Reports"
strPageTitle2 = "Deleted Report Share"
strMessage = "You cannot access the reports for this survey because the report share has been deleted."
Case SUR_ACCESS_DENIED_REPORT_SHARE_NOT_DATA_EXPORT
strPageTitle1 = "Unable to Access Data Export"
strPageTitle2 = "Insufficient Permissions to Export Data"
strMessage = "You cannot access the data export functionality for this survey because this permission has not been granted to you."
Case SUR_ACCESS_DENIED_REPORT_SHARING_DISABLED:
strPageTitle1 = "Unable to Access Reports"
strPageTitle2 = "Report Sharing Is Disabled for this Survey"
strMessage = "You cannot access the reports for the survey '" & strTitle & "' because the report sharing for this survey has been disabled by the survey owner(s)."
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 adminstrator:<br><br>