这个页面的完整代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="conn.asp"-->
<!--#include file="Inc/Config.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%
ClassId=Request.QueryString("ClassId")
If ClassId="" Then
' Rs.OPen "Select * From TbNews WHere Sort in (Select top 1 id from TbNewsSort where Pid=2 ORder by id desc ) ORder by SerialNum desc",conn,1,1
Rs.Open "Select * From TbNews Where Sort=8 Order by SerialNum desc",Conn,1,1
Else
Rs.Open "Select * From TbNews Where Sort="&Cint(ClassId)&" Order by SerialNum desc",Conn,1,1
End if
%>
<link rel="stylesheet" type="text/css" href="Css/Main.css" />
<link rel="stylesheet" type="text/css" href="Css/Style.css" />
<title>作品展示_<%=Sitename%></title>
<script src="Comm.js"></script>
</head>
<body class="Body-Extend">
<!--#include file="head.asp"-->
<div style="width:100%; background:url(Images/fbg.jpg) repeat #FFF;">
<table cellpadding="0" cellspacing="0" width="991" align="center" style="width:991px; background:url(Images/centerline.gif) repeat #FFF;">
<tr>
<td valign="top" align="right">
<table cellpadding="0" cellspacing="0" border="0" style="margin:10px 30px 0 30px;">
<tr>
<%Call ShowLeftMenu()%>
</tr>
</table>
</td>
</tr>
<tr><td height="5"> </td></tr>
<tr>
<td style="width:991px; background:url(Images/centerline.gif) repeat;" height="400" valign="top" align="left">
<table cellpadding="0" cellspacing="0" border="0" width="905" style="margin:25px 0 0 43px;">
<tr>
<td valign="top" align="left">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td class="title1">作品展示</td></tr>
<tr><td class="title2">Photo Show</td></tr>
</table>
</td>
<td valign="top" align="right">
<table cellpadding="0" cellspacing="0" border="0" style="margin:20px 0 5px 0px;">
<tr>
<td><img src="Images/weizhi.jpg" width="44" height="17" border="0"></td>
<td> <a href="Index.asp">首页</a> > 作品展示 > <%Call ShowPlace()%></td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="2"><img src="Images/line2.jpg" width="905" height="3" border="0"></td></tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="905" style="margin:10px 0 0 45px;">
<tr>
<td valign="top" align="left">
<table cellpadding="0" cellspacing="0" border="0" width="900">
<tr><td style="line-height:200%;"><table cellpadding="0" align="center" cellspacing="0" border="0" width="900">
<tr><td height="10" colspan="3"></td></tr>
<%if Rs.EOf then%>
<tr><td colspan="5">暂无内容...</td></tr>
<%Else%>
<%
rs.pagesize=15
'实现分页
if rs.Eof then
rs_total = 0
else
rs_total = rs.RecordCount
end if
dim pageno
getpageno = (Request("pageno"))
if(getpageno = "")then
pageno = 1
else
pageno = getpageno
End if
if(not rs.Eof)then
rs.AbsolutePage = pageno
%>
<tr>
<%
repeat_rows = 0
do while (repeat_rows < rs.PageSize and not rs.eof)%>
<%
Dim i
If ((i mod 5)=0) then
%>
</tr><tr>
<%End if%>
<td class="ppbg" valign="top">
<table cellpadding="0" cellspacing="0" border="0" style="margin-left:10px; margin-top:10px;">
<tr><td>
<div style=" border:0px solid #CCC; padding:0px;">
<a href="Works_Show.asp?ClassId=<%=Rs("Sort")%>&id=<%=Rs("id")%>"><img src="<%=Rs("CoverPic")%>" width="160" height="160" border="0"></a>
</div>
</td></tr>
<tr><td height="10"></td></tr>
<tr><td align="center" height="25">
<%=Rs("title")%></td></tr>
</table>
</td>
<%
repeat_rows=repeat_rows + 1
i=i+1
Rs.MOvenext
Loop
%>
</tr>
<tr><td colspan="6" align="right"><div align="right" class="style4">
[<%=pageno%>/<%=rs.PageCount%>] 每页<%=rs.PageSize%>条 共<%=rs_total%>条记录
<%
if(pageno <> 1)then
%>
<a href="?ParentId=<%=Request("Parentid")%>&ClassId=<%=Request("ClassId")%>">第一页</a>
<%
End if
if(pageno <> 1)then
%>
<a href="?ParentId=<%=Request("Parentid")%>&ClassId=<%=Request("ClassId")%>&pageno=<%=(pageno-1)%>">上一页</a>
<%
end if
if(instr(pageno,cstr(rs.pagecount)) = 0)then
%>
<a href="?ParentId=<%=Request("Parentid")%>&ClassId=<%=Request("ClassId")%>&pageno=<%=(pageno+1)%>">下一页</a>
<%
end if
if(instr(pageno,cstr(rs.pagecount)) = 0)then
%>
<a href="?ParentId=<%=Request("Parentid")%>&ClassId=<%=Request("ClassId")%>&pageno=<%=rs.pagecount%>">最后一页</a>
<%
end if
rs.close
Set rs = Nothing
end if
%>
</div></td></tr>
<%End if%>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!--#include file="foot.asp"-->
</body>
</html>
<%
Sub ShowLeftMenu()
dim rs,ClassId
ClassId=Request("ClassId")
if ClassId="" then
ClassId=8
End if
set rs=Server.CreateObject("adodb.recordset")
rs.open "select * from tbNewsSort where pid=2 ORder by SerialNum asc",Conn,1,1
if not rs.eof then
do while not rs.eof
if rs("id")=Cint(ClassId) then
response.Write("<td class=""tab1"" align=""center"">")
else
response.Write("<td class=""tab2"" align=""center"">")
end if
'response.Write("<div style=""margin-left:10px;"">")
response.Write("<a href='Works.asp?ClassId="&rs("id")&"'>")
'response.Write("·")
response.Write(rs("SortName"))
response.Write("</a>")
response.Write("</td>")
'response.Write("</div></td></tr>") & vbcrlf
rs.movenext
loop
end if
End Sub
Sub ShowPlace()
Dim Rs,ClassId
ClassId=Request.QueryString("ClassId")
Set Rs=Server.CreateObject("Adodb.Recordset")
if ClassId="" then
Response.Write("所有作品")
ELse
Rs.open "Select * from tbNewsSort WHere id="&Cint(ClassID)&" ",Conn,1,1
If Not Rs.Eof then
Response.Write(Rs("SortName"))
ENd if
End If
End Sub
%>