home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
bombers.k12.ar.us
/
bombers.k12.ar.us.tar
/
bombers.k12.ar.us
/
survey_unconfigured
/
DeletePageCondition.asp
< prev
next >
Wrap
Text File
|
2006-10-25
|
2KB
|
44 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 page condition.
'
' 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"-->
<%
'In order to delete a page, the user must be the survey owner or an admin.
If IsUserOwnerOrAdmin(Request.QueryString("SurveyID")) = False Then
Response.Redirect "AccessDenied.asp?SurveyID=" & Request.QueryString("SurveyID") & "&Reason=" & SUR_ACCESS_DENIED_NOT_OWNER
End If
Dim strSQL
Dim conDelete
'Initialization
Set conDelete = Server.CreateObject("ADODB.Connection")
conDelete.Open SURVEY_APP_CONNECTION
'Delete the specified page condition from the SUR_PAGE_CONDITION table
strSQL = "DELETE FROM sur_page_condition WHERE page_condition_id = " & Request.QueryString("PageConditionID")
conDelete.Execute ConvertSQL(strSQL), , adCmdText
'Clean up
conDelete.Close
Set conDelete = Nothing
'Redirect to the page condition page for the same survey and page number.
Response.Redirect "PageCondition.asp?SurveyID=" & Request.QueryString("SurveyID") & "&PageNumber=" & Request.QueryString("PageNumber") & "&SurveyName=" & Request.QueryString("SurveyName")
%>