<%@ Language=VBScript%>
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="function.asp"-->
<!--#include file="char.inc"-->
<%
request_EC_SpecialID=ChkRequest(Request.QueryString("EC_SpecialID"),1)	'防注入
if request_EC_SpecialID="" then
Response.Write "<script>alert('未指定参数');history.back()</script>"
response.end
else

if not IsNumeric(request_EC_SpecialID) then
 response.write "<script>alert('非法参数');history.back()</script>"
 response.end
else

set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from "& db_wygkcn_Special_Table &" where EC_SpecialID="&request_EC_SpecialID&" order by EC_SpecialID"
rs.Open rs.Source,conn,1,1
if rs.EOF then
Response.Write "<script>alert('该专题不存在');history.back()</script>"
else
E_SpecialName=rs("E_SpecialName")
specialzs=rs("specialzs")

rs.close
set rs=nothing
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
end if

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
%>
<!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><%=E_SpecialName%>_专题信息__<%=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><SPAN class=more><a href="wygkcn_Special.asp"><img src="Images/w_more.gif" alt="更多专题" width="28" height="9" border="0" /></a></SPAN>所有专题</H3>
<DIV class=new_art_list>
<ul class=list>
<%
set rs2=server.CreateObject("ADODB.RecordSet")  '专题
rs2.Source="select Top " & top_sp & " * from "& db_wygkcn_Special_Table &"  order by EC_SpecialID DESC "
rs2.Open rs2.Source,conn,1,1
if not rs2.EOF then
while not rs2.EOF

%>
<li>·<a href="Special_News.asp?EC_SpecialID=<%=rs2("EC_SpecialID")%>"><%=htmlencode4(trim(rs2("E_SpecialName")))%></a></li>
<%
rs2.MoveNext
wend

else
Response.Write "<li>·暂无专题</li>"
end if
rs2.Close
set rs2=nothing
%>
</ul>
</div>
</div>

<div class="new_art lianmu_bg">
<H3>专题图文</H3>
<DIV class="EC_spe_pic">
<ul>
<%
set rs2=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
rs2.Source="select top 4  * from "& db_wygkcn_Article_Table &" where EC_SpecialID=" & request_EC_SpecialID & " or EC_SpecialID2=" & request_EC_SpecialID & " and picnews=1 and picname is not null and Checked=1 order by EC_ArticleID DESC"
end if
if Request.cookies(echsys)("key")="" then
rs2.Source="select top 4  * from "& db_wygkcn_Article_Table &" where EC_SpecialID=" & request_EC_SpecialID & " or EC_SpecialID2=" & request_EC_SpecialID & " and picnews=1 and picname is not null and Checked=1 and newslevel=0 order by EC_ArticleID DESC"
end if
if Request.cookies(echsys)("key")="selfreg" then
	if Request.cookies(echsys)("reglevel")=3 then
rs2.Source="select top 4  * from "& db_wygkcn_Article_Table &" where EC_SpecialID=" & request_EC_SpecialID & " or EC_SpecialID2=" & request_EC_SpecialID & " and picnews=1 and picname is not null and Checked=1 order by EC_ArticleID DESC"
	end if
	if Request.cookies(echsys)("reglevel")=2 then
rs2.Source="select top 4  * from "& db_wygkcn_Article_Table &" where EC_SpecialID=" & request_EC_SpecialID & " or EC_SpecialID2=" & request_EC_SpecialID & " and picnews=1 and picname is not null and Checked=1 order by EC_ArticleID DESC"
	end if
	if Request.cookies(echsys)("reglevel")=1 then
rs2.Source="select top 4  * from "& db_wygkcn_Article_Table &" where EC_SpecialID=" & request_EC_SpecialID & " or EC_SpecialID2=" & request_EC_SpecialID & " and picnews=1 and picname is not null and Checked=1 order by EC_ArticleID DESC"
	end if
end if
else
rs2.Source="select top 4  * from "& db_wygkcn_Article_Table &" where EC_SpecialID=" & request_EC_SpecialID & " or EC_SpecialID2=" & request_EC_SpecialID & " and picnews=1 and picname is not null and Checked=1 order by EC_ArticleID DESC"
end if
rs2.Open rs2.Source,conn,3,1

If Not rs2.eof then

while not rs2.EOF
fileExt=lcase(getFileExtName(rs2("picname")))
%>
<li>
<DIV class="npic" onMouseOver="this.className='npic npic_Hover'" onMouseOut="this.className='npic'">
<a class=middle href="wygkcn_ShowArticle.asp?EC_ArticleID=<%=rs2("EC_ArticleID")%>" target=_blank title="<%=htmlencode4(rs2("title"))%>">
                          <%if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then%>
                          <img  src="<%=FileUploadPath & rs2("picname")%>" width="100" height="100" border=0 align="center">
                          <%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="100" height="100" border=0 align="center">
                            <param name=movie value="<%=FileUploadPath & rs2("picname")%>">
                            <param name=quality value=high>
                            <param name='Play' value='-1'>
                            <param name='Loop' value='0'>
                            <param name='Menu' value='-1'>
                            <embed src="<%=FileUploadPath & rs2("picname")%>" width="100" height="100" border=0 align="center" pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'></embed>
                        </object>
                          <%end if%>
                        </a> 
</div>
<div class="npic_title">
<a href="wygkcn_ShowArticle.asp?EC_ArticleID=<%=rs2("EC_ArticleID")%>" target=_blank title="<%=htmlencode4(rs2("title"))%>"><%=CutStr(htmlencode4(rs2("title")),16)%></a>
</div>
</li>
<%
rs2.MoveNext
wend
else
Response.Write "<li>·暂无专题图文</li>"
end if
rs2.Close
set rs2=nothing
%>
</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>
<div class=special>
<div class="spe_tit"><%=htmlencode4(E_SpecialName)%></div>
<div class="spe_zs"><%=specialzs%></div>
</div>
<div class="class=list1 lm_class_bg">
<H4>本专题文章</H4>
<ul class=list>
          <%
set rs2=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
rs2.Source="select * from "& db_wygkcn_Article_Table &" where EC_SpecialID=" & request_EC_SpecialID & " or EC_SpecialID2=" & request_EC_SpecialID & " and Checked=1 order by EC_ArticleID DESC"
end if
if Request.cookies(echsys)("key")="" then
rs2.Source="select * from "& db_wygkcn_Article_Table &" where EC_SpecialID=" & request_EC_SpecialID & " or EC_SpecialID2=" & request_EC_SpecialID & " and Checked=1 and newslevel=0 order by EC_ArticleID DESC"
end if
if Request.cookies(echsys)("key")="selfreg" then
	if Request.cookies(echsys)("reglevel")=3 then
rs2.Source="select * from "& db_wygkcn_Article_Table &" where EC_SpecialID=" & request_EC_SpecialID & " or EC_SpecialID2=" & request_EC_SpecialID & " and Checked=1 order by EC_ArticleID DESC"
	end if
	if Request.cookies(echsys)("reglevel")=2 then
rs2.Source="select * from "& db_wygkcn_Article_Table &" where EC_SpecialID=" & request_EC_SpecialID & " or EC_SpecialID2=" & request_EC_SpecialID & " and Checked=1 order by EC_ArticleID DESC"
	end if
	if Request.cookies(echsys)("reglevel")=1 then
rs2.Source="select * from "& db_wygkcn_Article_Table &" where EC_SpecialID=" & request_EC_SpecialID & " or EC_SpecialID2=" & request_EC_SpecialID & " and Checked=1 order by EC_ArticleID DESC"
	end if
end if
else
rs2.Source="select * from "& db_wygkcn_Article_Table &" where EC_SpecialID=" & request_EC_SpecialID & " or EC_SpecialID2=" & request_EC_SpecialID & " and Checked=1 order by EC_ArticleID DESC"
end if
rs2.Open rs2.Source,conn,3,1

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
			if showyear=1 then
				datetime="(" & year(rs2("UpdateTime"))  &"."& Month(rs2("UpdateTime"))  &"."& Day(rs2("UpdateTime")) &")"
			else
				datetime="("& Month(rs2("UpdateTime"))  &"."& Day(rs2("UpdateTime")) &")"
			end if
if rs2("picname")<>"" then
img=" <font class=pic_word>[图]</font>"
else
img=""
end if
title=htmlencode4(trim(rs2("title")))
%>
<li><%if showtime="1" then%><span><%=datetime%></span><%end if%>
·<a href="wygkcn_ShowArticle.asp?EC_ArticleID=<%=rs2("EC_ArticleID")%>" target=_blank title="<%=title%>"><font color="<%=rs2("titlecolor")%>"><%=CutStr(title,40)%></font><%=img%></a>
</li>
<%
rs2.MoveNext
i = i + 1
loop				
%>
<li  class="pages_menu my_pages">
共 <%=total%> 条，当前第 <%=Mypage%>/<%=Maxpages%> 页，每页 <%=MyPageSize%> 条
<%
url="Special_News.asp?EC_SpecialID=" & request_EC_SpecialID				
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

else
Response.write "本专题暂无信息"				
End If
rs2.close
%>
</li>
</ul>
</div>
</div>

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