/members_only/motf1_rotation/index.asp

https://github.com/evizitei/bcfpd_asp · ASP · 88 lines · 80 code · 7 blank · 1 comment · 7 complexity · 5d373916f76dafb8fa141d84f6905c0c MD5 · raw file

  1. <!-- #include virtual="/members_only/include/functions.asa"-->
  2. <%
  3. If Not Session("Authorized")(10) Then
  4. Response.Redirect "/members_only/index.asp"
  5. End If
  6. ' Create a recordset object called rsRotation.
  7. set rsRotation = Server.CreateObject("ADODB.Recordset")
  8. If Request.Form("Submit") = "Save" then
  9. rsRotation.Open "SELECT * FROM TF_Rotation", cnnBCFPD,3,3
  10. For each item in Request.Form("Primary_Force")
  11. rsRotation("Primary_Force") = item
  12. rsRotation.Update
  13. rsRotation.MoveNext
  14. next
  15. rsRotation.close
  16. rsRotation.Open "SELECT * FROM TF_Rotation", cnnBCFPD,3,3
  17. For each item in Request.Form("Secondary_Force")
  18. rsRotation("Secondary_Force") = item
  19. rsRotation.Update
  20. rsRotation.MoveNext
  21. next
  22. rsRotation.close
  23. end if
  24. %>
  25. <!--#include virtual="/members_only/include/templates/top.asa"-->
  26. <!--#include virtual="/members_only/include/templates/members.asa"-->
  27. <form method="POST" action="index.asp" id="form1" name="form1">
  28. <table border="0" width="98%" cellspacing="0" cellpadding="5">
  29. <tr>
  30. <td class="PageTitle">MOTF1 Rotation Schedule</td>
  31. </tr>
  32. <tr>
  33. <td width="100%" valign="bottom">
  34. <table border="0" cellpadding="3" cellspacing="3">
  35. <tr>
  36. <td></td>
  37. <td>
  38. <table border="0" cellpadding="5" cellspacing="5" bordercolor="#f2f2f2">
  39. <tr>
  40. <td class="subheadercenter">Month</td>
  41. <td class="subheadercenter">Primary Force</td>
  42. <td class="subheadercenter">Secondary Force</td>
  43. </tr>
  44. <% rsRotation.Open "SELECT * FROM TF_Rotation ORDER BY Rotation_ID", cnnBCFPD,3
  45. do while not rsRotation.eof %>
  46. <tr>
  47. <td class="AppLabel"><%=rsRotation("Month")%></td>
  48. <td align="center"><select id="select1" name="Primary_Force">
  49. <option <% if rsRotation("Primary_Force") = "Blue" then%>selected<%end if%>>Blue</option>
  50. <option <% if rsRotation("Primary_Force") = "Red" then%>selected<%end if%>>Red</option>
  51. <option <% if rsRotation("Primary_Force") = "White" then%>selected<%end if%>>White</option>
  52. </select>
  53. </td>
  54. <td align="center"><select id="select1" name="Secondary_Force">
  55. <option <% if rsRotation("Secondary_Force") = "Blue" then%>selected<%end if%>>Blue</option>
  56. <option <% if rsRotation("Secondary_Force") = "Red" then%>selected<%end if%>>Red</option>
  57. <option <% if rsRotation("Secondary_Force") = "White" then%>selected<%end if%>>White</option>
  58. </select>
  59. </td>
  60. </tr>
  61. <%
  62. rsRotation.MoveNext
  63. loop
  64. rsRotation.close %>
  65. <tr>
  66. <td align="right" colspan="6">
  67. <a href="javascript:submit(document.form1, 'Save');"><img SRC="/images/members/buttons/save.gif" border="0"></a>
  68. <img src="/images/spacer.gif" border="0" height="1" width="35">
  69. <a style="cursor: hand" OnClick="window.history.back();"><img src="/images/members/buttons/cancel.gif" border="0" width="45" height="34"></a>
  70. <input type="hidden" name="Submit">
  71. </td>
  72. </tr>
  73. </table>
  74. </td>
  75. </tr>
  76. </table>
  77. </td>
  78. </tr>
  79. </table>
  80. </form>
  81. <!--#include virtual="/members_only/include/templates/bottom.asa"-->