<%@ Language=VBScript%>
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="function.asp"-->
<!--#include file="char.inc"-->
<%
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from "& db_wygkcn_Type_Table &" order by E_typeorder"
rs.Open rs.Source,conn,1,1

dim ArrayE_typeid(10000),ArrayE_typename(10000),Arraytypecontent(10000)
typeCount=rs.RecordCount
for i=1 to typeCount
ArrayE_typeid(i)=rs("E_typeid")
ArrayE_typename(i)=rs("E_typename")
Arraytypecontent(i)=rs("typecontent")
rs.MoveNext
next
rs.Close
PageShowSize = 10            '每页显示多少个页
MyPageSize   = 20           '每页显示多少条新闻
	
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">
<noscript><iframe scr="*"></iframe></noscript>
</head>
<body>
<!--内容部分开始-->
<div id="EC_Content">
<!--#include file="Top.asp"-->
<!--中间内容部分开始-->
<div id="zl_center">
<!--左边部分开始-->
<div class="zl_left float_left">
<div class="new_art lianmu_bg">
<H3>热门文章排行</H3>
<DIV class=new_art_list>
<ul class=list>
<%
set rs=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
rs.Source="select top "& top_txt &" * from "& db_wygkcn_Article_Table &" where  Checked=1 order by click DESC,EC_ArticleID desc"
end if
if Request.cookies(echsys)("key")="" then
rs.Source="select top "& top_txt &" * from "& db_wygkcn_Article_Table &" where (Checked=1 and newslevel=0) order by click DESC,EC_ArticleID desc"
end if
if Request.cookies(echsys)("key")="selfreg" then
	if Request.cookies(echsys)("reglevel")=3 then
rs.Source="select top "& top_txt &" * from "& db_wygkcn_Article_Table &" where (Checked=1 ) order by click DESC,EC_ArticleID desc"
	end if
	if Request.cookies(echsys)("reglevel")=2 then
rs.Source="select top "& top_txt &" * from "& db_wygkcn_Article_Table &" where (Checked=1 ) order by click DESC,EC_ArticleID desc"
	end if
	if Request.cookies(echsys)("reglevel")=1 then
rs.Source="select top "& top_txt &" * from "& db_wygkcn_Article_Table &" where (Checked=1 ) order by click DESC,EC_ArticleID desc"
	end if
end if
else
rs.Source="select top "& top_txt &" * from "& db_wygkcn_Article_Table &" where  Checked=1 order by click DESC,EC_ArticleID desc"
end if
rs.Open rs.Source,conn,1,1
while not rs.EOF
title=htmlencode4(trim(rs("title")))
%>
<li>
<span class="float_right">[<%=rs("click")%>]</span>·<a href="wygkcn_ShowArticle.asp?EC_ArticleID=<%=rs("EC_ArticleID")%>" target="_blank" title="<%=title%>"><font color="<%=rs("titlecolor")%>"> <%=CutStr(title,34)%> </font></a>
</li>
<%
rs.MoveNext
wend
rs.close
%>
</ul>
</div>
</div>
</div>
<!--左边部分结束-->

<!--右边部分开始-->
<div class="zl_right float_right">

<!--位置导航部分开始-->
<div class="position">
<img src="Images/lm_dot.gif" width="11" height="11">&nbsp;&nbsp;您的位置&nbsp;&nbsp;<a href="./" >首页</a> >> 专题 >>列表
</div>
<!--位置导航部分结束-->
<div class=class_listcnt>
<ul class=list>
<%
set rs2=server.CreateObject("ADODB.RecordSet")  '专题
rs2.Source="select * from "& db_wygkcn_Special_Table &"  order by EC_SpecialID DESC "
rs2.Open rs2.Source,conn,3,1

if rs2.eof and rs2.bof then
response.write "<li>·还没有任何专题</li>"
else
end if

if not rs2.eof then

Rs2.PageSize     = MyPageSize
MaxPages         = Rs2.PageCount
Rs2.absolutepage = MyPage
total            = Rs2.RecordCount
%>
<%
i = 0
do until Rs2.Eof or i = Rs2.PageSize
%>
<li>·<a href="Special_News.asp?EC_SpecialID=<%=rs2("EC_SpecialID")%>"><%=htmlencode4(trim(rs2("E_SpecialName")))%></a></li>
<%
Rs2.MoveNext
i = i + 1
loop
%>
<li  class="pages_menu my_pages">
第 <%=Mypage%>/<%=Maxpages%> 页，每页 <%=MyPageSize%> 项
          <%
url="wygkcn_Special.asp?"
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((total-1)/Rs2.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

End If
Rs2.close
%>
</li>
</ul>
</div>

</div>
<!--右边部分结束-->
<div class=clear_float></div><!--清除浮动属性-->
</div>
<!--中间内容部分结束-->
<!--#include file="bottom.asp"-->
</div>
<!--内容部分结束-->
</body>
</html>