LT_BanMian.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:4k
源码类别:

手机WAP编程

开发平台:

ASP/ASPX

  1. <!--#Include File="../Inc/Head.Asp"--><%
  2. Private FangWen
  3. Set FangWen=New xkon_FangWen
  4. FangWen.FangWen()
  5. FangWen.BanKuai()
  6. Set FangWen=Nothing
  7. Private c,s
  8. Set c=New xkon_Response
  9. Set s=New xkon_Request
  10. Private submit
  11. submit=s.Form("submit")
  12. Private Sub LieBiao()
  13. Dim p,i,Cn1
  14. p=s.QueryString_Long("p")
  15. Dim Word
  16. Word=s.QueryString("Word")
  17. Dim SQL
  18. Sql="Select * From BanKuai"
  19. If Word<>"" Then
  20. Sql=Sql&" Where BanKuai_MingChen Like '%"&Word&"%'"
  21. End If
  22. Sql=Sql&" Order By Id Desc"
  23. Call OpenData()
  24. Set Cn1=Server.CreateObject("Adodb.Recordset")
  25. Cn1.Open Sql,Conn,1,1
  26. Cn1.PageSize=20
  27. If Not Cn1.Eof Then
  28. Cn1.AbsolutePage=p
  29. End If
  30. c.Write("<form method=""post"" action=""LT_BanMian.Asp""><table width=100% ><tr><td></td><td>ID</td><td>版块名称</td><td>版块简介</td><td>版主</td><td>贴子数</td><td>回复数</td><td>创建时间</td><td>游客发贴</td><td>游客回复</td><td>进入需要等级</td><td></td><td></td><td></td></tr>")
  31. For i=1 To 20
  32. If Cn1.Eof Then Exit For
  33. c.Write("<tr><td><input type=""checkbox"" name=""id"" value="""&Cn1("ID")&""" /></td><td>"&Cn1("ID")&"</td><td>"&Cn1("BanKuai_MingChen")&"</td><td>"&Cn1("BanKuai_JianJie")&"</td><td>"&Cn1("BanKuai_BanZhu")&"</td><td>"&Cn1("ShuLiang_TieZhi")&"</td><td>"&Cn1("ShuLiang_HuiFu")&"</td><td>"&Cn1("BanKuai_ShiJian")&"</td><td>"&Zhuan(Cn1("YouKe_FaTie"))&"</td><td>"&Zhuan(Cn1("YouKe_HuiFu"))&"</td><td>"&Cn1("DenJi")&"</td><td><a href=""LT_BanMian_CaoZuo.Asp?l=x&amp;id="&Cn1("ID")&""">查看</a></td><td><a href=""LT_BanMian_CaoZuo.Asp?l=b&amp;id="&Cn1("ID")&""">编辑</a></td><td><a href=""LT_BanMian_CaoZuo.Asp?l=s&amp;id="&Cn1("ID")&""" onClick=""if(confirm('确认删除')){return true;}else{return false;}"">删除</a></td></tr>")
  34. Cn1.MoveNext
  35. Next
  36. c.Write("</table>")
  37. Call CPage(Cn1.PageCount,p,"LT_BanMian.Asp?Word="&Word)
  38. c.Writeln("操作:<input name=""submit"" type=""submit"" value=""删除"" /><input name=""submit"" type=""submit"" value=""合并"" /></form>")
  39. Cn1.Close
  40. Set Cn1=Nothing
  41. Call CloseData()
  42. End Sub
  43. Private Sub Delete()
  44. Dim iID,ID,i,SQL
  45. iID=Request.Form("ID")
  46. If iID="" Then
  47. Call xkon_Error("请先选中操作对象")
  48. Else
  49. ID=Split(iID,",")
  50. SQL="Delete From BanKuai"
  51. Dim SQL1
  52. SQL1="Update TieZhi Set Shan='1'"
  53. For i=0 To Ubound(ID)
  54. If ID(i)="" Then
  55. Call xkon_Error("参数提交错误")
  56. Response.End()
  57. Else
  58. If i=0 Then
  59. SQL1=SQL1&" Where BanKuai="&Clng(ID(i))
  60. SQL=SQL&" Where ID="&Clng(ID(i))
  61. Else
  62. SQL1=SQL1&" Or BanKuai="&Clng(ID(i))
  63. Sql=Sql&" Or ID="&Clng(ID(i))
  64. End If
  65. End If
  66. Next
  67. Call OpenData()
  68. Conn.Execute(Sql)
  69. Conn.Execute(SQL1)
  70. Call JiLu("删除版块"&s.Form("ID"))
  71. Call CloseData()
  72. Response.Write("<script language=javascript>location.href=""LT_BanMian.Asp"";</script>")
  73. Response.End()
  74. End If
  75. End Sub
  76. Private Sub HeBing()
  77. Dim iID,ID,i,SQL,SQL1
  78. iID=Request.Form("ID")
  79. If iID="" Then
  80. Call xkon_Error("缺少操作对象")
  81. Else
  82. ID=Split(iID,",")
  83. If Ubound(ID)<1 Then
  84. Call xkon_Error("至少应该选择两个对象")
  85. Else
  86. SQL="Delete From BanKuai Where"
  87. SQL1="Update TieZhi Set BanKuai="&Clng(ID(0))&" Where"
  88. For i=0 To Ubound(ID)
  89. If i=1 Then
  90. SQL1=SQL1&" BanKuai="&Clng(ID(i))
  91. SQL=SQL&" ID="&Clng(ID(i))
  92. Elseif i>1 Then
  93. SQL1=SQL1&" Or BanKuai="&Clng(ID(i))
  94. SQL=SQL&" Or ID="&Clng(ID(i))
  95. End If
  96. Next
  97. Call OpenData()
  98. Conn.Execute(SQL)
  99. Conn.Execute(SQL1)
  100. Call JiLu("合并版块"&s.Form("ID"))
  101. Call CloseData()
  102. c.Writeln("合并成功")
  103. End If
  104. End If
  105. End Sub
  106. Call H_Title("版面管理")
  107. Select Case submit
  108. Case "删除"
  109. Call Delete()
  110. Case "合并"
  111. Call HeBing()
  112. End Select
  113. c.Writeln("<a href=""LT_BanMian_CaoZuo.Asp?l=j"">增加版面</a>")
  114. Call LieBiao()
  115. c.Writeln("<form method=""get"" action=""LT_BanMian.Asp""><input name=""Word"" /><input type=""submit"" value=""搜索"" /></form>")
  116. Call H_End()
  117. Set c=Nothing
  118. Set s=Nothing
  119. %>