home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
bombers.k12.ar.us
/
bombers.k12.ar.us.tar
/
bombers.k12.ar.us
/
survey_unconfigured
/
TemplateAction.asp
< prev
next >
Wrap
Text File
|
2006-10-25
|
7KB
|
130 lines
<!--#Include File="Include/Top_inc.asp"-->
<%
'***********************************************************************
' Application: SelectTemplateASP Advanced v8.1.11
' Author: Aaron Baril for ClassApps.com
' Page Description: This page works with Template.asp, and processes
' the form for managing general information about a template
' by writing to the database.
'
' 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/ID_inc.asp"-->
<!--#Include File="Include/SurveySecurity_inc.asp"-->
<!--#Include File="Include/Constants_inc.asp"-->
<%
Dim strSQL
Dim conTemplate
Dim lngSurveyNameFontSize
Dim lngPageTitleFontSize
Dim lngPageNumberFontSize
Dim lngQuestionTextFontSize
Dim lngQuestionSubtextFontSize
Dim lngNavigationLinkFontSize
'Initialization
Set conTemplate = Server.CreateObject("ADODB.Connection")
conTemplate.Open SURVEY_APP_CONNECTION
If Len(Trim(Request.Form("txtSurveyNameFontSize"))) > 0 Then
lngSurveyNameFontSize = Request.Form("txtSurveyNameFontSize")
Else
lngSurveyNameFontSize = "Null"
End If
If Len(Trim(Request.Form("txtPageTitleFontSize"))) > 0 Then
lngPageTitleFontSize = Request.Form("txtPageTitleFontSize")
Else
lngPageTitleFontSize = "Null"
End If
If Len(Trim(Request.Form("txtPageNumberFontSize"))) > 0 Then
lngPageNumberFontSize = Request.Form("txtPageNumberFontSize")
Else
lngPageNumberFontSize = "Null"
End If
If Len(Trim(Request.Form("txtQuestionTextFontSize"))) > 0 Then
lngQuestionTextFontSize = Request.Form("txtQuestionTextFontSize")
Else
lngQuestionTextFontSize = "Null"
End If
If Len(Trim(Request.Form("txtQuestionSubtextFontSize"))) > 0 Then
lngQuestionSubtextFontSize = Request.Form("txtQuestionSubtextFontSize")
Else
lngQuestionSubtextFontSize = "Null"
End If
If Len(Trim(Request.Form("txtNavigationLinkFontSize"))) > 0 Then
lngNavigationLinkFontSize = Request.Form("txtNavigationLinkFontSize")
Else
lngNavigationLinkFontSize = "Null"
End If
'Create the SQL statement to update the SUR_TEMPLATE table
strSQL = "UPDATE sur_template SET " & _
"active_yn = " & SQLEncode(Request.Form("cboActiveYN")) & ", " & _
"template_name = " & SQLEncode(Request.Form("txtTemplateName")) & ", " & _
"allow_use_yn = " & SQLEncode(Request.Form("cboAllowUseYN")) & ", " & _
"logo_path = " & SQLEncode(Request.Form("txtLogoPath")) & ", " & _
"logo_alignment = " & SQLEncode(Request.Form("cboLogoAlignment")) & ", " & _
"survey_alignment = " & SQLEncode(Request.Form("cboSurveyAlignment")) & ", " & _
"display_border_yn = " & SQLEncode(Request.Form("cboDisplayBorderYN")) & ", " & _
"border_color = " & SQLEncode(Request.Form("txtBorderColor")) & ", " & _
"border_width = " & Request.Form("txtBorderWidth") & ", " & _
"survey_background_color = " & SQLEncode(Request.Form("txtSurveyBackgroundColor")) & ", " & _
"page_background_color = " & SQLEncode(Request.Form("txtPageBackgroundColor")) & ", " & _
"matrix_header_color = " & SQLEncode(Request.Form("txtMatrixHeaderColor")) & ", " & _
"matrix_first_color = " & SQLEncode(Request.Form("txtMatrixFirstColor")) & ", " & _
"matrix_second_color = " & SQLEncode(Request.Form("txtMatrixSecondColor")) & ", " & _
"progress_first_color = " & SQLEncode(Request.Form("txtProgressFirstColor")) & ", " & _
"progress_second_color = " & SQLEncode(Request.Form("txtProgressSecondColor")) & ", " & _
"survey_name_font_color = " & SQLEncode(Request.Form("txtSurveyNameFontColor")) & ", " & _
"survey_name_font_size = " & lngSurveyNameFontSize & ", " & _
"survey_name_font_weight = " & SQLEncode(Request.Form("cboSurveyNameFontWeight")) & ", " & _
"survey_name_font_family = " & SQLEncode(Request.Form("cboSurveyNameFontFamily")) & ", " & _
"page_title_font_color = " & SQLEncode(Request.Form("txtPageTitleFontColor")) & ", " & _
"page_title_font_size = " & lngPageTitleFontSize & ", " & _
"page_title_font_weight = " & SQLEncode(Request.Form("cboPageTitleFontWeight")) & ", " & _
"page_title_font_family = " & SQLEncode(Request.Form("cboPageTitleFontFamily")) & ", " & _
"page_number_font_color = " & SQLEncode(Request.Form("txtPageNumberFontColor")) & ", " & _
"page_number_font_size = " & lngPageNumberFontSize & ", " & _
"page_number_font_weight = " & SQLEncode(Request.Form("cboPageNumberFontWeight")) & ", " & _
"page_number_font_family = " & SQLEncode(Request.Form("cboPageNumberFontFamily")) & ", " & _
"question_text_font_color = " & SQLEncode(Request.Form("txtQuestionTextFontColor")) & ", " & _
"question_text_font_size = " & lngQuestionTextFontSize & ", " & _
"question_text_font_weight = " & SQLEncode(Request.Form("cboQuestionTextFontWeight")) & ", " & _
"question_text_font_family = " & SQLEncode(Request.Form("cboQuestionTextFontFamily")) & ", " & _
"question_subtext_font_color = " & SQLEncode(Request.Form("txtQuestionSubtextFontColor")) & ", " & _
"question_subtext_font_size = " & lngQuestionSubtextFontSize & ", " & _
"question_subtext_font_weight = " & SQLEncode(Request.Form("cboQuestionSubtextFontWeight")) & ", " & _
"question_subtext_font_family = " & SQLEncode(Request.Form("cboQuestionSubtextFontFamily")) & ", " & _
"navigation_link_font_color = " & SQLEncode(Request.Form("txtNavigationLinkFontColor")) & ", " & _
"navigation_link_font_size = " & lngNavigationLinkFontSize & ", " & _
"navigation_link_font_weight = " & SQLEncode(Request.Form("cboNavigationLinkFontWeight")) & ", " & _
"navigation_link_font_family = " & SQLEncode(Request.Form("cboNavigationLinkFontFamily")) & ", " & _
"html_top = " & SQLEncode(Trim(Request.Form("txtHTMLTop"))) & ", " & _
"html_bottom = " & SQLEncode(Trim(Request.Form("txtHTMLBottom"))) & ", " & _
"navigation_back_button_path = " & SQLEncode(Request.Form("txtNavigationBackButtonPath")) & ", " & _
"navigation_back_link_text = " & SQLEncode(Request.Form("txtNavigationBackLinkText")) & ", " & _
"navigation_next_button_path = " & SQLEncode(Request.Form("txtNavigationNextButtonPath")) & ", " & _
"navigation_next_link_text = " & SQLEncode(Request.Form("txtNavigationNextLinkText")) & ", " & _
"navigation_done_button_path = " & SQLEncode(Request.Form("txtNavigationDoneButtonPath")) & ", " & _
"navigation_done_link_text = " & SQLEncode(Request.Form("txtNavigationDoneLinkText")) & ", " & _
"navigation_cancel_button_path = " & SQLEncode(Request.Form("txtNavigationCancelButtonPath")) & ", " & _
"navigation_cancel_link_text = " & SQLEncode(Request.Form("txtNavigationCancelLinkText")) & _
" WHERE template_id = " & Request.Form("TemplateID")
conTemplate.Execute ConvertSQL(strSQL), , adCmdText
'Clean up
conTemplate.Close
Set conTemplate = Nothing
'Redirect to the main list of templates
Response.Redirect "TemplateList.asp"
%>