<!--#include file="../Inc/Top.asp"-->
<%
class1=request("class1")
class2=request("class2")
If Len(class2)>=10 or Len(class1)>=10  Then 
  response.write"<SCRIPT language=JavaScript>alert('栏目不存在');"
  response.write"javascript:window.close()</SCRIPT>"
else
if class1<>"" then
sql="select * from lanmu where id="&cint(class1)
else
sql="select * from lanmu where id="&cint(class2)
end if
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
webname=rs("webname")

if rs("bigclass")<>0 then
sqlbig="select * from lanmu where id="&cint(rs("bigclass"))
Set rsbig= Server.CreateObject("ADODB.Recordset")
rsbig.open sqlbig,conn,1,1
lmname=rsbig("lmname")
rsbig.close
set rsbig=nothing
lmname=lmname&"->"
end if

lmname=lmname&rs("lmname")
keywords=rs("keywords")
description=rs("description")
rs.close
set rs=nothing

page=clng(request("page"))
if class1<>"" then
sqlnews="select * from news where class1="&cint(class1)&" order by hits desc"
else
sqlnews="select * from news where class2="&cint(class2)&" order by hits desc"
end if
Set rsnews= Server.CreateObject("ADODB.Recordset")
rsnews.open sqlnews,conn,1,1 

titlewords="--"&lmname
title=lmname
%>
<!-- #include file="../inc/Head.asp" -->
<div class="web">
<div class="leftcontent">
<div class="navigation"><img src="../images/nav.gif" /><%=lmname%></div>
	<div class="content">
	<%
    if rsnews.eof and rsnews.bof then
    response.Write("暂时没有记录</div>")
    else 
   rsnews.PageSize=20
   if page=0 then page=1 
   pages=rsnews.pagecount
   if page > pages then page=pages
   rsnews.AbsolutePage=page  
   for j=1 to rsnews.PageSize
   %>
   <% if neirong=True then %>
    <div class="newsline">
	<img src="../Images/dot.gif" />
	<% if class1<>"" then
	 sqlnewslm="select * from lanmu where id="&cint(rsnews("class2"))
	 Set rsnewslm= Server.CreateObject("ADODB.Recordset")
         rsnewslm.open sqlnewslm,conn,1,1 
		 newslm=rsnewslm("lmname")
		 rsnewslm.close
		 set rsnewslm=nothing %>
	[<a class="newslm" href="news.asp?class2=<%=rsnews("class2")%>"><%=newslm%></a>]	
	<% end if %> 
	<a href='Shownews<%=rsnews("id")%>.htm' target=_blank><%=rsnews("title")%></a><阅读<span><%=rsnews("hits")%></span>次>
	<%  
    if rsnews("hits")>=50 then
    %><img src="../Images/hot.gif"><% end if %>
	</div>	
    <%else%>
	<div class="newsline">
	<img src="../Images/dot.gif" />
	<% if class1<>"" then
	 sqlnewslm="select * from lanmu where id="&cint(rsnews("class2"))
	 Set rsnewslm= Server.CreateObject("ADODB.Recordset")
         rsnewslm.open sqlnewslm,conn,1,1 
		 newslm=rsnewslm("lmname")
		 rsnewslm.close
		 set rsnewslm=nothing %>
	[<a class="newslm" href="news.asp?class2=<%=rsnews("class2")%>"><%=newslm%></a>]	
	<% end if %> 
<a href='Shownews.asp?ID=<%=rsnews("id")%>' target=_blank><%=rsnews("title")%></a><阅读<span><%=rsnews("hits")%></span>次>
	<%  
    if rsnews("hits")>=50 then
    %><img src="../Images/hot.gif"><% end if %>
	</div>	
	<% end if
	rsnews.movenext
	if rsnews.eof then exit for
    next
	 %>
	</div>
	<% if class1<>"" then %>
	<div class="page">
	<form method=Post action="news.asp?class1=<%=class1%>">
     <% if Page<2 then      
    response.write "首页 上一页&nbsp;"
   else
    response.write "<a href=news.asp?class1="&class1&"&page=1>首页</a>&nbsp;"
    response.write "<a href=news.asp?class1="&class1&"&page=" & Page-1 & ">上一页</a>&nbsp;"
   end if
  if rsnews.pagecount-page<1 then
    response.write "下一页 尾页"
   else
    response.write "<a href=news.asp?class1="&class1&"&page=" & (page+1) & ">"
    response.write "下一页</a> <a href=news.asp?class1="&class1&"&page="&rsnews.pagecount&">尾页</a>"
   end if
    response.write "&nbsp;页次：<strong><font color=red>"&Page&"</font>/"&rsnews.pagecount&"</strong>页 "
    response.write "&nbsp;共<b><font color='#FF0000'>"&rsnews.recordcount&"</font></b>条记录 <b>"&rsnews.pagesize&"</b>条记录/页"
   response.write " 转到：<input type='text' name='page' size=2 maxlength=10 class=text value="&page&">"
   response.write " <input class='pagesubmit' type='submit'  value=' Goto '  name='cndok'>"     
   %>
  </form>
	</div>
	<% else %>
	<div class="page">
	<form method=Post action="news.asp?class2=<%=class2%>">
     <%if Page<2 then      
    response.write "首页 上一页&nbsp;"
   else
    response.write "<a href=news.asp?class2="&class2&"&page=1>首页</a>&nbsp;"
    response.write "<a href=news.asp?class2="&class2&"&page=" & Page-1 & ">上一页</a>&nbsp;"
   end if
  if rsnews.pagecount-page<1 then
    response.write "下一页 尾页"
   else
    response.write "<a href=news.asp?class2="&class2&"&page=" & (page+1) & ">"
    response.write "下一页</a> <a href=news.asp?class2="&class2&"&page="&rsnews.pagecount&">尾页</a>"
   end if
    response.write "&nbsp;页次：<strong><font color=red>"&Page&"</font>/"&rsnews.pagecount&"</strong>页 "
    response.write "&nbsp;共<b><font color='#FF0000'>"&rsnews.recordcount&"</font></b>条记录 <b>"&rsnews.pagesize&"</b>条记录/页"
   response.write " 转到：<input type='text' name='page' size=2 maxlength=10 class=text value="&page&">"
   response.write " <input class='pagesubmit' type='submit'  value=' Goto '  name='cndok'>"     
   %>
  </form>
	</div>
	<% end if
	   end if%>
</div>

<div class="rightnav"><!-- #include file="left.asp" --><!-- #include file="../inc/online.asp" --></div>

</div>

<!-- #include file="../Inc/Foot.asp" -->
</BODY></HTML>
<%
rstz.close
set rstz=nothing
rsnews.close
set rsnews=nothing
end if
%>