LT_BanMian.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:4k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#Include File="../Inc/Head.Asp"--><%
- Private FangWen
- Set FangWen=New xkon_FangWen
- FangWen.FangWen()
- FangWen.BanKuai()
- Set FangWen=Nothing
- Private c,s
- Set c=New xkon_Response
- Set s=New xkon_Request
- Private submit
- submit=s.Form("submit")
- Private Sub LieBiao()
- Dim p,i,Cn1
- p=s.QueryString_Long("p")
- Dim Word
- Word=s.QueryString("Word")
- Dim SQL
- Sql="Select * From BanKuai"
- If Word<>"" Then
- Sql=Sql&" Where BanKuai_MingChen Like '%"&Word&"%'"
- End If
- Sql=Sql&" Order By Id Desc"
- Call OpenData()
- Set Cn1=Server.CreateObject("Adodb.Recordset")
- Cn1.Open Sql,Conn,1,1
- Cn1.PageSize=20
- If Not Cn1.Eof Then
- Cn1.AbsolutePage=p
- End If
- 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>")
- For i=1 To 20
- If Cn1.Eof Then Exit For
- 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&id="&Cn1("ID")&""">查看</a></td><td><a href=""LT_BanMian_CaoZuo.Asp?l=b&id="&Cn1("ID")&""">编辑</a></td><td><a href=""LT_BanMian_CaoZuo.Asp?l=s&id="&Cn1("ID")&""" onClick=""if(confirm('确认删除')){return true;}else{return false;}"">删除</a></td></tr>")
- Cn1.MoveNext
- Next
- c.Write("</table>")
- Call CPage(Cn1.PageCount,p,"LT_BanMian.Asp?Word="&Word)
- c.Writeln("操作:<input name=""submit"" type=""submit"" value=""删除"" /><input name=""submit"" type=""submit"" value=""合并"" /></form>")
- Cn1.Close
- Set Cn1=Nothing
- Call CloseData()
- End Sub
- Private Sub Delete()
- Dim iID,ID,i,SQL
- iID=Request.Form("ID")
- If iID="" Then
- Call xkon_Error("请先选中操作对象")
- Else
- ID=Split(iID,",")
- SQL="Delete From BanKuai"
- Dim SQL1
- SQL1="Update TieZhi Set Shan='1'"
- For i=0 To Ubound(ID)
- If ID(i)="" Then
- Call xkon_Error("参数提交错误")
- Response.End()
- Else
- If i=0 Then
- SQL1=SQL1&" Where BanKuai="&Clng(ID(i))
- SQL=SQL&" Where ID="&Clng(ID(i))
- Else
- SQL1=SQL1&" Or BanKuai="&Clng(ID(i))
- Sql=Sql&" Or ID="&Clng(ID(i))
- End If
- End If
- Next
- Call OpenData()
- Conn.Execute(Sql)
- Conn.Execute(SQL1)
- Call JiLu("删除版块"&s.Form("ID"))
- Call CloseData()
- Response.Write("<script language=javascript>location.href=""LT_BanMian.Asp"";</script>")
- Response.End()
- End If
- End Sub
- Private Sub HeBing()
- Dim iID,ID,i,SQL,SQL1
- iID=Request.Form("ID")
- If iID="" Then
- Call xkon_Error("缺少操作对象")
- Else
- ID=Split(iID,",")
- If Ubound(ID)<1 Then
- Call xkon_Error("至少应该选择两个对象")
- Else
- SQL="Delete From BanKuai Where"
- SQL1="Update TieZhi Set BanKuai="&Clng(ID(0))&" Where"
- For i=0 To Ubound(ID)
- If i=1 Then
- SQL1=SQL1&" BanKuai="&Clng(ID(i))
- SQL=SQL&" ID="&Clng(ID(i))
- Elseif i>1 Then
- SQL1=SQL1&" Or BanKuai="&Clng(ID(i))
- SQL=SQL&" Or ID="&Clng(ID(i))
- End If
- Next
- Call OpenData()
- Conn.Execute(SQL)
- Conn.Execute(SQL1)
- Call JiLu("合并版块"&s.Form("ID"))
- Call CloseData()
- c.Writeln("合并成功")
- End If
- End If
- End Sub
- Call H_Title("版面管理")
- Select Case submit
- Case "删除"
- Call Delete()
- Case "合并"
- Call HeBing()
- End Select
- c.Writeln("<a href=""LT_BanMian_CaoZuo.Asp?l=j"">增加版面</a>")
- Call LieBiao()
- c.Writeln("<form method=""get"" action=""LT_BanMian.Asp""><input name=""Word"" /><input type=""submit"" value=""搜索"" /></form>")
- Call H_End()
- Set c=Nothing
- Set s=Nothing
- %>