花与生活快速导航 |
|
频道热文排行 |
<%
set rs=server.createobject("adodb.recordset")
rs.open "select top 16 title,selectpic,dateandtime,newsid from article where shenghe=1 and zznews<>'' order by hits desc",conn,1,3
i=1
do while not rs.eof and i<=16
i=i+1
title=rs("title")
title=left(title,15)
date=rs("dateandtime")
%>
· |
class="mouse1"><%=title%>
<%
syfl=""
if rs("selectpic") = 1 then
syfl=syfl & "[图]"
response.write syfl
end if %>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
| |
|
<%
typeid=request.querystring("typeid")
ntype=request.querystring("ntype")
ntypeid=request.querystring("ntypeid")
session("typeid")=typeid
session("ntype")=ntype
session("ntypeid")=ntypeid
%>
|
当前位置: 首页 > 文章库 > <%=ntype%> |
<%'开始分页
Const MaxPerPage=20
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(request("page")) then
currentPage=Cint(request("page"))
else
currentPage=1
end if
' typeid=session("typeid")
' ntypeid=session("ntypeid")
' ntype=session("ntype")
set rs=server.createobject("adodb.recordset")
'if ntypeid="" then '蛋糕知识 2个栏目合并
'rs.open "select * from article where typeid="&typeid&" order by dateandtime desc",conn,1,3
'else
'rs.open "select * from article where typeid="&typeid&" and ntypeid="&ntypeid&" order by dateandtime desc",conn,1,3
'end if
'rs.open "select title,selectpic,dateandtime,newsid from article where shenghe=1 order by dateandtime desc",conn,1,3
rs.open "select * from article where shenghe=1 order by dateandtime desc",conn,1,3
if rs.eof And rs.bof then
Response.Write "
内容建设中,请稍候访问! "
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"list_monther_day.asp"
else
if (currentPage-1)*MaxPerPage
<%do while not rs.eof%>
· class="b3"><%=trim(rs("title"))%>
<%
syfl=""
if rs("selectpic") = 1 then
syfl=syfl & "[图文]"
response.write syfl
end if %> |
关注<%=rs("hits")%> |
<%i=i+1
if i>=MaxPerPage then Exit Do
rs.movenext
loop
rs.close
set rs=nothing%>
<%
End Sub
Function showpage(totalnumber,maxperpage,filename)
Dim n
typeid=session("typeid")
ntypeid=session("ntypeid")
ntype=session("ntype")
If totalnumber Mod maxperpage=0 Then
n= totalnumber \ maxperpage
Else
n= totalnumber \ maxperpage+1
End If
Response.Write ""
End Function
%>
|
|
|
|
内容搜索 |
|
相关内容连接(Google) |
|
|