home *** CD-ROM | disk | FTP | other *** search
/ bombers.k12.ar.us / bombers.k12.ar.us.tar / bombers.k12.ar.us / survey / Page.asp < prev    next >
Text File  |  2006-11-29  |  5KB  |  150 lines

  1.     <!--#Include File="Include/Top_inc.asp"-->
  2. <%
  3. '***********************************************************************
  4. '   Application: SelectSurveyASP Advanced v8.1.11
  5. '   Author: Aaron Baril for ClassApps.com
  6. '   Page Description: This page allows for editing the title and introduction
  7. '                      on an existing page.
  8. '
  9. '   COPYRIGHT NOTICE                                
  10. '
  11. '   See attached Software License Agreement
  12. '
  13. '   (c) Copyright 2002 - 2006 by ClassApps.com.  All rights reserved.
  14. '***********************************************************************
  15. %>
  16. <!--#Include File="Include/Config_inc.asp"-->
  17. <!--#Include File="Include/SurveyUtility_inc.asp"-->
  18. <!--#Include File="Include/Utility_inc.asp"-->
  19. <!--#Include File="Include/adovbs_inc.asp"-->
  20. <!--#Include File="Include/Constants_inc.asp"-->
  21. <!--#Include File="Include/SurveySecurity_inc.asp"-->
  22. <!--#Include File="Include/CurrentUser_inc.asp"-->
  23.  
  24. <%
  25.     Dim rsPage
  26.     Dim strSQL
  27.     Dim strState
  28.     Dim strPageTitle
  29.     Dim strPageIntroduction
  30.     Dim lngSurveyID    
  31.     Dim lngPageNumber
  32.     
  33.     'Initialization
  34.     Set rsPage = Server.CreateObject("ADODB.Recordset")
  35.     lngSurveyID = Request.QueryString("SurveyID")
  36.     lngPageNumber = Request.QueryString("PageNumber")
  37.     
  38.     'Load all the data from the database
  39.     strSQL = "SELECT page_title, page_introduction " & _
  40.              "FROM sur_page " & _
  41.              "WHERE page_number = " & lngPageNumber & _
  42.              " AND survey_id = " & lngSurveyID
  43.     rsPage.Open ConvertSQL(strSQL), SURVEY_APP_CONNECTION, adOpenForwardOnly, adLockReadOnly, adCmdText
  44.     If rsPage.EOF Then
  45.         strPageTitle = ""
  46.         strPageIntroduction = ""
  47.         strState = SUR_STATE_INSERT
  48.     Else
  49.         rsPage.MoveFirst
  50.         strPageTitle = rsPage("page_title")
  51.         strPageIntroduction = rsPage("page_introduction")
  52.         strState = SUR_STATE_EDIT
  53.     End If
  54.  
  55.     'Clean up
  56.     rsPage.Close
  57.     Set rsPage = Nothing
  58. %>
  59.  
  60. <html>
  61. <head>
  62.     <title>Edit Page Properties</title>
  63.     <link rel="stylesheet" href="Resources/StyleSheet/SurveyStyle.css">
  64. </head>
  65.  
  66. <body class="MainBodyStyle">
  67.  
  68. <!--#Include File="Include/FrameworkTop_inc.asp"-->
  69.  
  70. <table border="0" cellspacing="0" cellpadding="0" width="754" class="MediumBlueBackgroundColor">
  71.     <tr>
  72.         <td height="36" valign="center">
  73.               <span class="H1HeadingStyle"><a name="skipnav" tabindex="1">Edit Page Properties</a></span> <img style="cursor:hand" alt="Help" onClick="javascript:window.open('Help/Help.htm#DesigningSurveys', null, 'menubar=no,toolbar=no,titlebar=no,status=no,left=10,top=10,scrollbars=yes,resizable=yes,height=550,width=770');" border="0" src="Resources/Images/Help.gif">
  74.         </td>
  75.     </tr>
  76. </table>
  77.  
  78. <!--#Include File="Include/FrameworkTop2_inc.asp"-->
  79.  
  80. <table width="740" border="0" cellpadding="0" cellspacing="6" class="LightGrayBackgroundColor">
  81.     <form name="frmPage" method="post" action="PageAction.asp">
  82.         <input type="hidden" name="hdnState" value="<%=strState%>">
  83.         <input type="hidden" name="SurveyID" value="<%=lngSurveyID%>">
  84.         <input type="hidden" name="PageNumber" value="<%=lngPageNumber%>">
  85.         <tr>
  86.             <td width="1"></td>
  87.             <td width="738" align="left" valign="center" height="36" class="Normal">
  88.                 Both the page title and page introduction are optional, and may be omitted on any page.
  89.             </td>
  90.             <td width="1"> </td>
  91.         </tr>
  92.     </table>
  93.     <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="1" background="Resources/Images/ThinDivider.gif"></td></tr>
  94.     <table border="0" cellpadding="0" cellspacing="6" width="740" class="WhiteBackgroundColor">
  95.         <tr>
  96.             <td height="8"></td>
  97.         </tr>
  98.         <tr>
  99.             <td width="1" rowspan="20"></td>
  100.             <td width="170" valign="top" class="NormalBold">
  101.                 Survey:
  102.             </td>
  103.             <td width="540" valign="top" class="Normal">
  104.                 <%=Request.QueryString("SurveyName")%>
  105.             </td>
  106.             <td width="1" rowspan="20"> </td>
  107.         </tr>
  108.         <tr>
  109.             <td width="170" valign="top" class="NormalBold">
  110.                 Page Number:
  111.             </td>
  112.             <td width="540" valign="top" class="Normal">
  113.                 <%=lngPageNumber%>
  114.             </td>
  115.         </tr>
  116.         <tr>
  117.             <td width="170" valign="top" class="NormalBold">
  118.                 <label for="txtPageTitle">Page Title:</label>
  119.             </td>
  120.             <td width="540" valign="top" class="Normal">
  121.                 <input value="<%=strPageTitle%>" type="text" name="txtPageTitle" id="txtPageTitle" maxlength="50" style="width:540px" size="30">
  122.             </td>
  123.         </tr>
  124.         <tr>
  125.             <td valign="top" class="NormalBold">
  126.                 <label for="txtPageIntroduction">Page Introduction:</label>
  127.             </td>
  128.             <td valign="top" class="Normal">
  129.                 <textarea class="TextareaStyle" name="txtPageIntroduction" id="txtPageIntroduction" rows="6" style="width:540px"><%=strPageIntroduction%></textarea>
  130.             </td>
  131.         </tr>
  132.         <tr>
  133.             <td align="right" valign="middle" colspan="2" height="34">
  134.                 <a href="ModifySurvey.asp?SurveyID=<%=lngSurveyID%>"><img border="0" alt="Cancel" name="btnCancel" src="Resources/Buttons/Cancel.gif"></a>
  135.                 <input type="image" border="0" alt="Save" src="Resources/Buttons/Save.gif" name="btnSave">
  136.             </td>
  137.         </tr>
  138.     </form>
  139. </table>
  140.  
  141. <!--#Include File="Include/FrameworkBottom_inc.asp"-->
  142.  
  143. </body>
  144. </html>
  145.  
  146. <%        
  147.     'Ensure that the web server returns the page
  148.     Response.Flush
  149. %>
  150.