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

📄 main.asp

📁 安全性好,适用于制作论坛和进行资源下载的个人和大型网站使用!
💻 ASP
📖 第 1 页 / 共 3 页
字号:
        </tr>
<%end if%>
         </table>
      </td>
    </tr>
</table>
<%
iii=iii+1
rs.movenext
loop
rs.close
set rs=nothing
end if
end sub

sub showlist()
Dim CurPage,Url_Add
Url_Add="?bid="&bid&"&"
If Request.QueryString("Page")<>"" Then
   Curpage=Request.QueryString("Page")
   If IsInteger(Curpage)=False OR Curpage<0 Then Curpage=1
Else
   Curpage=1
End If
dim sql,pagenum,tbdate
dim hx66_keyword
if not trim(request.querystring("keywords"))="" then
SearchType=htmlencode(restr(trim(request.querystring("SearchType"))))
hx66_keyword=htmlencode(restr(trim(request.querystring("keywords"))))
select case SearchType
case"贴子"
  sql="select * from hx66_bbs where hx66_bid="&bid&" and hx66_delete=0 and hx66_title like '%"&hx66_keyword&"%' order by hx66_time desc"
case"会员"
  sql="select * from hx66_bbs where hx66_bid="&bid&" and hx66_delete=0 and hx66_name like '%"&hx66_keyword&"%' order by hx66_time desc"
end select
  Url_Add=Url_Add&"SearchType="&server.urlencode(SearchType)&"&keywords="&server.urlencode(hx66_keyword)&"&"
else
  sql="select * from hx66_bbs where hx66_bid="&bid&" and hx66_top<>3 and hx66_delete=0 order by hx66_top desc,hx66_time desc"
end if
set tbdate=server.createobject("adodb.recordset")
tbdate.open sql,conn,1,1
   Dim bbs_Nums,MultiPages,icount
   tbdate.PageSize=perpagenum
   tbdate.AbsolutePage=CurPage
   bbs_Nums=tbdate.RecordCount
   MultiPages="本版共有:"&bbs_Nums&"条主题&nbsp;&nbsp;"&MultiPage(bbs_Nums,perpagenum,CurPage,Url_Add)&""
Do Until tbdate.EOF OR icount=perpagenum
%>
<table class="table-hx66s" cellSpacing="1" cellPadding="0" width="760" align="center" border="0" bgcolor=#FFFFFF>
    <tr>
      <td>
              <table width="740" border="1" align="center" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF" bordercolor="#f0f0f0" style="border-collapse: collapse">
            <tr>
              <td align="middle" width="5%" height="24"><%if tbdate("hx66_top")=1 then%><img src="images/top.gif" alt="置顶主题"><%elseif tbdate("hx66_close")=1 then%><img src="images/close.gif" alt="锁定主题"><%elseif tbdate("hx66_level")=1 then%><img src="images/isbest.gif" alt="精华主题"><%elseif tbdate("hx66_vote")=1 then%><img src="images/poll.gif" alt="投票主题"><%elseif tbdate("hx66_hf")>=10 then%><img src="images/hot.gif" alt="热门主题"><%else%><img src="images/4.gif" alt="开放主题"><%end if%></td>
              <td width="53%" height="24"><%if checkbbsadmin(bid)=2 or checkadmin(ckuname)>=3 then%><img src="images/plus.gif" onClick="javascript:showchild(tr_<%=icount%>)"><%end if%><%if tbdate("hx66_name")=ckuname then%><img src="images/I.gif" alt="自已的主题"><%else%>&nbsp;<%end if%><a name='topiclink' href="bbs_detail.asp?bid=<%=tbdate("hx66_bid")%>&aid=<%=tbdate("id")%>" title="<%=tbdate("hx66_title")%>"><%if tbdate("hx66_yl")=0 then%><%=chsearchstr(leftshow(tbdate("hx66_title"),40),hx66_keyword)%><%else%><font color="<%=ylcolor(tbdate("hx66_yl"))%>"><%=chsearchstr(leftshow(tbdate("hx66_title"),40),hx66_keyword)%></font><%end if%></a><%if DateDiff("h",tbdate("hx66_fatime"),now())<=24 then%>&nbsp;<img src="images/new.gif" alt="New"><%end if%>
<%replynum=tbdate("hx66_hf")+1
if replynum>10 then
	response.write "[ <img src='Images/pagelist.gif' border='0' title='分页列表' alt='分页列表'>"
  	if replynum mod 10=0 then
     		Pnum= replynum \ 10
  	else
     		Pnum= replynum \ 10+1
  	end if
	for p=2 to Pnum
	response.write " <a href='bbs_detail.asp?bid="&tbdate("hx66_bid")&"&aid="&tbdate("id")&"&page="&P&"'><font color=red>"&p&"</font></a> "
	if p+1>5 then
	response.write "..<a href='bbs_detail.asp?bid="&tbdate("hx66_bid")&"&aid="&tbdate("id")&"&page="&Pnum&"'><font color=red>"&Pnum&"</font></a> "
	exit for
	end if
	next
	response.write "]"
else
	pnum=1
end if
if tbdate("hx66_top")=1 then
 if tbdate("hx66_level")=1 then Response.Write "<img src='images/isbest.gif' alt='精华主题' align='absmiddle'>"
end if%></td>
              <td align="middle" width="12%" height="24">&nbsp;<a href="viewperson.asp?bid=<%=bid%>&author=<%=server.urlencode(tbdate("hx66_name"))%>" target="_blank"><%=chsearchstr(tbdate("hx66_name"),hx66_keyword)%></a></td>
              <td align="middle" width="10%" height="24"><%=tbdate("hx66_hf")%>/<%=tbdate("hx66_count")%></td>
              <td width="20%" height="24">&nbsp;<%=right(year(tbdate("hx66_time")),2)%>-<%=Right("0" & month(tbdate("hx66_time")),2)%>-<%=Right("0" & day(tbdate("hx66_time")),2)%>┆<%=tbdate("hf_name")%></td>
            </tr>
<%if checkbbsadmin(bid)=2 or checkadmin(ckuname)>=3 then%>
        <tr id="tr_<%=icount%>" style="display:none">
          <td height="20" colspan="5">&nbsp;颜色设置: <a href="bbs_admin.asp?act=changecolor&id=<%=tbdate("id")%>&bid=<%=tbdate("hx66_bid")%>&type=1"><font color="#FF0000">红色</font></a> <a href="bbs_admin.asp?act=changecolor&id=<%=tbdate("id")%>&bid=<%=tbdate("hx66_bid")%>&type=2"><font color="#0000FF">蓝色</font></a> <a href="bbs_admin.asp?act=changecolor&id=<%=tbdate("id")%>&bid=<%=tbdate("hx66_bid")%>&type=3"><font color="#007500">绿色</font></a> <a href="bbs_admin.asp?act=changecolor&id=<%=tbdate("id")%>&bid=<%=tbdate("hx66_bid")%>&type=4"><font color="#750000">暗红</font></a> <a href="bbs_admin.asp?act=changecolor&id=<%=tbdate("id")%>&bid=<%=tbdate("hx66_bid")%>&type=5"><font color="#FF00FF">粉红</font></a> <a href="bbs_admin.asp?act=changecolor&id=<%=tbdate("id")%>&bid=<%=tbdate("hx66_bid")%>&type=0">还原</a></td>                                     
        </tr>
<%end if%>
        </table>
      </td>
    </tr>
</table>
<%
icount=icount+1
tbdate.movenext
loop
%>
<table class="table-hx66s" cellSpacing="1" cellPadding="0" width="760" align="center" border="0" bgcolor=#FFFFFF>
    <tr>
      <td>
        <table width="740" border="1" align="center" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF" bordercolor="#f0f0f0" style="border-collapse: collapse">
            <tr>
              <td align="center" height="30"><%=MultiPages%></td>
            </tr>
        </table>
      </td>
    </tr>
</table>
<table class="table-hx66s" cellSpacing="1" cellPadding="0" width="760" align="center" border="0" bgcolor=#FFFFFF>
    <tr>
      <td>
        <table width="740" border="1" align="center" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF" bordercolor="#f0f0f0" style="border-collapse: collapse">
            <tr>
              <td class="table-xiayou" align="center" width="740" height="24">-=>论坛图例:<img src=images/4.gif> 开放的主题&nbsp;&nbsp;<img src=images/hot.gif> 回复超10贴&nbsp;&nbsp;<img src=images/close.gif> 锁定的主题&nbsp;&nbsp;<img src=images/top.gif> 固顶的主题&nbsp;&nbsp;<img src=images/top1.gif> 总固顶的主题&nbsp;&nbsp;<img src=images/isbest.gif> 精华主题&nbsp;&nbsp;<img src=images/poll.gif> 投票主题</td>
            </tr>
        </table>
      </td>
    </tr>
</table>
<%
tbdate.close
set tbdate=nothing
end sub

sub showsearch()
%><form name="forms" action="list.asp?bid=<%=bid%>&act=search" method="post">
<td align="right" width="450" height="30">论坛搜索:<input type="text" name="keywords" size="20" class="input">&nbsp;<input name="searchType" type="radio" value="贴子" checked>贴子<input type="radio" name="searchType" value="会员">会员&nbsp;<input type="submit" name="search" value="搜索关键字" class="input"></td></form>
<%
end sub


sub list()
%>
<table class="table-hx66s" cellSpacing="1" cellPadding="0" width="760" align="center" border="0" bgcolor=#FFFFFF>
  <tr>
    <td>
<%
dim bb,j
j=0
sql="SELECT * FROM hx66_bbsid ORDER BY hx66_order ASC"   
set rs0=server.createobject("adodb.recordset")
rs0.open sql,conn,1,1
do while not rs0.eof
j=j+1
bb=rs0("id")%>
<table width="740" border="1" align="center" cellspacing="1" class="b4" cellpadding="0" bgcolor="#FFFFFF" bordercolor="#f0f0f0" style="border-collapse: collapse">
<tr>
   <td width="740" height="26" colSpan=2 class="a4" align="center"><B>≡ <%=rs0("hx66_title")%> ≡</B></td>
</tr>
<%dim i,aa
i=0
sql="SELECT * FROM hx66_bbsinfo where hx66_bbsid="&bb&" ORDER BY hx66_order ASC"   
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
i=i+1
aa=rs("id")
if rs("hx66_ziduan")="2" then
   folder="〖展示版〗" 
elseif rs("hx66_ziduan")="1" then
   folder="【回复版】" 
else
   folder=""       
end if 
set rs1=server.CreateObject("adodb.recordset")
sqlstr="select top 1 * from hx66_bbs where hx66_bid="&aa&" and hx66_delete=0 order by hx66_time desc"
rs1.open sqlstr,conn,1,1
%>
<tr>
<%if rs("hx66_Grade")=1 then 
Response.Write "<td align=center width=60><img src='images/on.gif' align='absmiddle' alt='会员论坛'></td>" & vbCrLf
elseif rs("hx66_Grade")=2 then
Response.Write "<td align=center width=60><img src='images/lock.gif' align='absmiddle' alt='VIP论坛'></td>" & vbCrLf
else
Response.Write "<td align=center width=60><img src='images/off.gif' align='absmiddle' alt='普通论坛'></td>" & vbCrLf
end if%>
              <td align="center" width="680" height="80">
<%if rs1.recordcount="0" then
response.write "<a href=""list.asp?bid="&aa&""">『此版面目前尚无贴子』</a>"
else%>
             <table align=left>
             <tr><td width="380">-=> <a href="list.asp?bid=<%=aa%>"><%=rs("hx66_bbstitle")%><%=folder%></a></td><td width="110" rowspan=2><a href="list.asp?bid=<%=aa%>"><img src=images/Hx<%=j%>_<%=i%>.gif align=top border=0 alt="点击进入本版面"></a></td><td width="200">主题:<a href="bbs_detail.asp?bid=<%=rs1("hx66_bid")%>&aid=<%=rs1("id")%>" Title="主题作者:<%=rs1("hx66_name")%>&#13&#10发表时间:<%=rs1("hx66_fatime")%>"><%=leftshow(rs1("hx66_title"),22)%></a></td></tr>
             <tr><td width="380" colSpan=2><img src="images/menu_dot.gif" align="absmiddle">&nbsp;<%=rs("hx66_bbsdis")%></td><td width="200">回复:<%=rs1("hf_name")%><BR>更新:<%=rs1("hx66_time")%>&nbsp;<IMG vspace=8 border=0 align=absmiddle src="images/lastpost.gif"></td></tr>
             <tr><td width="480" bgcolor="#f7f7f7" colSpan=2>版主:
<%set rsbbsadmin=server.CreateObject("adodb.recordset")
sqlbbsadmin="select * from hx66_admin where hx66_bid="&aa
rsbbsadmin.open sqlbbsadmin,conn,1,1
do while not rsbbsadmin.eof
response.write"<a href=""viewperson.asp?bid="&aa&"&author="&server.urlencode(rsbbsadmin("hx66_name"))&""" target=""_blank"">"&rsbbsadmin("hx66_name")&"</a>&nbsp;&nbsp;"
rsbbsadmin.movenext
loop
rsbbsadmin.close
set rsbbsadmin=nothing
%>
</td><td width="200" bgcolor="#f7f7f7">新帖:<font color=red><%=rs("todaynum")%></FONT> 主题:<%=rs("topicnum")%> 总量:<%=rs("allnum")%></td></tr>
             </table>
         <%end if%>
      </td>
   </tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</table> 
<table cellSpacing="1" cellPadding="0" width="740" align="center" border="0" bgcolor=#FFFFFF>
<tr>
   <td height="5"></td>
</tr>
</table>
<%rs0.movenext
loop
rs0.close
set rs0=nothing
%>
    </td>
  </tr>
</table>
<table class="table-hx66s" cellSpacing="1" cellPadding="0" width="760" align="center" border="0" bgcolor=#FFFFFF>
    <tr>
      <td>
         <table width="740" border="0" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" bordercolor="#f0f0f0" style="border-collapse: collapse" class="b4">
            <tr>
              <td width="740" height="26" colSpan=2 class="a4"><a href="../link.asp"><B>&nbsp;推荐友情连接</B></a></td>
            </tr>
            <tr>

⌨️ 快捷键说明

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