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

📄 c.asp

📁 中国网站网贴吧程序源码(ASP+ACCESS) 实现功能: 多级分类查找,可按多级分类查找贴吧,多用户申请,任何人都可以申请自己的贴吧, 用户三种权限管理,1,普通会员,2,普通版主(只有管理自己的贴
💻 ASP
字号:
<!--#include file="boardconn.asp"-->
<!--#include file="inc/sql.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="inc/ip.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/postubb.asp"-->
<%
	Dim BoardNlassName,BoardClassName
	BoardClassName=Request.QueryString("/")

	Sql="select BoardClass from QiQiBoy_Class_Disp where BoardClassName='"&BoardClassName&"'"
	Set Rs=Conn.execute(Sql)
	BoardClass=rs(0)

	Sql="select BoardNlass from QiQiBoy_Class_Disp where BoardClassName='"&BoardClassName&"'"
	Set Rs=Conn.execute(Sql)
	BoardNlass=rs(0)
	Sql="select BoardNlassName from QiQiBoy_Nlass_Disp where BoardNlass="&Cint(BoardNlass)
	Set Rs=Conn.execute(Sql)
	BoardNlassName=rs(0)

	Sql="select count(BoardChild) from QiQiBoy_Board_Disp where BoardClass="&Cint(BoardClass)
	Set Rs=Conn.execute(Sql)
	BoardChild=rs(0)
	Sql="select count(TopicID) from QiQiBoy_Topic_Disp where ParentID=0 and BoardClass="&Cint(BoardClass)
	Set Rs=Conn.execute(Sql)
	TopicID=rs(0)
	Sql="select count(TopicID) from QiQiBoy_Topic_Disp where ParentID<>0 and BoardClass="&Cint(BoardClass)
	Set Rs=Conn.execute(Sql)
	ReplyID=rs(0)
%>
<HTML>
<HEAD>
<TITLE><%=BoardClassName%> - <%=HOST_NAME%> - <%=HOST_LIST%></TITLE>
<META http-equiv=Content-Type content="text/html; charset=GB2312">
<link rel="shortcut icon" href="images/bbs.ico">
<link href="style/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function form1_onsubmit() {
if (document.form1.Key.value=="")
	{
	  alert("友情提示!\n\n请完整输入贴吧名称!")
	  document.form1.Key.focus()
	  return false
	 }
}
// -->
</script>
</HEAD>

<BODY bgColor=#ffffff leftMargin=0 topMargin=0>
<!--#include file="top.asp"-->
<TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=0>
  <TBODY>
  <TR>
    <TD width=1% height=20 bgColor=<%=HOST_TITLE%>></TD><TD width=99% height=20 bgColor=<%=HOST_TITLE%> class=INDEX_VMALL><a href="index.asp"><font color=<%=HOST_FONT%>>首页</font></a> <font color=<%=HOST_FONT%>>&gt;</font> <a href="n.asp?/=<%=Server.UrlEncode(BoardNlassName)%>"><font color=<%=HOST_FONT%>><%=HTMLCode(BoardNlassName)%></font></a> <font color=<%=HOST_FONT%>>&gt;</font> <font color=<%=HOST_FONT%>><u><%=HTMLCode(BoardClassName)%></u></font></TD></TR></TBODY></TABLE>

            <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
              <TBODY>
              <TR>
                <TD width="1%" height="20" bgColor=#eeeeee></TD>
                <TD class=INDEX_XMALL width="5%" height="20" bgColor=#eeeeee>序号</TD>
                <TD class=INDEX_XMALL width="60%" height="20" bgColor=#eeeeee>贴吧列表</TD>
                <TD class=INDEX_XMALL width="9%" height="20" bgColor=#eeeeee>主题数</TD>
                <TD class=INDEX_XMALL width="9%" height="20" bgColor=#eeeeee>帖子数</TD>
                <TD class=INDEX_XMALL width="16%" height="20" bgColor=#eeeeee>更新时间</TD></TR>
<%
	Dim MyPageSize,MyPage

	Page=CInt(Request.QueryString("T"))

	MyPageSize   = 50
	   
	If Not IsNumeric(Page) Or IsEmpty(Page) Or Page <=0 Then
		MyPage=1
	else
		MyPage=Abs(Page)
	end if

	set rs=server.CreateObject("ADODB.RecordSet")
	Sql="select * from QiQiBoy_Board_Disp where BoardClass="&Cint(BoardClass)
	rs.Open sql,conn,1,1
	if not rs.eof then
		rs.PageSize     = MyPageSize
		MaxPages        = rs.PageCount
		Total           = rs.RecordCount
		rs.absolutepage = MyPage
	end if
	dim i
	Counter=0
%>
<%
	for i = 1 to MyPageSize
		if not rs.eof then
	bgcolor="#ffffff"
	if i mod 2 = 0 then 
		bgcolor=""&HOST_BODY&""
	else
		bgcolor="#ffffff"
	end If
%>
              <TR bgcolor="<%=bgcolor%>">
                <TD height="28"></TD>
                <TD class=INDEX_XMALL height="28"><%=(MyPage-1)*MyPageSize+i%></TD>
                <TD class=INDEX_TMALL height="28"><% if Rs("BoardHot")=1 then response.Write("[<font color=#cc0000>推荐</font>]") else response.Write("") end if %><A href="t.asp?/=<%Response.Write(Server.UrlEncode(rs(4)))%>"><%Response.Write(HTMLCode(rs(4)))%></A></TD>
                <TD class=INDEX_XMALL height="28"><%Response.Write(rs(9))%></TD>
                <TD class=INDEX_XMALL height="28"><%Response.Write(rs(10))%></TD>
                <TD class=INDEX_XMALL height="28"><%Response.Write(rs(7))%></TD></TR>
<%
else
		exit for
	end if
	rs.movenext
Next
%>
          <tr>
            <TD width="1%" height="20"></TD>
            <td colspan="5" width="99%" height="30" class=INDEX_XMALL>
<%
	response.Write("共有贴吧数 <font color=#cc0000>"&BoardChild&"</font> 个,&nbsp;主题数 <font color=#cc0000>"&TopicID&"</font> 篇,&nbsp;帖子数 <font color=#cc0000>"&ReplyID&"</font> 篇,&nbsp;&nbsp;&nbsp;")
	response.Write("[<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T=1"" title=""第一页""><<</a>] ")
	if MyPage > 1 then
	response.Write("[<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T="&MyPage-1&""" title=""上一页""><</a>] ")
	end if
	if (MyPage >= 5 and MaxPages-MyPage <1) then response.Write("[<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T="&MyPage-4&""">"&MyPage-4&"</a>] ")
	if (MyPage >= 4 and MaxPages-MyPage <2) then response.Write("[<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T="&MyPage-3&""">"&MyPage-3&"</a>] ")
	if MyPage >=3 then response.Write("<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T="&MyPage-2&""">["&MyPage-2&"]</a> ")
	if MyPage >=2 then response.Write("<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T="&MyPage-1&""">["&MyPage-1&"]</a> ")
	response.Write("[<u>"&MyPage&"</u>] ")
	if MaxPages-MyPage >=1 then response.Write("[<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T="&MyPage+1&""">"&MyPage+1&"</a>] ")
	if MaxPages-MyPage >=2 then response.Write("[<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T="&MyPage+2&""">"&MyPage+2&"</a>] ")
	if (MyPage <3 and MaxPages-MyPage >=3) then response.Write("[<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T="&MyPage+3&""">"&MyPage+3&"</a>] ")
	if (MyPage <2 and MaxPages-MyPage >=4) then response.Write("[<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T="&MyPage+4&""">"&MyPage+4&"</a>] ")
	if (MyPage <1 and MaxPages-MyPage >=5) then response.Write("[<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T="&MyPage+5&""">"&MyPage+5&"</a>] ")
	if MyPage < MaxPages then
	response.Write("[<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T="&MyPage+1&""" title=""下一页"">></a>] ")
	end if
	response.Write("[<a href=""?/="&Server.UrlEncode(BoardClassName)&"&T="&MaxPages&""" title=""最后页"">>></a>]")
%>
            </td>
          </tr>
<%
rs.close
Set rs=NOTHING
conn.Close
set conn=nothing
%>
</TBODY></TABLE>
<!--#include file="end.asp"-->

⌨️ 快捷键说明

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