home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
bombers.k12.ar.us
/
bombers.k12.ar.us.tar
/
bombers.k12.ar.us
/
survey_unconfigured
/
DeleteReportShare.asp
< prev
next >
Wrap
Text File
|
2006-10-25
|
2KB
|
47 lines
<!--#Include File="Include/Top_inc.asp"-->
<%
'***********************************************************************
' Application: SelectSurveyASP Advanced v8.1.11
' Author: Aaron Baril for ClassApps.com
' Page Description: This page deletes a report share, and then redirects the
' user back to the list of report shares.
'
' COPYRIGHT NOTICE
'
' See attached Software License Agreement
'
' (c) Copyright 2002 - 2006 by ClassApps.com. All rights reserved.
'***********************************************************************
%>
<!--#Include File="Include/Config_inc.asp"-->
<!--#Include File="Include/Utility_inc.asp"-->
<!--#Include File="Include/adovbs_inc.asp"-->
<!--#Include File="Include/CurrentUser_inc.asp"-->
<!--#Include File="Include/SurveySecurity_inc.asp"-->
<!--#Include File="Include/Constants_inc.asp"-->
<%
'If the user does not either own this survey or have admin permission, deny them access to this functionality.
If IsUserOwnerOrAdmin(Request.QueryString("SurveyID")) = False Then
Response.Redirect "AccessDenied.asp?Reason=" & SUR_ACCESS_DENIED_NOT_OWNER_FOR_RESULTS_SHARING
End If
Dim strSQL
Dim conDelete
Dim lngReportShareID
'Initialization
Set conDelete = Server.CreateObject("ADODB.Connection")
conDelete.Open SURVEY_APP_CONNECTION
lngReportShareID = Request.QueryString("ReportShareID")
'Delete the report share from the report share table (SUR_REPORT_SHARE)
strSQL = "DELETE FROM sur_report_share WHERE report_share_id = " & lngReportShareID
conDelete.Execute ConvertSQL(strSQL), , adCmdText
'Clean up
conDelete.Close
Set conDelete = Nothing
'Redirect to the main list of report shares for the current user
Response.Redirect "ReportShareList.asp?SurveyID=" & Request.QueryString("SurveyID") & "&SurveyName=" & Request.QueryString("SurveyName")
%>