Quan_kind.asp
Upload User: pengwei803
Upload Date: 2021-02-10
Package Size: 3311k
Code Size: 5k
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="32" style="border: 1px solid #D0D4D9" bgcolor="#EEEEEE" >&nbsp;<b>当前栏目:</b>&gt; 
  32. 圈子类型</td>
  33. </tr>
  34.     <tr><td height="38">
  35.       &nbsp;<input class="input_back" type="button" name="Submit" value="圈子管理"onclick="location.href='quan_list.asp'"/> 
  36.       <input class="input_back" type="button" name="Submit" value="圈子帖子"onclick="location.href='Ht_list.asp'"/>      
  37. <input class="input_back" type="button" name="Submit0" value="管理首页"onclick="location.href='main.asp'"/></td></tr>
  38. </table>
  39. </div>
  40. <div align="center">
  41. <table border="0" width="95%"  cellpadding="3" cellspacing="10" style="border: 1px solid #D0D4D9">
  42. <tr bgcolor="#ffffff">
  43. <td height="30" bgcolor="#EEEEEE" colspan="4"><b>分 类 列 表 |</b> 
  44. <a href="Quan_kind.asp?action=add">添 加 分 类</a></td>
  45. </tr>
  46. <%
  47. set rs=server.CreateObject("adodb.recordset")
  48. sql="select * from Quan_type order by id asc"
  49. rs.open sql,conn,1,1
  50. if rs.eof then
  51. %>
  52. <tr style="border: 1px solid #D0D4D9"><td>没有连接</td></tr>
  53. <% else 
  54.   dim k
  55.   k=1
  56. %>
  57. <tr align="center" >
  58. <% do while not rs.eof%>
  59. <td width="25%" style="border: 1px solid #D0D4D9"><b><%=left(rs("name"),6)%></b>   [<a href="Quan_kind.asp?action=edit&id=<%=rs("id")%>">修改</a>] [<a href="quan_kind.asp?action=del&id=<%=rs("name")%>">删除]</a> 
  60. </td>
  61. <% if k mod 4 =0 then%> 
  62. </tr><tr align="center" bgcolor="#ffffff">
  63. <% end if%><% k=k+1
  64.    rs.movenext
  65.    loop
  66. end if
  67. rs.close
  68. set rs=nothing
  69. %>
  70. <td height="30" style="border: 1px solid #D0D4D9" ></td>
  71. </tr>
  72. </table>
  73. </div>
  74. <%
  75. if request("action")="del" then
  76. id=Request.QueryString("id")
  77. set rs=server.createobject("adodb.recordset")
  78. sql="select * from quan where lb='"&id&"' "
  79. rs.open sql,conn,1,1
  80. if (rs.eof and rs.bof) then
  81.     delsql="delete from Quan_type where name='"&id&"'"
  82.     conn.execute(delsql)
  83.     conn.close
  84.     response.redirect"quan_kind.asp"
  85.     else
  86.            Response.Write "<script>alert(""此类下有圈子不能删除!"");location.href=""javascript:history.back()"";</script>"
  87.     end if
  88. end if
  89. %>
  90. <!---添加分类--->
  91. <% if request("action")="add" then%>
  92. <div align="center">
  93. <table border="0" width="96%" height="146" cellpadding="0" cellspacing="5"  >
  94.      <tr><td height="30">
  95.     
  96.     </td></tr>
  97. <tr >
  98. <td height="30"  bgcolor="#EEEEEE" style="border: 1px solid #D0D4D9">&nbsp;<b>当前操作:</b>&gt; 
  99. 添加分类</td>
  100. </tr>
  101.     <tr><td height="66" style="border: 1px solid #D0D4D9">
  102.      <form method="POST" action="deal_quan.asp?action=add_lb">
  103. <p> </p>
  104. <p align="center"><b>填写分类名称</b>:<input type="text" name="mingcheng" size="20">
  105. <input type="submit" value="添 加" name="B1"> <input type="reset" value="重 置" name="B2"></p>
  106. </form>
  107.      </td></tr>
  108. </table>
  109. </div>
  110. <%
  111. end if
  112. if request("action")="edit" then
  113. id=request("id")
  114. set rs=server.createobject("adodb.recordset")
  115.     sql="select * from Quan_type where id="&id
  116.     rs.open sql,conn,1,3
  117. %>
  118. <!--->
  119. <!---修改分类-->
  120. <div align="center">
  121. <table border="0" width="96%" height="146" cellpadding="0" cellspacing="5"  >
  122.      <tr><td height="30">
  123.     
  124.     </td></tr>
  125. <tr >
  126. <td height="30"  bgcolor="#EEEEEE" style="border: 1px solid #D0D4D9">&nbsp;<b>当前操作:</b>&gt; 
  127. 修改分类</td>
  128. </tr>
  129.     <tr><td height="66" style="border: 1px solid #D0D4D9">
  130.      <form method="POST" action="deal_quan.asp?action=edit_lb&id=<%=rs("id")%>">
  131. <p> </p>
  132. <p align="center"><b>修改分类名称</b>:<input type="text" name="mingcheng" size="20" value="<%=rs("name")%>">
  133. <input type="submit" value="修 改" name="B1"> <input type="reset" value="重 置" name="B2">
  134. </p>
  135. </form>
  136.      </td></tr>
  137. </table>
  138. </div>
  139. <% end if %>
  140. <!--->
  141. <p align="center"><!-- #include file="Ku_bottom.asp"--></p>
  142. </body>
  143. </html>