home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
bombers.k12.ar.us
/
bombers.k12.ar.us.tar
/
bombers.k12.ar.us
/
survey_unconfigured
/
PageAction.asp
< prev
next >
Wrap
Text File
|
2006-10-25
|
2KB
|
53 lines
<!--#Include File="Include/Top_inc.asp"-->
<%
'***********************************************************************
' Application: SelectSurveyASP Advanced v8.1.11
' Author: Aaron Baril for ClassApps.com
' Page Description: This page works with Page.asp, and processes
' the form for modifying the page title and introduction.
'
' 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/Constants_inc.asp"-->
<!--#Include File="Include/ID_inc.asp"-->
<!--#Include File="Include/CurrentUser_inc.asp"-->
<!--#Include File="Include/SurveySecurity_inc.asp"-->
<%
Dim strSQL
Dim conPage
'Initialization
Set conPage = Server.CreateObject("ADODB.Connection")
conPage.Open SURVEY_APP_CONNECTION
'Create the SQL for either updating or inserting the record for the page title and introduction
If Request.Form("hdnState") = SUR_STATE_INSERT Then
strSQL = "INSERT INTO sur_page (survey_id, page_number, page_title, page_introduction) VALUES(" & _
Request.Form("SurveyID") & ", " & _
Request.Form("PageNumber") & ", " & _
SQLEncode(Request.Form("txtPageTitle")) & ", " & _
SQLEncode(Request.Form("txtPageIntroduction")) & ")"
Else 'SUR_STATE_EDIT
strSQL = "UPDATE sur_page " & _
"SET page_title = " & SQLEncode(Request.Form("txtPageTitle")) & ", " & _
"page_introduction = " & SQLEncode(Request.Form("txtPageIntroduction")) & _
" WHERE survey_id = " & Request.Form("SurveyID") & _
" AND page_number = " & Request.Form("PageNumber")
End If
'Execute the SQL and clean up
conPage.Execute ConvertSQL(strSQL), , adCmdText
conPage.Close
Set conPage = Nothing
'Redirect back to the page for modifying the survey
Response.Redirect "ModifySurvey.asp?SurveyID=" & Request.Form("SurveyID")
%>