⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 morebbs.asp

📁 网络办公系统源码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<!--#include file="../../inc/navigate.asp"-->
<%
dim sPageNavigate  '分页表格 
dim iRecordCount,iMaxPageCount,iPageCount,iCurrentPageIndex,i,sTMP  '分页
iMaxPageCount=20 '一页多少行记录
Submit=trim(request.Form("Submit"))
blogid=replace(trim(request.Form("blogid"))," ","")
bid=replace(request("bid"),"'","")
uid=replace(request("uid"),"'","")
bid1=replace(request.Form("bid1"),"'","")
hid=replace(request.Form("hid"),"'","")

if Submit="删除信息" then
 if session("adminid")<>cint(hid) then
		call Message("只有版主才可以删除","back")
		call endexit()
 end if
 
	bid=split(blogid,",")
	for i=0 to ubound(bid)
		delsql="delete from oa_bbs where id="&bid(i)&""
		conn.execute(delsql)
	next
	call message("删除成功","morebbs.asp?bid="&bid1&"&uid="&hid&"")
	call EndExit()
end if

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
.style2 {color: #CC0000}
-->
</style>
</head>
<body>
<form name="form1" action="morebbs.asp" method="post">
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  
  <tr align="center">
    <td width="100%" height="25" align="left" bgcolor="#CC0000"><input name="Submit" type="button" class="tabel1" value="论坛分类管理" onClick="window.location.href='bbsclass.asp'">
    <input name="Submit2" type="button" class="bon" value="我要发贴" onClick="window.location.href='add_bbs.asp?bid=<%=bid%>'">
    <input name="Submit" type="submit" class="bon" id="Submit" value="删除信息">
    <input name="hid" type="hidden" id="hid" value="<%=uid%>">
    <input name="bid1" type="hidden" id="bid1" value="<%=bid%>"></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td align="center">&nbsp; </td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="2">
      <tr>
        <td width="5%" height="25" align="center" bgcolor="#99CCFF"><img src="img/forum_old.gif" width="15" height="14"></td>
        <td width="44%" align="center" bgcolor="#99CCFF">主题
          </td>
        <td width="18%" align="center" bgcolor="#99CCFF">作者</td>
        <td width="12%" align="center" bgcolor="#99CCFF">回复/查看</td>
        <td width="17%" align="center" bgcolor="#99CCFF">发表时间</td>
        <td width="4%" align="center" bgcolor="#99CCFF"><input name="checkbox" type=checkbox class="bon" onclick=sel('blogid')></td>
      </tr>
	  <%
	  	
	  		Sql="select * from oa_bbs where bid="&bid&"  order by id desc"
		 		Call GetCurrentPageIndex()  '取得当前页码
				set my_rs=server.CreateObject("adodb.recordset")
				my_rs.open Sql,conn,1,3
				my_rs.PageSize=iMaxPageCount
				my_rs.CacheSize =iMaxPageCount
				if my_rs.recordCount <>   0   then   my_rs.Absolutepage=iCurrentPageIndex
				iRecordCount=my_rs.RecordCount  '所有查询出来的记录数
				iPageCount=my_rs.PageCount  '最终多少页
				if iCurrentPageIndex>iPageCount then iCurrentPageIndex=iPageCount  '控制当前页不得超出范围
				sPageNavigate=GetNavigate("morebbs.asp?bid="&bid&"&uid="&uid&"",iRecordCount,iMaxPageCount,iCurrentPageIndex,true,true,"项")  '取得分页表格
				if Not my_rs.Eof then
				For i = 1 to iMaxPageCount '利用for next 循环依次读出当前页的记录 
			  if my_rs.EOF then  Exit For
					bgColor="#F8F8F8"
				if i mod 2=0 then bgColor="#DFEFFF"
			ssql="select count(id) from oa_replybbs where parentid="&my_rs("id")
			set srs=conn.execute(ssql)
			replynum=srs(0)
			srs.close
			set srs=nothing

	  %>
      <tr bgcolor="<%=bgColor%>">
        <td height="25" align="center"><img src="img/hot_red_folder.gif" width="16" height="20"></td>
        <td height="25" align="center"><a href="viewbbs.asp?id=<%=my_rs("id")%>&bid=<%=my_rs("bid")%>"><%=my_rs("title")%></a></td>
        <td align="center"><%=my_rs("uname")%></td>
        <td align="center"><%=replynum%>/<%=my_rs("hits")%></td>
        <td align="center"><%=my_rs("addtime")%></td>
        <td align="center"><input type="checkbox" name="blogid" value="<%=my_rs(0)%>"></td>
      </tr>
	                <%
						my_rs.MoveNext()
				       Next
                     End if
                  my_rs.close
                 set my_rs=nothing
				%>
      <tr >
        <td height="25" colspan="6" align="center"><%=sPageNavigate%></td>
        </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -