<%@ 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_Type_Table &" order by typeorder"
rs.Open rs.Source,conn,1,1

dim ArraytypeID(10000),ArraytypeName(10000),Arraytypecontent(10000)
typeCount=rs.RecordCount
for i=1 to typeCount
ArraytypeID(i)=rs("typeID")
ArraytypeName(i)=rs("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
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>专题__<%=jjgn%></title>
<LINK href=news.css rel=stylesheet>
</head>
<body topmargin="0">
<!--#include file=top.asp -->
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr valign="top">
    <td width="196" rowspan="2" background="IMAGES/ec_11.gif">
      <div align="center"> </div>
      <div align="center">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber2" height="23">
                <tr>
                  <td width="100%" height="25" valign="middle" background="IMAGES/smenu_bg.gif">
                  <p align="center"><font color="#000000">文章排行</font></td>
                </tr>
                <tr>
                  <td width="100%"><div align="center">
                      <table width="99%" border="0" cellspacing="0" cellpadding="3">
                        <tr>
                          <td>
                            <%
set rs=server.CreateObject("ADODB.RecordSet")
if uselevel=1 then
if Request.cookies(eChuang)("key")="super" or Request.cookies(eChuang)("key")="typemaster" or Request.cookies(eChuang)("key")="bigmaster" or Request.cookies(eChuang)("key")="smallmaster" or Request.cookies(eChuang)("key")="check" then
rs.Source="select top "& top_txt &" * from "& db_News_Table &" where  checkked=1 order by click DESC,newsid desc"
end if
if Request.cookies(eChuang)("key")="" then
rs.Source="select top "& top_txt &" * from "& db_News_Table &" where (checkked=1 and newslevel=0) order by click DESC,newsid desc"
end if
if Request.cookies(eChuang)("key")="selfreg" then
	if Request.cookies(eChuang)("reglevel")=3 then
rs.Source="select top "& top_txt &" * from "& db_News_Table &" where (checkked=1 ) order by click DESC,newsid desc"
	end if
	if Request.cookies(eChuang)("reglevel")=2 then
rs.Source="select top "& top_txt &" * from "& db_News_Table &" where (checkked=1 ) order by click DESC,newsid desc"
	end if
	if Request.cookies(eChuang)("reglevel")=1 then
rs.Source="select top "& top_txt &" * from "& db_News_Table &" where (checkked=1 ) order by click DESC,newsid desc"
	end if
end if
else
rs.Source="select top "& top_txt &" * from "& db_News_Table &" where  checkked=1 order by click DESC,newsid desc"
end if
rs.Open rs.Source,conn,1,1
while not rs.EOF
title=htmlencode4(trim(rs("title")))

%>
&nbsp;· <a class=middle href="E_ReadNews.asp?NewsID=<%=rs("NewsID")%>" target="_blank" title="<%=title%>"><font color="<%=rs("titlecolor")%>"> <%=CutStr(title,18)%> </font></a>&nbsp;<font color=red><%=rs("click")%></font><br>
                    <%
rs.MoveNext
wend
rs.close
%>
                          </td>
                        </tr>
                      </table>
                  </div></td>
                </tr>
            </table></td>
          </tr>
          <tr bordercolor="#999999">
            <td height="25" align="center" background="IMAGES/smenu_bg.gif"><FONT color=#000000>本月热门</FONT></td>
          </tr>
          <tr bordercolor="#999999">
            <td height="36" align="center" valign=top> <br>
                <table border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="93%" id="AutoNumber5">
                  <% 
 dim ii
ii = 0
if uselevel=1 then
if Request.cookies(eChuang)("key")="" then
rs.Source="select top " & top_txt & " * from "& db_News_Table &" where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 and newslevel=0 order by click DESC"   '选择本月
end if
if Request.cookies(eChuang)("key")="selfreg" then
	if Request.cookies(eChuang)("reglevel")="3" then
	rs.Source="select top " & top_txt & " * from "& db_News_Table &" where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 order by click DESC"   '选择本月
	end if
	if Request.cookies(eChuang)("reglevel")="2" then
	rs.Source="select top " & top_txt & " * from "& db_News_Table &" where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 order by click DESC"   '选择本月
	end if
	if Request.cookies(eChuang)("reglevel")="1" then
	rs.Source="select top " & top_txt & " * from "& db_News_Table &" where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 order by click DESC"   '选择本月
	end if
end if
if Request.cookies(eChuang)("key")="super" or Request.cookies(eChuang)("key")="typemaster" or Request.cookies(eChuang)("key")="bigmaster" or Request.cookies(eChuang)("key")="smallmaster" or Request.cookies(eChuang)("key")="check" then
rs.Source="select top " & top_txt & " * from "& db_News_Table &" where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 order by click DESC"   '选择本月
end if
else
rs.Source="select top " & top_txt & " * from "& db_News_Table &" where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 order by click DESC"   '选择本月
end if
rs.Open rs.Source,conn,1,1
	if rs.bof and rs.eof then 
		response.write "<td align=center>无</td>" 
	else 
	do while not rs.eof 
%>
                  <tr>
                    <td height=18> ·
                        <%if rs("picnews")=1 then%>
                        <img src="images/news_img.gif">
                        <%end if%>
                        <a class=middle href="E_ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=htmlencode4(rs("title"))%>" target="_blank" > <%=CutStr(rs("title"),12)%></a><font color="#666666">[<%=rs("click")%>]</font> </td>
                  </tr>
                  <%  ii = ii + 1
    if ii>50 then exit do
	rs.movenext     
	loop
	end if  
	rs.close   
	set rs=nothing
%>
            </table></td>
          </tr>
          <tr> </tr>
        </table>
        <!--广告调用-->
</div></td>
    <td width="587" rowspan="2">
      <div align="center">
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="25" background="IMAGES/lmenu_bg.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class=m_tittle>&nbsp;</font>栏目导航&nbsp;<b><a class="daohang" href="./" > 网站首页</a>&gt;&gt;专题</b></td>
          </tr>
          <tr>
            <td><div align="center">
                <script language=javascript src=zongg/ad.asp?i=12></script>
            </div></td>
          </tr>
          <tr>
            <td>
              <table width="100%" height="74" border="0" align="center" cellpadding="0" cellspacing="0" id="AutoNumber3" style="border-collapse: collapse">
                <tr>
                  <td height="52" valign=top>
                    <table width="100%" border="0" cellpadding="3" cellspacing="0">
                      <%
set rs2=server.CreateObject("ADODB.RecordSet")  '专题
rs2.Source="select * from "& db_Special_Table &"  order by SpecialID DESC "
rs2.Open rs2.Source,conn,3,1

if rs2.eof and rs2.bof then
response.write "<p align=center>&nbsp;&nbsp;还没有任何专题</p>"
else
end if

if not rs2.eof then

Rs2.PageSize     = MyPageSize
MaxPages         = Rs2.PageCount
Rs2.absolutepage = MyPage
total            = Rs2.RecordCount
%>
                      <tr>
                        <td width=100% height="25" valign="middle" background="IMAGES/lmenu_bg.gif"></td>
                      </tr>
                      <%

i = 0
do until Rs2.Eof or i = Rs2.PageSize
%>
                      <tr>
                        <td width="100%" height="20">&nbsp;&nbsp;<img src="IMAGES/point.gif" width="10" height="7" border="0">&nbsp;<a class=middle href="Special_News.asp?SpecialID=<%=rs2("SpecialID")%>"><%=htmlencode4(trim(rs2("E_SpecialName")))%></a></td>
                      </tr>
                      <%
Rs2.MoveNext
i = i + 1
loop
%>
                      <tr>
                        <td width="100%" height="24" align=center>第 <%=Mypage%>/<%=Maxpages%> 页，每页 <%=MyPageSize%> 项
                            <%
url="E_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 class=black href='" & Url & "page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
Response.write "<a class=black href='" & Url & "page=1' title='第1页'>页首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a class=black 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 class=black 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 class=black href='" & Url & "page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
end if

if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A class=black href='" & Url & "page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
Response.write " <a class=black href='" & Url & "page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
End if

				
End If
Rs2.close

%>
                        </td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td height="16" valign=top>&nbsp;</td>
                </tr>
            </table></td>
          </tr>
          <tr> </tr>
        </table> 
      </div></td>
  </tr>
</table>
<!--#include file=bottom.asp -->

</body>

</html>