<!--#include file="conn.asp"-->
<!--#include file="head.asp"-->
<table width="497" border="0" cellpadding="0" cellspacing="0" height="205">
  <tr class="font"> 
    <td width="514" valign="top" bgcolor="#FFFFFF"> <table border=0 cellpadding=0 cellspacing=0 width=92%>
        <tbody>
          <tr> 
            <td width=8%><img height=38 
                  src="images/old/fee_title01_r1_c1.gif" width=46></td>
            <td background=images/old/fee_title01_r1_c2.gif width="20%"> <div align=left><font color=#3453af>最新图片</font></div></td>
            <td background=images/old/fee_title01_r1_c3.gif width="72%"> <div align=right> 
                <font color=#666699> </font></div></td>
          </tr>
        </tbody>
      </table>
      <table border=0 cellpadding=0 cellspacing=0 width=465 height="74">
        <tbody>
          <tr> 
            <%
Set rs=Server.CreateObject("ADODB.RecordSet")
'判断classid开始
classid=request("classid")
If classid <> "" then
classid = cint(classid)
if err.number <> 0 then 
err.clear
classid = 1
end if
if classid < 1 then 
classid = 1
end if 
else
classid = 1
End if
'判断classid结束
if Request("classid")<>"" then
sql="Select * from pic where picclass=" & classid & " order by id Desc"
else
sql="Select * from pic order by id Desc"
end if


rs.open sql,conn,1,1
rs.pagesize=pages  '每页显示数目
num=rs.recordcount
pagenum=rs.pagecount
page=request("page")

if rs.eof and rs.bof then
response.Write("此分类没有图片")
else

'判断页码开始
If page <> "" then
page = cint(page)
if err.number <> 0 then 
err.clear
page = 1
end if
if page < 1 then 
page = 1
end if 

else
page = 1
End if
if page*rs.pagesize > num and not((page-1)*rs.pagesize < num)then 
page=1
end if
'判断页码结束

rs.absolutepage = page 'absolutepage：设置指针指向某页开头
if page<>pagenum then
for i=1 to rs.pagesize
%>
            <td valign=top width=577> <table align=right border=0 cellpadding=0 cellspacing=0 width=521>
                <tbody>
                  <tr> 
                    <td valign=top width=565> <table border=0 cellpadding=0 cellspacing=0 width=546>
                        <tbody>
                          <tr> 
                            <td colspan=2><img height=17 
                  src="images/main/2j-1.gif" width=546></td>
                          </tr>
                          <tr valign=top> 
                            <td width=22><img height=75 
                  src="images/main/2j-2.gif" width=22></td>
                            <td background=images/main/2j-3.gif width=523> <table border=0 cellpadding=0 cellspacing=0 width=523>
                                <tbody>
                                  <tr> 
                                    <td valign=top width=113><a target=_blank href="picshow.asp?id=<%=rs("id")%>"><img border=0 src="<%=p%><%=rs("picaddress")%>" 
                      width=104 height=74></a></td>
                                    <td valign=top width=410> <table border=0 cellpadding=0 cellspacing=0 width=400>
                                        <tbody>
                                          <tr> 
                                            <td height=20 width=159><font 
                              color=#db3d6b>名称：《</font><font color=#999999><font color="#333333"><a href="#" onClick="MM_openBrWindow('swfPlay.asp?id=<%=rs("id")%>','flash','width=537,height=500')"><%=rs("picname")%></a></font></font><font 
                              color=#db3d6b>》</font></td>
                                            <td height=20 width=124><font 
                              color=#db3d6b>点击率：</font><font color=#999999><font color=#999999><font color=#999999><font 
                        color=#336699><%=rs("pichits")%></font></font></font></font></td>
                                            <td height=20 width=117><font 
                              color=#db3d6b>类别： 
                                              <%sql="select id,class_name from class where id="&rs("picclass")
		  set rs1=conn.execute(sql)%>
                                              <a target=_blank href="index.asp?classid=<%=rs1("id")%>"><%=rs1("class_name")%></a> 
                                              <%rs1.close
		  set rs1=nothing%>
                                              </font></td>
                                          </tr>
                                          <tr> 
                                            <td height=20 width=159><font 
                              color=#db3d6b>大小：</font><font color=#999999><font color=#999999><font 
                        color=#336699><%=rs("tuda")%></font></font></font><font 
                              color=#db3d6b>k</font></td>
                                            <td height=20 width=124><font 
                              color=#db3d6b>上传时间：</font><font color=#999999><font color=#999999><font 
                        color=#336699><%=rs("pictime")%></font></font></font></td>
                                            <td height=20 width=117><font color=#999999><font color=#999999><font 
                              color=#db3d6b>作者：</font><font color=#999999><font color="#333333"><a href="#" onClick="MM_openBrWindow('picshow.asp?id=<%=rs("id")%>','flash','width=537,height=500')"><%=rs("piczuozhe")%></a></font></font></font></font></td>
                                          </tr>
                                          <tr> 
                                            <td colspan=3 height=20><font 
                              color=#db3d6b>简介：</font><font color=#999999><font color=#999999><font 
                        color=#336699>：
                                              <%if len(rs("picshuo"))>22 then%>
                                              <%=left(rs("picshuo"),22)%>...
                                              <%else%>
                                              <%=rs("picshuo")%>
                                              <%end if%>
                                              </font></font></font></td>
                                          </tr>
                                        </tbody>
                                      </table></td>
                                  </tr>
                                </tbody>
                              </table></td>
                          </tr>
                          <tr> 
                            <td colspan=2><img height=15 
                  src="images/main/2j-4.gif" 
              width=546></td>
                          </tr>
                        </tbody>
                      </table></td>
                  </tr>
                  <tr> 
                    <td colspan=2 height="6"> <div align=right><font color=#db3d6b> 
                        </font></div></td>
                  </tr>
                </tbody>
              </table></td>
            <td background=images/old/line-s2.gif 
      width=1>&nbsp;</td>
          </tr>
          <tr> </tr>
          <%
rs.movenext
next
else
for i=1 to num-(page-1)*rs.pagesize
%>
          <tr> 
            <td valign=top width="565"> <table border=0 cellpadding=0 cellspacing=0 width=546 align="right">
                <tbody>
                  <tr> 
                    <td colspan=2><img height=17 
                  src="images/main/2j-1.gif" width=546></td>
                  </tr>
                  <tr valign=top> 
                    <td width=22><img height=75 
                  src="images/main/2j-2.gif" width=22></td>
                    <td background=images/main/2j-3.gif width=523> <table border=0 cellpadding=0 cellspacing=0 width=523>
                        <tbody>
                          <tr> 
                            <td valign=top width=113><a target=_blank href="picshow.asp?id=<%=rs("id")%>"><img border=0 src="<%=p%><%=rs("picaddress")%>" 
                      width=104 height=74></a></td>
                            <td valign=top width=410> <table border=0 cellpadding=0 cellspacing=0 width=400>
                                <tbody>
                                  <tr> 
                                    <td height=20 width=159><font 
                              color=#db3d6b>名称：《</font><font color=#999999><font color="#333333"> 
                                      <%=rs("picname")%> </font></font><font 
                              color=#db3d6b>》</font></td>
                                    <td height=20 width=124><font 
                              color=#db3d6b>点击率：</font><font color=#999999><font color=#999999><font color=#999999><font 
                        color=#336699><%=rs("pichits")%></font></font></font></font></td>
                                    <td height=20 width=117><font 
                              color=#db3d6b>类别： 
                                      <%sql="select id,class_name from class where id="&rs("picclass")
		  set rs1=conn.execute(sql)%>
                                      <a target=_blank href="index.asp?classid=<%=rs1("id")%>"><%=rs1("class_name")%></a> 
                                      <%rs1.close
		  set rs1=nothing%>
                                      </font></td>
                                  </tr>
                                  <tr> 
                                    <td height=20 width=159><font 
                              color=#db3d6b>大小：</font><font color=#999999><font color=#999999><font 
                        color=#336699><%=rs("tuda")%></font></font></font><font 
                              color=#db3d6b>k</font></td>
                                    <td height=20 width=124><font 
                              color=#db3d6b>上传时间：</font><font color=#999999><font color=#999999><font 
                        color=#336699><%=rs("pictime")%></font></font></font></td>
                                    <td height=20 width=117><font color=#999999><font color=#999999><font 
                              color=#db3d6b>作者：</font><font color=#999999><font color="#333333"> 
                                      <%=rs("piczuozhe")%> </font></font></font></font></td>
                                  </tr>
                                  <tr> 
                                    <td colspan=3 height=20><font 
                              color=#db3d6b>简介：</font><font color=#999999><font color=#999999><font 
                        color=#336699>
                                      <%if len(rs("picshuo"))>22 then%>
                                      <%=left(rs("picshuo"),22)%>...
                                      <%else%>
                                      <%=rs("picshuo")%>
                                      <%end if%>
                                      </font></font></font></td>
                                  </tr>
                                </tbody>
                              </table></td>
                          </tr>
                        </tbody>
                      </table></td>
                  </tr>
                  <tr> 
                    <td colspan=2><img height=15 
                  src="images/main/2j-4.gif" 
              width=546></td>
                  </tr>
                </tbody>
              </table></td>
          </tr>
          <%
rs.movenext
next
end if
end if
rs.close
Set rs=nothing
%>
        </tbody>
      </table></td>
    <td background=images/old/line-s2.gif width="51">&nbsp;</td>
  </tr>
  <tr> 
    <td valign=top width="514"> <table border=0 cellpadding=0 cellspacing=0 width=540 bgcolor="#FFFFFF">
        <tbody>
          <tr> 
            <td width=1>&nbsp; </td>
            <td background=images/old/line-h.gif> <table width="94%" border="0" align="center" cellpadding="0" cellspacing="0" height="19" bgcolor="#FFFFFF">
                <tr> 
                  <td> <div align="center" class="font"><font color="#333333">共有 
                      <%=num%> 个图片 | <a href=index.asp?page=1&classid=<%=request("classid")%>>首页</a> 
                      | 
                      <%if page>1 then%>
                      <a href=index.asp?page=<%=page-1%>&classid=<%=request("classid")%>> 
                      <%end if%>
                      上一页</a> | 
                      <%if page<pagenum then%>
                      <a href=index.asp?page=<%=page+1%>&classid=<%=request("classid")%>> 
                      <%end if%>
                      下一页</a> | <a href=index.asp?page=<%if pagenum=0 then%>1<%else%><%=pagenum%><%end if%>&classid=<%=request("classid")%>>尾页</a> 
                      | 页次：<%=page%>/<%=pagenum%>页 | 共<%=pagenum%>页</font></div></td>
                </tr>
              </table></td>
          </tr>
        </tbody>
      </table></td>
    <td background=images/old/line-s2.gif width="51">&nbsp;</td>
  </tr>
</table>
</body>
</html>
