<!--#include file="inc/syscode.asp" -->
<%
ShowSmallClassType=ShowSmallClassType_Default
MaxPerPage=18
	BigClassName =Request.QueryString("BigClassName")
	smallClassName=Request.QueryString("smallClassName")%><html><!-- InstanceBegin template="/Templates/gb.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title><%=companyname%></title>
<!-- InstanceEndEditable --> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Keywords" content="<%= MetaKeywords %>">
<meta name="Description" content="<%= MetaDescription %>">
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="images/objectSwap.js"></script>
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
  <!--#include file="head.asp" -->
  <table id="Table_01" width="1002" border="0" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="214" align="center" valign="top"><img src="images/cp.jpg">
        <table width="100%" border="0" align="right" cellpadding="0" cellspacing="0">
          <%
			  set rspro=server.CreateObject("adodb.recordset")
			  sql="select top 20 * from product where bigclassname='主要产品' order by id "
			  rspro.open sql,conn,1,1
			  if not rspro.eof and not rspro.bof then
			  do while not rspro.eof 
			  %>
          <tr><td align="left"><img src="images/beibei3.jpg" border="0">  <a href="exhview.asp?id=<%=rspro("id")%>"><font class="123"><%=rspro("title")%></font></a><br>
            <img src="images/xian.jpg"></td>
          </tr>
          <%rspro.movenext
			  loop
			  end if
			  rspro.close
			  set rspro=nothing%>
      </table></td><td width="37" align="center" valign="top" background="images/bg_left.jpg">&nbsp;</td>
      <td align="center" valign="top">
        <table width="100%" border="0" cellspacing="3" cellpadding="3">
          <tr>
            <td><!-- InstanceBeginEditable name="title" --><img src="images/title_news.gif"><!-- InstanceEndEditable --></td>
          </tr>
          <tr>
            <td><!-- InstanceBeginEditable name="body" --> 
            
            <%
'请勿改动下面这三行代码
key=Request("key")
strFileName="news.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName  & "&key=" & key
if request("page")<>"" then
    currentPage=cint(request("page"))
else
	currentPage=1
end if

sql="select * from news where id>0 and passed=true"

if key<>"" then
	sql=sql & " and title like '%" & key & "%' "
end if
if bigClassName<>"" then
	sql=sql & " and bigClassName='" & bigClassName & "' "
end if
if SmallClassName<>"" then
	sql=sql & " and SmallClassName='" & SmallClassName & "' "
end if
sql=sql & " order by ding desc,id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
%>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="text" align="center">
              <tr> 
                <td n><img src="images/type.gif" align="absmiddle"> <select name="select" onChange="location.href=this.options[this.selectedIndex].value;">
                    <option value="news.asp">请选择</option>
                    <%
set rsSmallClass=server.CreateObject("adodb.recordset")
rsSmallClass.open "Select * From NewsSmallClass Where BigClassName='" & BigClassName & "'",conn,1,1
if not(rsSmallClass.bof and rsSmallClass.eof) then
 do while not rsSmallClass.eof
			%>
                    <option value="news.asp?BigClassName=<%= BigClassName %>&SmallClassName=<%=rsSmallClass("SmallClassName")%>"><%=rsSmallClass("SmallClassName")%></option>
                    <%
 rsSmallClass.movenext
 loop
end if
rsSmallClass.close
set rsSmallClass=nothing	
%>
                  </select> </td>
                <td> <table width="100%" border="0" cellpadding="3" class="text">
                    <form name="search" method="get" action="news.asp">
                      <tr> 
                        <td> <img src="images/search.gif"  align="absmiddle"> 
                          <input type="text" name="key" size="18" value=""> <input name="Query" type="submit" id="Query" value="查 询"> 
                        </td>
                      </tr>
                    </form>
                  </table></td>
                <td align="right">&nbsp;</td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="2" cellpadding="2">
              <tr> 
                <td> 
                  <%
if request.querystring="" then
	response.write "所有信息"
else
	if request("Query")<>"" then
		if key<>"" then
			response.write "名称中含有“<font color=blue>" & key & "</font>”的信息"
		else
			response.Write("所有信息")
		end if
 	else
		if smallclassname<>"" then
			response.write "<a href='news.asp?BigClassName=" & BigClassName & "&Smallclassname=" & smallclassname & "'>" & smallclassname & "</a>&nbsp;&gt;&gt;&nbsp;"
			else
				response.write "所有内容"
			end if
		end if
end if
%>
                </td>
                <td>
                  <%
  	if rs.eof and rs.bof then
		response.write "共找到 0 条信息</td></tr></table>"
	else
    	totalPut=rs.recordcount
		if currentpage<1 then
       		currentpage=1
    	end if
    	if (currentpage-1)*MaxPerPage>totalput then
	   		if (totalPut mod MaxPerPage)=0 then
	     		currentpage= totalPut \ MaxPerPage
		  	else
		      	currentpage= totalPut \ MaxPerPage + 1
	   		end if
    	end if
		response.Write "共找到 " & totalPut & " 条信息"
%>
                </td>
              </tr>
            </table>
            <%		
	    if currentPage=1 then
        	showContent
        	showpage strFileName,totalput,MaxPerPage,true,true,"条信息"
   	 	else
   	     	if (currentPage-1)*MaxPerPage<totalPut then
         	   	rs.move  (currentPage-1)*MaxPerPage
         		dim bookmark
           		bookmark=rs.bookmark
            	showContent
            	showpage strFileName,totalput,MaxPerPage,true,true,"条信息"
        	else
	        	currentPage=1
           		showContent
           		showpage strFileName,totalput,MaxPerPage,true,true,"条信息"
	    	end if
		end if
	end if
%>
            <%  
sub showContent
   	dim i
    i=0
%>
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr align="center"> 
                <td width="50" height="25" background="images/bg_news.gif"><strong><font color="#FFFFFF">编号</font></strong></td>
                      
                <td background="images/bg_news.gif"><strong><font color="#FFFFFF">标题</font></strong></td>
                      
                <td width="150" background="images/bg_news.gif"><strong><font color="#FFFFFF">日期</font></strong></td>
                      
                <td width="60" background="images/bg_news.gif"><strong><font color="#FFFFFF">人气</font></strong></td>
                    </tr>
                    <%do while not rs.eof
					k=i+1+(currentPage-1)*MaxPerPage %>
                    <tr class="666666" onMouseOver="this.style.backgroundColor='#F3F3F3'" 
                onMouseOut="this.style.backgroundColor='#FFFFFF'"> 
                      <td height="25" align="center"><%=k%></td>
                      <td><a href="shownews.asp?id=<%=rs("id")%>" alt="<%=rs("Title")%>"><%if rs("txtcolor")<>"" then%><font color="<%=rs("txtcolor")%>"><%=gotTopic(rs("Title"),45)%></font><%else%><%=gotTopic(rs("Title"),45)%><%end if%></a><%If DateDiff("d",rs("UpdateTime"),now())<=2 Then 
	  response.Write("<img src='images/new.gif'>")
	                  end if%></td>
                      <td align="center"><%= FormatDateTime(rs("UpdateTime"),2) %></td>
                      <td align="center"><%=rs("hits")%></td>
                    </tr>
                    <tr> 
                      <td height="1" colspan="4" align="center" bgcolor="E5E5E5"></td>
                    </tr>
                    <%
	i=i+1
	      if i>=MaxPerPage then exit do
	      rs.movenext
	loop
%>
                  </table>
            <%
   end sub 
%>
            <br>
            <%
rs.close
set rs=nothing  
call CloseConn()
%>
            
            <!-- InstanceEndEditable --></td>
          </tr>
      </table>    </td>
    </tr>
  </table>
  <!--#include file="foot.asp" -->
</div>
</body>
<!-- InstanceEnd --></html>

<script language="javascript" src="/mychatserver/service/float.asp?lang=1&autoturn=yes&style=float&picid=2&site=right"></script>
<script language="javascript" src="/mychatserver/service/a1190.asp"></script>
