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 >
Text File  |  2006-10-25  |  7KB  |  130 lines

  1. <!--#Include File="Include/Top_inc.asp"-->
  2. <%
  3. '***********************************************************************
  4. '   Application: SelectTemplateASP Advanced v8.1.11
  5. '   Author: Aaron Baril for ClassApps.com
  6. '   Page Description: This page works with Template.asp, and processes
  7. '                     the form for managing general information about a template
  8. '                     by writing to the database.
  9. '
  10. '   COPYRIGHT NOTICE                                
  11. '
  12. '   See attached Software License Agreement
  13. '
  14. '   (c) Copyright 2002 - 2006 by ClassApps.com.  All rights reserved.
  15. '***********************************************************************
  16. %>
  17. <!--#Include File="Include/Config_inc.asp"-->
  18. <!--#Include File="Include/Utility_inc.asp"-->
  19. <!--#Include File="Include/adovbs_inc.asp"-->
  20. <!--#Include File="Include/CurrentUser_inc.asp"-->
  21. <!--#Include File="Include/ID_inc.asp"-->
  22. <!--#Include File="Include/SurveySecurity_inc.asp"-->
  23. <!--#Include File="Include/Constants_inc.asp"-->
  24. <%
  25.     Dim strSQL
  26.     Dim conTemplate
  27.     Dim lngSurveyNameFontSize
  28.     Dim lngPageTitleFontSize
  29.     Dim lngPageNumberFontSize
  30.     Dim lngQuestionTextFontSize
  31.     Dim lngQuestionSubtextFontSize
  32.     Dim lngNavigationLinkFontSize
  33.             
  34.     'Initialization
  35.     Set conTemplate = Server.CreateObject("ADODB.Connection")
  36.     conTemplate.Open SURVEY_APP_CONNECTION
  37.  
  38.     If Len(Trim(Request.Form("txtSurveyNameFontSize"))) > 0 Then
  39.         lngSurveyNameFontSize = Request.Form("txtSurveyNameFontSize")
  40.     Else
  41.         lngSurveyNameFontSize = "Null"
  42.     End If
  43.     If Len(Trim(Request.Form("txtPageTitleFontSize"))) > 0 Then
  44.         lngPageTitleFontSize = Request.Form("txtPageTitleFontSize")
  45.     Else
  46.         lngPageTitleFontSize = "Null"
  47.     End If
  48.     If Len(Trim(Request.Form("txtPageNumberFontSize"))) > 0 Then
  49.         lngPageNumberFontSize = Request.Form("txtPageNumberFontSize")
  50.     Else
  51.         lngPageNumberFontSize = "Null"
  52.     End If
  53.     If Len(Trim(Request.Form("txtQuestionTextFontSize"))) > 0 Then
  54.         lngQuestionTextFontSize = Request.Form("txtQuestionTextFontSize")
  55.     Else
  56.         lngQuestionTextFontSize = "Null"
  57.     End If
  58.     If Len(Trim(Request.Form("txtQuestionSubtextFontSize"))) > 0 Then
  59.         lngQuestionSubtextFontSize = Request.Form("txtQuestionSubtextFontSize")
  60.     Else
  61.         lngQuestionSubtextFontSize = "Null"
  62.     End If
  63.     If Len(Trim(Request.Form("txtNavigationLinkFontSize"))) > 0 Then
  64.         lngNavigationLinkFontSize = Request.Form("txtNavigationLinkFontSize")
  65.     Else
  66.         lngNavigationLinkFontSize = "Null"
  67.     End If
  68.  
  69.     'Create the SQL statement to update the SUR_TEMPLATE table
  70.     strSQL = "UPDATE sur_template SET " & _
  71.         "active_yn = " & SQLEncode(Request.Form("cboActiveYN")) & ", " & _
  72.         "template_name = " & SQLEncode(Request.Form("txtTemplateName")) & ", " & _
  73.         "allow_use_yn = " & SQLEncode(Request.Form("cboAllowUseYN")) & ", " & _
  74.         "logo_path = " & SQLEncode(Request.Form("txtLogoPath")) & ", " & _
  75.         "logo_alignment = " & SQLEncode(Request.Form("cboLogoAlignment")) & ", " & _
  76.         "survey_alignment = " & SQLEncode(Request.Form("cboSurveyAlignment")) & ", " & _
  77.         "display_border_yn = " & SQLEncode(Request.Form("cboDisplayBorderYN")) & ", " & _
  78.         "border_color = " & SQLEncode(Request.Form("txtBorderColor")) & ", " & _
  79.         "border_width = " & Request.Form("txtBorderWidth") & ", " & _
  80.         "survey_background_color = " & SQLEncode(Request.Form("txtSurveyBackgroundColor")) & ", " & _
  81.         "page_background_color = " & SQLEncode(Request.Form("txtPageBackgroundColor")) & ", " & _
  82.         "matrix_header_color = " & SQLEncode(Request.Form("txtMatrixHeaderColor")) & ", " & _
  83.         "matrix_first_color = " & SQLEncode(Request.Form("txtMatrixFirstColor")) & ", " & _
  84.         "matrix_second_color = " & SQLEncode(Request.Form("txtMatrixSecondColor")) & ", " & _
  85.         "progress_first_color = " & SQLEncode(Request.Form("txtProgressFirstColor")) & ", " & _
  86.         "progress_second_color = " & SQLEncode(Request.Form("txtProgressSecondColor")) & ", " & _
  87.         "survey_name_font_color = " & SQLEncode(Request.Form("txtSurveyNameFontColor")) & ", " & _
  88.         "survey_name_font_size = " & lngSurveyNameFontSize & ", " & _
  89.         "survey_name_font_weight = " & SQLEncode(Request.Form("cboSurveyNameFontWeight")) & ", " & _
  90.         "survey_name_font_family = " & SQLEncode(Request.Form("cboSurveyNameFontFamily")) & ", " & _
  91.         "page_title_font_color = " & SQLEncode(Request.Form("txtPageTitleFontColor")) & ", " & _
  92.         "page_title_font_size = " & lngPageTitleFontSize & ", " & _
  93.         "page_title_font_weight = " & SQLEncode(Request.Form("cboPageTitleFontWeight")) & ", " & _
  94.         "page_title_font_family = " & SQLEncode(Request.Form("cboPageTitleFontFamily")) & ", " & _
  95.         "page_number_font_color = " & SQLEncode(Request.Form("txtPageNumberFontColor")) & ", " & _
  96.         "page_number_font_size = " & lngPageNumberFontSize & ", " & _
  97.         "page_number_font_weight = " & SQLEncode(Request.Form("cboPageNumberFontWeight")) & ", " & _
  98.         "page_number_font_family = " & SQLEncode(Request.Form("cboPageNumberFontFamily")) & ", " & _
  99.         "question_text_font_color = " & SQLEncode(Request.Form("txtQuestionTextFontColor")) & ", " & _
  100.         "question_text_font_size = " & lngQuestionTextFontSize & ", " & _
  101.         "question_text_font_weight = " & SQLEncode(Request.Form("cboQuestionTextFontWeight")) & ", " & _
  102.         "question_text_font_family = " & SQLEncode(Request.Form("cboQuestionTextFontFamily")) & ", " & _
  103.         "question_subtext_font_color = " & SQLEncode(Request.Form("txtQuestionSubtextFontColor")) & ", " & _
  104.         "question_subtext_font_size = " & lngQuestionSubtextFontSize & ", " & _
  105.         "question_subtext_font_weight = " & SQLEncode(Request.Form("cboQuestionSubtextFontWeight")) & ", " & _
  106.         "question_subtext_font_family = " & SQLEncode(Request.Form("cboQuestionSubtextFontFamily")) & ", " & _
  107.         "navigation_link_font_color = " & SQLEncode(Request.Form("txtNavigationLinkFontColor")) & ", " & _
  108.         "navigation_link_font_size = " & lngNavigationLinkFontSize & ", " & _
  109.         "navigation_link_font_weight = " & SQLEncode(Request.Form("cboNavigationLinkFontWeight")) & ", " & _
  110.         "navigation_link_font_family = " & SQLEncode(Request.Form("cboNavigationLinkFontFamily")) & ", " & _
  111.         "html_top = " & SQLEncode(Trim(Request.Form("txtHTMLTop"))) & ", " & _
  112.         "html_bottom = " & SQLEncode(Trim(Request.Form("txtHTMLBottom"))) & ", " & _
  113.         "navigation_back_button_path = " & SQLEncode(Request.Form("txtNavigationBackButtonPath")) & ", " & _
  114.         "navigation_back_link_text = " & SQLEncode(Request.Form("txtNavigationBackLinkText")) & ", " & _
  115.         "navigation_next_button_path = " & SQLEncode(Request.Form("txtNavigationNextButtonPath")) & ", " & _
  116.         "navigation_next_link_text = " & SQLEncode(Request.Form("txtNavigationNextLinkText")) & ", " & _
  117.         "navigation_done_button_path = " & SQLEncode(Request.Form("txtNavigationDoneButtonPath")) & ", " & _
  118.         "navigation_done_link_text = " & SQLEncode(Request.Form("txtNavigationDoneLinkText")) & ", " & _
  119.         "navigation_cancel_button_path = " & SQLEncode(Request.Form("txtNavigationCancelButtonPath")) & ", " & _
  120.         "navigation_cancel_link_text = " & SQLEncode(Request.Form("txtNavigationCancelLinkText")) & _
  121.         " WHERE template_id = " & Request.Form("TemplateID")
  122.     conTemplate.Execute ConvertSQL(strSQL), , adCmdText
  123.  
  124.     'Clean up
  125.     conTemplate.Close
  126.     Set conTemplate = Nothing
  127.  
  128.     'Redirect to the main list of templates
  129.     Response.Redirect "TemplateList.asp"
  130. %>