<%@ Language=VBScript%>
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="function.asp"-->
<!--#include file="char.inc"-->
<%
request_EC_ArticleID=Request.QueryString("EC_ArticleID")
PageShowSize = 10            '每页显示多少个页
MyPageSize   = 24           '每页显示多少条新闻

If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
MyPage=1
Else
MyPage=Int(Abs(Request("page")))
End if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>图片新闻__<%=eChSys_Com%></title>
<LINK href="CSS/Wygkcn_Home.css" rel="stylesheet">
<LINK href="CSS/Wygkcn_News.css" rel="stylesheet">
</head>
<body>
<!--内容部分开始-->
<div id="EC_Content">
<!--#include file="Top.asp"-->
<!--位置导航部分开始-->
<div class="position">
<img src="Images/lm_dot.gif" width="11" height="11">&nbsp;&nbsp;您的位置&nbsp;&nbsp;<a href="./" >首页</a> >> 图片新闻 >>列表
</div>
<!--位置导航部分结束-->
<div class="class_list1">
<ul>
<%
set rs3=server.CreateObject("ADODB.RecordSet")
if uselevel=1 then
if Request.cookies(echsys)("key")="super" or Request.cookies(echsys)("key")="typemaster" or Request.cookies(echsys)("key")="bigmaster" or Request.cookies(echsys)("key")="smallmaster" or Request.cookies(echsys)("key")="check" then
rs3.Source ="select * from "& db_wygkcn_Article_Table &" where picnews=1 and Checked=1  and picname is not null order by EC_ArticleID DESC"
end if
if Request.cookies(echsys)("key")="" then
rs3.Source ="select * from "& db_wygkcn_Article_Table &" where picnews=1 and Checked=1   and picname is not null order by EC_ArticleID DESC"
end if
if Request.cookies(echsys)("key")="selfreg" then
if Request.cookies(echsys)("reglevel")=3 then
rs3.Source ="select * from "& db_wygkcn_Article_Table &" where picnews=1 and Checked=1   and picname is not null order by EC_ArticleID DESC"
end if
if Request.cookies(echsys)("reglevel")=2 then
rs3.Source ="select * from "& db_wygkcn_Article_Table &" where picnews=1 and Checked=1   and picname is not null order by EC_ArticleID DESC"
end if
if Request.cookies(echsys)("reglevel")=1 then
rs3.Source ="select * from "& db_wygkcn_Article_Table &" where picnews=1 and Checked=1   and picname is not null order by EC_ArticleID DESC"
end if
end if
else
rs3.Source ="select * from "& db_wygkcn_Article_Table &" where picnews=1 and Checked=1  and picname is not null order by EC_ArticleID DESC"
end if
rs3.Open rs3.Source,conn,1,1

if not rs3.EOF then
Rs3.PageSize     = MyPageSize
MaxPages         = Rs3.PageCount
Rs3.absolutepage = MyPage
total            = Rs3.RecordCount
i = 0
%>


<%
fileExt=lcase(getFileExtName(rs3("picname")))
Content=htmlencode4(rs3("Content"))
%>
<% do until rs3.Eof or i = rs3.PageSize %>
<% if not rs3.EOF then %>
<% content=htmlencode4(rs3("Content"))
content=replace(content,"[---分页---]","")%>
<li class=class_pic_list>
<div class="piclist" onMouseOver="this.className='piclist piclist_Hover'" onMouseOut="this.className='piclist'" >
<a href="wygkcn_ShowArticle.asp?EC_ArticleID=<%=rs3("EC_ArticleID")%>" target=_blank title="<%=CutStr(nohtml(Content),150)%>...">
                                <%if   rs3("picname")=("") then%>
                                <img  src="IMAGES/flashorno.gif" width="110" height="80" border="0" align="top">
                                <%else%>
                                <%if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then%>
                                <img  src="<%=FileUploadPath & rs3("picname")%>" width="110" height="80"  border="0" align="top">
                                <%end if%>
                                <%if fileext="swf" then%>
                                <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'  codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width="110" height="80" border="0" >
                                  <param name=movie value="<%=FileUploadPath & rs3("picname")%>">
                                  <param name=quality value=high>
                                  <param name='Play' value='-1'>
                                  <param name='Loop' value='0'>
                                  <param name='Menu' value='-1'>
                                  <embed src="<%=FileUploadPath & rs3("picname")%>" width="110" height="80" border=0  pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'></embed>
                                </object>
                                <%end if%>
                                <%end if%>
                              </a>
</div>
<div class=piclist_title>
<a href="wygkcn_ShowArticle.asp?EC_ArticleID=<%=rs3("EC_ArticleID")%>" target=_blank title="<%=htmlencode4(rs3("title"))%>"> <%=CutStr(htmlencode4(rs3("title")),16)%> </a>
</div>
</li>
<%
rs3.movenext
i = i + 1
end if
loop
%>
<li class="pages_menu my_pages">
共 <%=total%> 条，当前第 <%=Mypage%>/<%=Maxpages%> 页，每页 <%=MyPageSize%> 条
<%
url="wygkcn_PhotoNews.asp?"& "&EC_ArticleID=" & request_EC_ArticleID										
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((total-1)/rs3.PageSize)+1

if PageNextSize >1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "<a href='" & Url & "&page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
Response.write "<a href='" & Url & "&page=1' title='第1页'>页首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a href='" & Url & "&page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
end if

if Maxpages>=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
Else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
End if
If PageSizeShow < 1 Then PageSizeShow = 1
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
if PageLink <> MyPage Then
Response.write "<a href='" & Url & "&page=" & PageLink & "'>[" & PageLink & "]</a> "
else
Response.Write "<B>["& PageLink &"]</B> "
end if
If PageLink = MaxPages Then Exit for
Next

if Mypage+1 <=Pagetpage  then
Next_Page = MyPage + 1
Response.write "<a href='" & Url & "&page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
end if

if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A href='" & Url & "&page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
Response.write " <a href='" & Url & "&page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
End if
else
Response.write "·本类暂无信息"
				
End If
Rs3.close
set rs3=nothing
%>
</li>
</ul>
</div>


<!--#include file="bottom.asp" -->
</div>
<!--内容部分结束-->
</body>
</html>
