<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/ads.asp"-->
<%
if Not isChkInteger(request("id")) then
Id=0
else
Id=request("id")
end if
if Not isChkInteger(request("Typeid")) then
Typeid=0
else
Typeid=request("Typeid")
end if

set rs=server.createobject("adodb.recordset")
rs.open "select * from D_NewsClass where NewsType="&Typeid&" and id = "&id,conn,1,3
if rs.EOF or rs.bof  then
if Typeid=0 then
ClassName="新闻中心"
elseif Typeid=1 then
ClassName="网站公告"
else
ClassName="会员帮助中心"
end if
else
ClassName=rs("ClassName")
end if
rs.close
set rs=nothing
%>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="x-ua-compatible" content="ie=7" /> 
<title><%=ClassName%> - <%=Dshop_webname%></title>
<meta name="keywords" content="动感购物，购物，商城" />
<meta name="description" content="动感购物2015，是ASP开发的购物系统，是目前网络上ASP购物系统中最小巧、最快速、功能最全的购物系统，适用于各种网上购物平台" />
<link rel="stylesheet" href="/css/style.css">

</head>

<body>
       
<%call sub_top()%>

<div class="w960">
<div class="w190 l">
<%call sub_class()%>

<div class="clear10"></div>
<div class="clear10"></div>
<a href="<%=DShop_adtopurl1%>"><img src="<%=DShop_adtop1%>" border="0" /></a>
<div class="clear10"></div>
</div>
<!--左边结束-->
<div class="w760 r">
	<%call sub_nav_news()%>

	<div class="clear10"></div>
	<div id="pro_name"><%=ClassName%></div>
 <div id="news_list">
 <ul>
<%
if Id<>0 then
SqlStr="and Classid="&Id&""
end if
set rs=Server.CreateObject("ADODB.Recordset")
if Typeid=0 then
	sql="select * from D_News where NewsType=0 "&SqlStr&" order by id"
else
	sql="select * from D_News where NewsType="&Typeid&" "&SqlStr&" order by id"
end if
	rs.open sql,conn,1,1	
  rs.pagesize = 20
if request("page")=""  or isempty(request("page")) then
page = 1
else
page=int(request("page"))
end if
if page>rs.pagecount then
page=rs.pagecount
end if
if not rs.BOF then
Rs.Move Rs.PageSize*(page-1)
end if
i=1
do while not rs.eof and i<=rs.pagesize

%>
 <li><h3 class="l"><a href="NewsList.asp?id=<%=rs("Id")%>"><%=rs("Title")%></a></h3><span class="r">点击：<%=rs("Hot")%>人次 &nbsp;/&nbsp;<em><%=year(rs("AddDate"))%>/<%=Month(rs("AddDate"))%>/<%=day(rs("AddDate"))%></em></span></li>
<%rs.movenext
loop%>
 </ul>
 </div>
 <div class="clear10"></div>
 <div class="scott"><%if rs.recordcount<>0 then
			if page-1 mod 10=0 then
					p=(page-1) \ 5
				else
					p=(page-1) \ 5
				end if
								
				if rs.pagecount>1 and page<>1 then response.write "<a href=index.asp? title='首页'>首页</a>"
				
				if p*5>0 then response.write "<a href='/index.asp?page="&p*5&"' title=上五页>前五</a>"
				if page>1 then response.write "<a href='/index.asp?page="&page-1&"' title=上一页>上页</a>"
				uming_i=1
				for ii=p*5+1 to P*5+5
					   if ii=page then
						  response.write "<span class=""current"">"+Cstr(ii)+"</span>"
					   else
						  response.write "<a href='/index.asp?page="&ii&"'><b>"+Cstr(ii)+"</b></a>"
					   end if
					if ii=rs.pagecount then exit for
					 uming_i=uming_i+1
				next
				if rs.pagecount>page then response.write "<a href='/index.asp?page="&page+1&"' title=下一页>下页</a>"
				if ii<=rs.pagecount and uming_i=6 then response.write "<a href='/index.asp?page="&ii&"' title=下五页>后五</a>"
					if rs.pagecount>1 and page<>rs.pagecount then response.write "<a href=/index.asp?page="& rs.pagecount &" title='尾页'>尾页</a>"
				
			end if
			rs.close
			set rs=nothing%></div>
</div>


</div>

<div class="clear10"></div>
<%call sub_bottom()%>
</body>
</html>
