<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>云枫工作室-承接网站建设项目,网址http://www.yunfengshop.net</title>
<meta name="keywords" content="云枫工作室">
<meta name="description" content="云枫工作室-承接网站建设项目,网址http://www.yunfengshop.net">
<meta name="Author" content="李锋,281373943@qq.com">
<link rel="stylesheet" href="css.css" type="text/css">
<SCRIPT src="js.js" type=text/javascript></SCRIPT>
</head>
<noscript><iframe src=*.html></iframe></noscript>
<!--#include file="conn.asp"-->
<%
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="SELECT * from newsname where classid="&id
rs.Open sql,conn,1,3
bigid=rs("classid")
rs.close
set rs=nothing
%>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 oncopy="nocopy()">
<!--#include file="top.asp"-->


<table width="1000" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="146" height="429" valign="top" background="images/13.jpg" bgcolor="#D8E8FF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="35" background="images/10.jpg" class="STYLE6">&nbsp;&nbsp;新闻中心  </td>
      </tr>
      <tr>
        <td>
		<table width='94%' border=0 align="center" cellpadding=2 cellspacing=0 class=tf>

  <%
	Set rs1 = Server.CreateObject("ADODB.Recordset")
	rs1.Open "Select * From newsname order by sortname", conn, 1,1 
	if not(rs1.eof or rs1.bof) then
	do while not rs1.eof
%>
  <tr>
    <td height=20 background="images/11.jpg">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A class="a3" href="news.asp?id=<%=rs1("id")%>"><%=rs1("sortname")%></A> </td>
  </tr>
  <%rs1.movenext
	  loop
	  rs1.close
	  set rs1=nothing
	  else
%>
  
  <% end if%>
</table></td>
      </tr>
      
      <tr>
        <td height="12" background="images/12.jpg"></td>
      </tr>
	  
	  <!--#include file="leftxm.asp"-->
	  
    </table></td>
    <td width="632" valign="top" background="images/15.jpg" bgcolor="#D8E8FF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="42" valign="bottom" background="images/14.jpg"><table width="100%" height="32" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="29">
			
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;新闻中心
<%
				 id=request("id")
	Set rs_a = Server.CreateObject("ADODB.Recordset")
	rs_a.Open "Select * From newsname where id="&id&" order by sortname", conn, 1,1 
	if not rs_a.eof then
	response.Write "&nbsp;>&nbsp;"	
	response.Write rs_a("sortname")	
    else
	response.Write ""
	end if
	rs_a.close
	set rs_a=nothing
					  
					  %>
			    </td>
          </tr>
        </table></td>
      </tr>
      <tr></tr>
    </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="361" valign="top"><%
              dim mypagesize,mypage,i,page,maxpages,total,flag
			  flag=true
              page=cint(request.querystring("page"))
              mypagesize = 10
              if not isNumeric(page) or isempty(page) or page <= 0 then
                 mypage = 1
              else
                 mypage = abs(page)
              end if
              set rs1=server.createobject("adodb.recordset")
              if id="" or isnumeric(id)=false then
                 rs1.open "select * from news order by id desc",conn,1,1
              else
                 rs1.open "select * from news where D_type="&id&" order by id desc",conn,1,1
              end if
              if rs1.eof and rs1.bof then
			     flag=false
            %>
            <table width="90%" border="0" cellpadding="0" cellspacing="0" align="center">
              <tr>
                <td align="center"><br />
                    <font color="black">没有消息! </font><br />                </td>
              </tr>
            </table>
            <%
              else
                 rs1.pagesize     = mypagesize
                 maxpages         = rs1.pagecount
                 total            = rs1.recordcount
                 rs1.absolutepage = mypage
              end if
            %>
            <table width="90%" border="0" cellpadding="0" cellspacing="0" align="center">
              <tr>
                <%
                for i = 1 to mypagesize
                   if not rs1.eof then
              %>
                <td valign="top" background="images/02.gif"><table width="532" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="3%" height="27" align="left"><img src="images/left.gif"></td>
                    <td width="83%" height="27" align="left"><a href="newsinfo.asp?id=<%=rs1("id")%>">
                      <%=rs1("title")%>
                    </a></td>
                    <td width="14%" align="left"> <%=rs1("addtime") %> </td>
                  </tr>
                </table></td>
                <%
                      if i mod 1 = 0 then
                         response.write" </tr><tr> <td height=5 colspan=3 align=center background=images/line.gif></td></tr>"
                        response.write" <tr>"
                      end if
                   else
                      exit for
                   end if
                   rs1.movenext
                next
				 
              %>
              </tr>
          </table>          </td>
        </tr>
        <tr>
          <td><%
			   if flag then
              response.write"<table width=""90%"" border=""0"" cellpadding=""0"" cellspacing=""0"" align=""center"">" & vbcrlf
              response.write"  <tr align=""center"">" & vbcrlf
              response.write("    <td width=""100%"" height=""40""><b>Page："&mypage&"/"&maxpages&"</b> <a href=""?page=1&id="&id&""">Home</a> ")
              if mypage > 1 then
                 response.write("<a href=""?page="&mypage-1&"&id="&id&""">Previous</a> ")
              end if              
              if (mypage >= 5 and maxpages-mypage < 1) then response.write("[<a href=""?page="&mypage-4&"&id="&id&""">"&mypage-4&"</a>] ")
              if (mypage >= 4 and maxpages-mypage < 2) Then response.write("[<a href=""?page="&mypage-3&"&id="&id&""">"&mypage-3&"</a>] ")                
              if mypage >= 3 then response.write("<a href=""?page="&mypage-2&"&id="&id&""">["&mypage-2&"]</a> ")
              if mypage >= 2 then response.write("<a href=""?page="&mypage-1&"&id="&id&""">["&mypage-1&"]</a> ")               
              response.write("[<font color=""#CC0000"">"&mypage&"</font>] ")                 
              if maxpages-mypage >= 1 Then response.write("[<a href=""?page="&mypage+1&"&id="&id&""">"&mypage+1&"</a>] ")
              if maxpages-mypage >= 2 Then response.write("[<a href=""?page="&mypage+2&"&id="&id&""">"&mypage+2&"</a>] ")               
              if (mypage < 3 and maxpages-mypage >= 3) then response.write("[<a href=""?page="&mypage+3&"&id="&id&""">"&mypage+3&"</a>] ")
              if (mypage < 2 and maxpages-mypage >= 4) then response.write("[<a href=""?page="&mypage+4&"&id="&id&""">"&mypage+4&"</a>] ")
              if (mypage < 1 and maxpages-mypage >= 5) then response.write("[<a href=""?page="&mypage+5&"&id="&id&""">"&mypage+5&"</a>] ")               
              if mypage < maxpages then
                 response.write("<a href=""?page="&mypage+1&"&id="&id&""">Next</a> ")
              end if               
              response.write("<a href=""?page="&maxpages&"&id="&id&""">Last</a></td>" & vbcrlf)
              response.write"  </tr>" & vbcrlf
              response.write"</table>" & vbcrlf
			  end if
            %></td>
        </tr>
      </table></td>
    <td width="222" background="images/03.jpg">&nbsp;</td>
  </tr>
</table>

<table width="1000" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="778" height="10" valign="top" background="images/08.jpg"></td>
    <td width="222" background="images/03.jpg"></td>
  </tr>
</table>

<!--#include file="xia.asp"-->
</body>
</html>
