📄 imagelist.asp
字号:
<%PageName="ImageList"%>
<!--#include file="conn.asp" -->
<!--#include file="const.asp"-->
<!--#include file="function.asp" -->
<!--#include file="INC/CHAR.INC"-->
<%
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
request_BigClassName=Request("BigClassName")
if request_BigClassName<>"" then
IfClass=" BigClassName='" & request_BigClassName &"' and "
ifclasspage="BigClassName="& request_BigClassName &"&"
else
ifclass=""
end if
function bigclasslist
set rs=conn.execute("select * from bigclass order by bigclassid")
do while not rs.eof
if rs("bigclassname")=request_BigClassName then
response.write "<font color='#ff0000'>"&rs("bigclassname")&"</font> "
else
response.write "<a href='ImageList.asp?bigclassname="&rs("bigclassname")&" '>"&rs("bigclassname")&"</a> "
end if
rs.movenext
loop
rs.close
end function
%>
<!--#include file="top2.asp"-->
<table border="0" width="<%=TableWidth%>" cellspacing="0" cellpadding="0" bgcolor="<%=MainBgcolor%>">
<tr>
<%=OutTable("left")%>
<td valign="top" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" align="center" background="<%=CenterTImg%>"> 分类图片:<%=bigclasslist%> </td>
</tr>
<%=InTable("bottoml")%>
</table>
<%
sql="select NewsID,model,Title,Content,UpdateTime,Image,BigClassName,SmallClassName,SpecialName from News where "&ifclass& ifand&" image>0 and checked=1 order by NewsID DESC"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<br><br><p align='center'><b>本 类 尚 无 图 片 文 章</b></p><br>"
else
MaxPerPage=10 '设置每页显示条数
PageUrl="ImageList.asp"
totalPut=rs.recordcount
if currentpage<1 then currentpage=1
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
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
else
currentPage=1
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
end if
end if
end if
rs.close
sub showContent
%>
<table width="100%" border="0" cellspacing="8" cellpadding="0">
<tr>
<td bgcolor="#666666">
<table border="0" width="100%" cellspacing="1" cellpadding="5">
<%
i=0
do while not rs.eof
i=i+1
Content=htmlencode1(rs("Content"))
Content=replace(Content,"<" ,"<!--")
Content=replace(Content,">" ,"-->")
Content=replace(Content,"[[" ,"<!--")
Content=replace(Content,"]]" ,"-->")
imgheight=""
%>
<tr>
<td width=14 align=center style="WORD-WRAP: break-word;" valign="middle" class=top4 bgcolor=<%=Out2Color%>>图<br>
片<br>
数<br>
<%=rs("image")%> </td>
<td width=140 align=center style="WORD-WRAP: break-word;" bgcolor="<%=MainCColor%>"><%=imagefile(rs("NewsID"),1,120,0)%><br>
<%=rs("title")%> </td>
<td bgcolor="<%=MainCColor%>" valign="top"> <%=trim(mid(Content,1,280))%>……<br>
<font color="<%=AlertFColor%>">(发表时间:<%=rs("updatetime")%>)</font><a href="<%=NewsUrl%>" target=_blank>[详细内容]</a>
</td>
</tr>
<%
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
</td>
</tr>
</table>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
%>
<form method=Post action="<%=filename%>">
共<font color="<%=AlertFColor%>"><b> <%=totalnumber%> </b></font>条图片文章
<%if CurrentPage<2 then%>
首页 上一页
<%else%>
<a href="<%=filename%>?<%=ifclasspage%>page=1">首页</a> <a href="<%=filename%>?<%=ifclasspage%>page=<%=CurrentPage-1%>">上一页</a>
<%
end if
if n-currentpage<1 then
%>
下一页 末页
<%else%>
<a href="<%=filename%>?<%=ifclasspage%>page=<%=CurrentPage+1%>">下一页</a> <a href="<%=filename%>?<%=ifclasspage%>page=<%=n%>">末页</a>
<%end if%>
页次:<strong><font color="<%=AlertFColor%>"><%=CurrentPage%>/<%=n%></font></strong>页 转到:
<select name="page" size="1" onChange="javascript:submit()">
<%for i = 1 to n%>
<option value="<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>
<%next%>
</select>
</form>
<%end function%>
</td>
<%=OutTable("right")%>
</tr>
</table>
<%set rs=nothing%>
<!--#include file="copyright.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -