?? ku_type.asp
字號:
<!--#include file="Ku_top.asp" -->
<%
sub navigation()
response.write " >> "
response.write ""&Sortname&""
end sub
%>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="800" height="50" bgcolor="#ffffff">
<tr>
<td width="218" valign="top">
<div align="center">
<table border="0" width="208" id="table2" bgcolor="#ebebeb" cellpadding="0" cellspacing="0">
<tr>
<td height="30" background="xbqq_img/gonggao.gif">
<p align="center"><b>熱 門 文 章</b></td>
</tr>
<tr>
<td><% call xbqq_articleInfo(1,10,26,0,0) %></td>
</tr>
<tr>
<td height="0"><hr></td>
</tr>
<tr>
<td height="30" background="xbqq_img/gonggao.gif">
<p align="center"><b>信 息 搜 索</b></td>
</tr>
<tr>
<td height="23"><% xbqq_Search %></td>
</tr>
<tr>
<td height="0"><hr></td>
</tr>
<tr>
<td height="30" background="xbqq_img/gonggao.gif">
<p align="center"><b>站 內 投 票</b></td>
</tr>
<tr>
<td><% xbqq_vote %></td>
</tr>
<tr>
<td height="0"><br></td>
</tr>
</table>
</div>
</td>
<td width="580" valign="top">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="580" height="160">
<tr>
<td width="100%">
<!--主要內容開始-->
<%
Dim SortID
SortID=CheckStr(Request.QueryString("SortID"))
If isInt(SortID)=False OR Not IsNumeric(SortID) Then
Response.Redirect "index.asp"
Response.End()
End If
'欄目統計---------
set RsH=server.createobject("adodb.recordset")
hit="update Sort set hit=hit+1 where ID="&SortID
RsH.open hit,conn,1,3
'大類選取----------
sql="select * from Sort where ID="&SortID&""
Set Rs=conn.execute (sql)
if rs.eof and rs.bof then
response.redirect"index.asp"
else
Sortname=Rs("names")
SettingB=Rs("Setting")
Info=Rs("Info")
Rs.close
set Rs=nothing
end if
'分頁
page_count = 20
MaxPerPage=Page_count
dim sql
dim rs
dim gstBookID
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
%>
<TABLE width=100% border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=593>
<%
'主程序-----------------
Select Case SettingB
Case "5"
call xbqq_OnlyPage(SortName,Info)
Case "4"
call sortpage()
Case "3"
call pages()
Case else
Call Mainsort()
End Select
'主程序-----------------
%>
</TD>
</TR></TBODY></TABLE>
</BODY></HTML>
<%
sub Mainsort()
Dim SortID
dim sqlsort
dim RsSort
SortID=CheckStr(Request.QueryString("SortID"))
If isInt(SortID)=False OR Not IsNumeric(SortID) Then
Response.Redirect "index.asp"
Response.End()
End If
sqlsort="select * from Sort where B_id<>0 and setting < 4 and B_ID="&SortID&" order by S_order"
Set RsSort=conn.execute (sqlsort)
if RsSort.eof and RsSort.bof then
response.write "<div align=center>還沒有任何欄目...</div>"
else
settingc=RsSort("setting")
if SettingB=1 then
'顯示圖文------
%>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="580" height="28" background="xbqq_img/kind1.gif">
<tr>
<TD width="100%" height="20" style='FILTER: PADDING-TOP: 2px'>
<img border="0" src="xbqq_img/ico1.gif" width="11" height="9"> <span style="letter-spacing: 3px"><font color="#FFFFFF">推薦圖文信息</font></span></TD>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="550" height="5">
<tr>
<td></td>
</tr>
</table>
</div>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<TD>
<TABLE style="border: 1px solid #2C87E9" bgcolor="#FFFFFF" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD colspan="2"> <TABLE cellSpacing=5 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR vAlign=top>
<%
set Rstop=server.createobject("adodb.recordset")
sql="select top 3 * from Info where Ispic=1 and Sort1="&SortID&" and Pw_Good=True ORDER BY id DESC"
Rstop.open sql,conn,1,1
if Rstop.eof or Rstop.bof then
Call NoPic("無推薦圖文信息")
end if
do while not Rstop.eof
%>
<TD height=131 align=middle>
<% Call Gaobei_ShowPic(Rstop("Pic"),Rstop(0),Rstop("Title"),16) %>
</TD>
<%
Rstop.movenext
loop
%>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<%
end if
'顯示圖文完 開始列分類 ----------
do while not RsSort.eof
%>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="80" height="5">
<tr>
<td></td>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="580" height="20">
<tr>
<TD width="100%" height="20">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="580" height="28" id="table1" background="xbqq_img/kind1.gif">
<tr>
<td width="470" style='FILTER: PADDING-TOP: 2px'> <img border="0" src="xbqq_img/ico1.gif" width="11" height="9"> <span style="letter-spacing: 3px"><%=RsSort(1)%></span></td>
<td width="57" valign="bottom">
<p align="right">
<a href="Class.asp?ClassID=<%=RsSort(0)%>">
MORE...</a></td>
<td width="23"> </td>
</tr>
</table>
</div>
</TD>
</tr>
</table>
</div>
<% if RsSort("setting")=3 then%>
<TABLE style="border: 1px solid #2C87E9" bgcolor="#FFFFFF" cellSpacing=5 cellPadding=5 width="100%" align=center border=0>
<TBODY>
<TR>
<TD height=74 Valign="top"><%=RsSort("Info")%></TD>
</TR>
</TBODY>
</TABLE>
<% end if %>
<% if RsSort("setting")<>3 then%>
<table style="border: 1px solid #2C87E9" bgcolor="#FFFFFF" width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td width="35%" height="106">
<%
set RsPic=server.createobject("adodb.recordset")
sql="select top 1 * from Info where Sort2="&RsSort("id")&" and Ispic=1 ORDER BY id DESC"
RsPic.open sql,conn,1,1
if RsPic.eof or RsPic.bof then
Call NoPic("本類暫無圖文信息")
end if
do while not RsPic.eof
Call Gaobei_ShowPic(RsPic("Pic"),RsPic(0),RsPic("Title"),16)
RsPic.movenext
loop
RsPic.CLOSE
SET RsPic=Nothing
%>
</td>
<td width="65%" valign="top">
<% Call xbqq_ShowInfo(6,6,35,RsSort("id"),1) %>
</td>
</tr>
</table>
<%end if%>
<%
RsSort.movenext
loop
end if
RsSort.close
%>
</TD>
</TR>
<TR>
<TD></TD>
</TR>
</TBODY>
</TABLE>
<%
end sub
'列分類完---------
%>
<%
'大類只有一級分類時 Setting=3-----------------
sub pages()
%>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="580" height="28" background="xbqq_img/kind1.gif">
<tr>
<TD width="100%" height="20" style='FILTER: PADDING-TOP: 2px'> <img border="0" src="xbqq_img/ico1.gif" width="11" height="9"> <span style="letter-spacing: 3px"><%=SortName%></span></TD>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="550" height="5">
<tr>
<td></td>
</tr>
</table>
</div>
<table style="border: 1px solid #2C87E9" bgcolor="#FFFFFF" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="15" colspan="2"></td>
</tr>
<tr>
<td width="35%" valign="top">
<%
set RsPic=server.createobject("adodb.recordset")
sql="select top 3 * from Info where Sort1="&SortID&" and Ispic=1 ORDER BY id DESC"
RsPic.open sql,conn,1,1
if RsPic.eof or RsPic.bof then
Call NoPic("暫無圖文信息")
end if
do while not RsPic.eof
Call Gaobei_ShowPic(RsPic("Pic"),RsPic(0),RsPic("Title"),16)
RsPic.movenext
loop
%>
</td>
<td width="65%" valign="top">
<%
sql="select * from info where Sort1="&SortID&" ORDER BY ADDdate desc,id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage
If trim(Request("Page"))<>"" and IsNumeric(Request("Page")) then
CurrentPage= CLng(request("Page"))
If CurrentPage< 1 then
CurrentPage= 1
ElseIf CurrentPage> rs.PageCount then
CurrentPage = rs.PageCount
End If
Else
CurrentPage= 1
End If
if rs.eof then
response.write "<p align='center'>還沒有添加信息...</p>"
else
totalPut=rs.recordcount '記錄總數
if CurrentPage=1 then
showContent
showpages
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move(currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark '移動到開始顯示的記錄位置
showpages
showContent
else
currentPage=1
showContent
end if
end if
rs.close
end if
set rs=nothing
set conn=nothing
%>
</td>
</tr>
</table>
<% end sub %>
<%
'大類多欄內容顯示 Setting=3 -------------
sub showContent
%>
<TABLE width="100%" align="center" cellspacing="2">
<%
dim i
i=0
do while not (rs.eof or err)
%>
<tr>
<td width="27" height="20"><div align="right"><img src="images/xbqq_skin/Gaobei_ico.gif" width="12" height="11" align="absmiddle"></div></td>
<td width="342" height="20"><div align="left"><a href="ViewInfo.asp?id=<%response.write rs(0)%>" title="<%=rs("title")%>">
<% if Getlen(rs("title"))>40 then%>
<%=LeftStr(rs("title"),38)%>...
<%else%>
<%response.write rs("title")%>
<%end if%>
</a><%=rs("date")%> </div></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</TABLE>
<hr width="90%">
<%end sub%>
<%
'大類為一級時分頁 Setting=3--------------------
sub showpages()
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="34"> <div align="center">
<%
dim n,k
if (totalPut mod MaxPerPage)=0 then
n= totalPut \ MaxPerPage
else
n= totalPut \ MaxPerPage + 1
end if
%>
共有<%=rs.recordcount%>個記錄
每頁<%=Page_count%>個記錄
<%
k=currentPage
if k=1 then
response.write " 首頁 "& vbCrLf
response.write " 上一頁 "& vbCrLf
end if
if k<>1 then
response.write "<a href='Sort.asp?SortID="& SortID &"&page=1'> 首頁 </a>"
response.write "<a href='Sort.asp?SortID="& SortID &"&page="+cstr(k-1)+"'> 上一頁 </a>"
end if
if k=n then
response.write " 下一頁 "& vbCrLf
response.write " 末頁 "& vbCrLf
end if
if k<>n then
response.write "<a href='Sort.asp?SortID="& SortID &"&page="+cstr(k+1)+"'> 下一頁 </a>"
response.write "<a href='Sort.asp?SortID="& SortID &"&page="+cstr(n)+"'> 末頁 </a>"
end if
end sub
%>
</div></td>
</tr>
</table>
<!-- 主要內容結束-->
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<!--#include file="xbqq_foot.asp" -->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -