BBS_kind.asp
Upload User: pengwei803
Upload Date: 2021-02-10
Package Size: 3311k
Code Size: 4k
Development Platform:

HTML/CSS

  1. <!--#include file="../Ku_inc/Ku_sql.asp"-->
  2. <!--#include file="../Ku_inc/Ku_config.asp"-->
  3. <!--#include file="Ku_conn.asp"-->
  4. <!--#include file="../Ku_inc/Ku_md5.asp"-->
  5. <!--#include file="../Ku_inc/inc.asp"-->
  6. <!-- #include file="Session.asp"-->
  7. <html>
  8. <head>
  9. <meta http-equiv="Content-Language" content="zh-cn">
  10. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  11. <title>论坛分类</title>
  12. <link href="include/style.css" rel="stylesheet" type="text/css">
  13. <style type="text/css">
  14. <!--
  15. input{
  16. height:22px;
  17. border:1px solid #BEBEBE;
  18. background-color:#FFF;
  19. padding-top: 2px;
  20. padding-right: 8px;
  21. padding-bottom: 0pt;
  22. padding-left: 3px;
  23. }
  24. -->
  25. </style>
  26. </head>
  27. <body>
  28. <div align="center">
  29. <table border="0" width="95%" height="70" cellpadding="0" cellspacing="0"  >
  30. <tr >
  31. <td height="30" style="border: 1px solid #D0D4D9" bgcolor="#EEEEEE" >&nbsp;<b>当前栏目:</b>&gt; 论坛分类</td>
  32. </tr>
  33.     <tr><td height="30">
  34.  
  35. <input class="input_back" type="button" name="Submit1" value="管理首页"onclick="location.href='main.asp'"/></td></tr>
  36. </table>
  37. </div>
  38. <div align="center">
  39. <table border="0" width="95%"  cellpadding="3" cellspacing="10" style="border: 1px solid #D0D4D9">
  40. <tr bgcolor="#ffffff">
  41. <td height="30" bgcolor="#EEEEEE" colspan="3"><b>分 类 列 表 |</b> 
  42. <a href="bbs_kind.asp?action=add">添 加 分 类</a></td>
  43. </tr>
  44. <%
  45. set rs=server.CreateObject("adodb.recordset")
  46. sql="select * from ku_bbskind order by id desc"
  47. rs.open sql,conn,1,1
  48. if rs.eof then
  49. %>
  50. <tr style="border: 1px solid #D0D4D9"><td>没有分类</td></tr>
  51. <% else 
  52.   'response.write bmrs("name")
  53.   dim k
  54.   k=1
  55. %>
  56. <tr align="center" >
  57. <% do while not rs.eof%>
  58. <td width="30%" style="border: 1px solid #D0D4D9"><b><%=left(rs("name"),10)%></b>   [<a href="BBs_kind.asp?action=edit&id=<%=rs("id")%>">修改</a>] [<a href="BBs_kind.asp?action=del&id=<%=rs("id")%>">删除]</a> 
  59. </td>
  60. <% if k mod 3 =0 then%> 
  61. </tr><tr align="center" bgcolor="#ffffff">
  62. <% end if%><% k=k+1
  63.    rs.movenext
  64.    loop
  65. end if
  66. rs.close
  67. set rs=nothing
  68. %>
  69. <td height="30" style="border: 1px solid #D0D4D9" ></td>
  70. </tr>
  71. </table>
  72. </div>
  73. <%
  74. if request("action")="del" then
  75. id=Request.QueryString("id")
  76.     delsql="delete from ku_bbskind where id="&id
  77.     conn.execute(delsql)
  78.     conn.close
  79.     response.redirect"BBs_kind.asp"
  80.     end if
  81. %>
  82. <!---添加分类--->
  83. <% if request("action")="add" then%>
  84. <div align="center">
  85. <table border="0" width="96%" height="146" cellpadding="0" cellspacing="5"  >
  86.      <tr><td height="30">
  87.     
  88.     </td></tr>
  89. <tr >
  90. <td height="30"  bgcolor="#EEEEEE" style="border: 1px solid #D0D4D9">&nbsp;<b>当前操作:</b>&gt; 添加分类</td>
  91. </tr>
  92.     <tr><td height="66" style="border: 1px solid #D0D4D9">
  93.      <form method="POST" action="deal_bbs.asp?action=add">
  94. <p> </p>
  95. <p align="center"><b>填写分类名称</b>:<input type="text" name="mingcheng" size="20"> <input type="submit" value="添 加" name="B1"> <input type="reset" value="重 置" name="B2"></p>
  96. </form>
  97.      </td></tr>
  98. </table>
  99. </div>
  100. <%
  101. end if
  102. if request("action")="edit" then
  103. id=request("id")
  104. set rs=server.createobject("adodb.recordset")
  105.     sql="select * from ku_bbskind where id="&id
  106.     rs.open sql,conn,1,3
  107. %>
  108. <!--->
  109. <!---修改分类-->
  110. <div align="center">
  111. <table border="0" width="96%" height="146" cellpadding="0" cellspacing="5"  >
  112.      <tr><td height="30">
  113.     
  114.     </td></tr>
  115. <tr >
  116. <td height="30"  bgcolor="#EEEEEE" style="border: 1px solid #D0D4D9">&nbsp;<b>当前操作:</b>&gt; 修改分类</td>
  117. </tr>
  118.     <tr><td height="66" style="border: 1px solid #D0D4D9">
  119.      <form method="POST" action="deal_bbs.asp?action=edit&id=<%=rs("id")%>">
  120. <p> </p>
  121. <p align="center"><b>修改分类名称</b>:<input type="text" name="mingcheng" size="20" value="<%=rs("name")%>"> <input type="submit" value="修 改" name="B1" > <input type="reset" value="重 置" name="B2"></p>
  122. </form>
  123.      </td></tr>
  124. </table>
  125. </div>
  126. <% end if %>
  127. <!--->
  128. <p align="center"><!-- #include file="Ku_bottom.asp"--></p>
  129. </body>
  130. </html>