/admin/pf_class.asp

https://github.com/hare1987/kaidun180 · ASP · 135 lines · 130 code · 5 blank · 0 comment · 0 complexity · f631749ca22f4870fa905afd33a6443f MD5 · raw file

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <!--#include file="pf_conn.asp"-->
  3. <!--#include file="pf_function.asp"-->
  4. <!--#include file="pf_session.asp"-->
  5. <%
  6. If request.Form("submit") = "È·ÈÏÌí¼Ó" Then
  7. If request.Form("class_name") = "" Then
  8. Call infoback("¿ª°àÃû³Æ²»ÄÜΪ¿Õ£¡")
  9. End If
  10. If request.Form("class_date") = "" Then
  11. Call infoback("ÉÏ¿ÎÈÕÆÚ²»ÄÜΪ¿Õ£¡")
  12. End If
  13. If request.Form("class_time") = "" Then
  14. Call infoback("ÉÏ¿Îʱ¼ä²»ÄÜΪ¿Õ£¡")
  15. End If
  16. If request.Form("class_address") = "" Then
  17. Call infoback("ÉϿεص㲻ÄÜΪ¿Õ£¡")
  18. End If
  19. Set rs = server.CreateObject("adodb.recordset")
  20. sql = "select * from class"
  21. rs.Open sql, conn, 1, 3
  22. rs.addnew
  23. rs("class_name") = request.Form("class_name")
  24. rs("class_time") = request.Form("class_time")
  25. rs("class_date") = request.Form("class_date")
  26. rs("class_address") = request.Form("class_address")
  27. rs.update
  28. Call close_rs
  29. Call close_conn
  30. Call infohref("Ìí¼Ó³É¹¦£¡", "pf_class.asp")
  31. End If
  32. %>
  33. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  34. <html xmlns="http://www.w3.org/1999/xhtml">
  35. <head>
  36. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  37. <title>¿­Ù¶ùͯÃÀÓïѧУ»Ó­Äú!</title>
  38. <link href="pf_style.css" rel="stylesheet" type="text/css" />
  39. <style type="text/css">
  40. <!--
  41. .style1 {}
  42. -->
  43. </style>
  44. </head>
  45. <body>
  46. <!--#include file="pf_top.asp"-->
  47. <div id="content">
  48. <!--#include file="pf_left.asp"-->
  49. <div id="right">
  50. <div class="right_title">
  51. <h1>ÐÞ¸ÄÃûʦÐÅÏ¢</h1>
  52. </div>
  53. <div class="right_body">
  54. <table>
  55. <tr>
  56. <tr>
  57. <th>¿ª°àÃû³Æ</th>
  58. <th >ÉÏ¿Îʱ¼ä</th>
  59. <th >ÉÏ¿ÎÈÕÆÚ</th>
  60. <th >ÉϺ£µØµã</th>
  61. <th width="148">Ð޸IJÙ×÷</th>
  62. </tr>
  63. <%
  64. Set rs = server.CreateObject("adodb.recordset")
  65. sql = "select * from class"
  66. rs.Open sql, conn, 1, 1
  67. Do While Not rs.EOF
  68. %>
  69. <tr align="center">
  70. <td><%=rs("class_name")%></td>
  71. <td><%=rs("class_time")%></td>
  72. <td><%=rs("class_date")%></td>
  73. <td><%=rs("class_address")%></td>
  74. <td>[<a href="pf_class_modify.asp?ID=<%=rs("ID")%>">ÐÞ¸Ä</a>] [<a href="pf_class_delete.asp?ID=<%=rs("ID")%>" onclick="return confirm('È·¶¨ÒªÉ¾³ý´Ë¼Ç¼Âð£¿É¾³ýºó½«²»¿É»Ö¸´£¡')">ɾ³ý</a>]</td>
  75. </tr>
  76. <%
  77. rs.movenext
  78. Loop
  79. Call close_rs
  80. %>
  81. </table>
  82. </div>
  83. <div class="right_title">
  84. <h1>Ìí¼Ó¿ª°àÐÅÏ¢</h1>
  85. </div>
  86. <div class="right_body">
  87. <table>
  88. <form name="pcfinal" method="post">
  89. <tr>
  90. <td width="9%" align="center">¿ª°àÃû³Æ£º</td>
  91. <td width="91%"><input type="text" name="class_name" size="60" />
  92. <span class="red">±ØÌî</span> </td>
  93. </tr>
  94. <tr>
  95. <td width="9%" align="center">¿ª°àʱ¼ä£º</td>
  96. <td width="91%"><input type="text" name="class_time" size="60" />
  97. </td>
  98. </tr>
  99. <tr>
  100. <td width="9%" align="center">¿ª°àÈÕÆÚ£º</td>
  101. <td width="91%"><input type="text" name="class_date" size="60" />
  102. </td>
  103. </tr>
  104. <tr>
  105. <td align="center">¿ª°àµØµã£º</td>
  106. <td><select name="class_address" id="class_address">
  107. <option selected="selected">Ðì»ãÌïÁÖУ</option>
  108. <option>»ÆÆÖÊé³ÇУ</option>
  109. <option>ÆÖ¶«½ðÇÅУ</option>
  110. <option>ãÉÐÐݷׯУ</option>
  111. <option>ºç¿Ú¶«±¦Ð£</option>
  112. <option>³¤Äþºç¿ÚУ</option>
  113. <option>Ëɽ­¾ÅͤУ</option>
  114. <option>±¦É½´ó»ªÐ£</option>
  115. </select></td>
  116. </tr>
  117. <tr>
  118. <td colspan="2" align="center">
  119. <input type="submit" name="submit" class="submit_button" value="È·ÈÏÌí¼Ó">
  120. </td>
  121. </tr>
  122. </form>
  123. </table>
  124. </div>
  125. </div>
  126. <div class="clear"></div>
  127. </div>
  128. <!--#include file="pf_bottom.asp"-->
  129. </body>
  130. </html>