<!--#include file="conn.asp" -->
<%
strCurrMenu=FirstMenu()
ThisPage=request.ServerVariables("URL")
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="common/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="admin/common/JS_CheckForm.js"></script>
<script language="JavaScript">
function checkform(theform){
	if(!CheckEmpty(theform.key, "关键字")) return false;
}
</script>


<script language="JavaScript">
	function PutWare(strID){
		Shopwin=window.open("shopping.asp?action=add&spid=" + strID+ "&PtCount=1&mnid=<%=strCurrMenu%>",'WareList','width=580,height=250,scrollbars=yes,resizable=yes');
		Shopwin.focus();
	}

</script>

</head>

<body leftmargin="0" topmargin="0" BodyBegin>
<!--#include file="top.asp"-->
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="190" valign="top" background="images/left.gif"> <table width="180" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="26" align="center" background="images/index_01.gif">::会员登陆::</td>
              </tr>
              <tr> 
                  <td align="center"> 
				  <!--#include file="login.asp"-->
				  </td>
              </tr>
            </table>
            <table width="180" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="26" align="center" background="images/index_01.gif">::产品搜索::</td>
              </tr>
              <tr> 
                <td align="center"><table width="156" border="0" align="center" cellpadding="0" cellspacing="0">
                    <form name="form1" method="post" action="search.asp">
                      <tr> 
                        <td width="58" height="8" align="right"></td>
                        <td width="98" height="8"></td>
                      </tr>
                      <tr> 
                        <td width="58" height="26" align="right">分　类：</td>
                        <td width="98" height="26"> <select name="class" id="select2" style="width:80px">
                            <%
								'开始输出分类
								strSQL="Select * From web_product_class Where mn_id=" & strCurrMenu & " Order by c_index"
								Set rs=Server.CreateObject("ADODB.RecordSet")
								rs.open strSQL,conn,1,1
								for i=1 to rs.recordcount
								%>
                            
                            <option value="<%=rs("id")%>"><%=trim(rs("c_name"))%></option>
                            <%
									rs.movenext
								next
								%>
                            
                          </select> </td>
                      </tr>
                      <tr> 
                        <td height="26" align="right">关键字：</td>
                        <td height="26"> <input name="key" type="text" id="key4" size="14" maxlength="50" style="width:80px"> 
                        </td>
                      </tr>
                      <% if showPrice<>"none" then %>
                      
                      <tr> 
                        <td height="26" align="right">价　格：</td>
                        <td height="26"> <input name="price1" type="text" id="price1" size="2" maxlength="5" style="width:30px">
                          到 
                          <input name="price2" type="text" id="price2" size="2" style="width:30px"> 
                        </td>
                      </tr>
                      <%end if%>
                      
                      <tr align="left"> 
                        <td height="30" colspan="2"> <table width="156" height="40" border="0" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td width="117" height="40" align="right"> <input type="submit" name="Submit" value="开始搜索"></td>
                              <td width="39" height="40" valign="bottom">&nbsp;&nbsp;</td>
                            </tr>
                          </table></td>
                      </tr>
                    </form>
                  </table></td>
              </tr>
            </table>
            <table width="180" height="239" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="26" align="center" background="images/index_01.gif">::热销产品::</td>
              </tr>
              <tr> 
                <td height="180" align="center"> <p><img src="images/cp.gif" width="110" height="83" border="1"></p>
                  <p><img src="images/cp.gif" width="110" height="83" border="1"></p></td>
              </tr>
            </table></td>
          <td align="center" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              
              <tr> 
                <td align="center"><img src=IMAGES/banner.gif ></td>
              </tr>
            </table>
             
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td><img src="images/go.gif" width="22" height="19" hspace="10" align="absmiddle"><strong>新闻动态</strong></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table>
            <%
strCurrMenu="15490"
ThisPage=request.ServerVariables("URL")
strQuery=""
strTitle="所有新闻"
if GetVariable("class")<>"" then
	strQuery=strQuery & " And nClass=" & GetVariable("class")
	strTitle=GetVariable("classname")
end if

if GetVariable("key")<>"" then
	strQuery=strQuery & " And (nTitle Like '%" & GetVariable("key") & "%' or nHtmlText like '%" & GetVariable("key") & "%' or nKey like '%" & GetVariable("key") & "%') "
	strTitle="搜索：" & GetVariable("key")
end if

'从这开始读数据
strSQL="Select * From web_news Where nAudit<>0 " & strQuery & " And mn_id=" & strCurrMenu & " Order by ID Desc"
set rs=server.CreateObject("ADODB.RecordSet")
rs.open strSQL,conn,1,1
'分页显示初始化
page=GetVariable("page")
if page="" then
	page=1
else
	page=Cint(page)
end if

Section=GetVariable("section")
if Section="" then
	Section=1
else
	Section=Cint(Section)
end if
'变量赋值
intPageSize=15		'每页显示记录数
intSectionSize=5		'多少页为一段，像GOOGLE一样
PrevSectionText="<FONT face=webdings>7</FONT>"		'上一段的链接文字
NextSectionText="<FONT face=webdings>8</FONT>"		'下一段的链接文字
PrevPageText="<FONT face=webdings>3</FONT>"			'上页的链接文字	
NextPageText="<FONT face=webdings>4</FONT>"			'下页的链接文字

strPageUrl="?class=" & GetVariable("class") & "&classname=" & GetVariable("classname") & "&key=" & GetVariable("key") & "&mnid=" & strCurrMenu

rs.pagesize=intPageSize
intCount=rs.RecordCount 
intPageCount=rs.pagecount
intSectionCount=(intPageCount - 1) \ intSectionSize + 1
if intCount>0 then
	rs.AbsolutePage=page 
end if 
%>
            <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td height="25"><strong><%=strTitle%>: 共<%=intCount%>个结果</strong></td>
              </tr>
              <tr> 
                <td><TABLE width="90%" 
                          border=0 align="center" cellPadding=0 cellSpacing=0>
                    <TBODY>
                      <TR> 
                        <TD><TABLE cellSpacing=0 cellPadding=0 width="100%" 
                          border=0>
                            <TBODY>
                              <TR> 
                                <TD width="65%" height="25"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
                                    <%
										  '开始输出最新新闻
										   for i=1 to intPageSize
												if rs.eof then exit For
												if i mod 2 =0 then
													strColor="#FFFFFF"
												else
													strColor="#F9F9F9"
												end if
										  %>
                                    <tr> 
                                      <td width="10%" height="22" align="right">· 
                                      </td>
                                      <td width="90%" height="22"><a href="newshow.asp?id=<%=trim(rs("ID"))%>&mnid=<%=strCurrMenu%>&classname=新闻动态&uppage=<%=ThisPage%>" target="_blank"><%=trim(rs("nTitle"))%></a></td>
                                    </tr>
                                    <%
											rs.movenext
										next
										%>
                                  </table></TD>
                              </TR>
                              <TR> 
                                <TD height="25">&nbsp;</TD>
                              </TR>
                            </TBODY>
                          </TABLE></TD>
                      </TR>
                    </TBODY>
                  </TABLE>
                  <br> <table width="92%" border="0" align="center">
                    <tr> 
                      <td></td>
                    </tr>
                    <tr> 
                      <td height="28" align="right" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td align="right"> 共有<%=intCount%>记录，分<%=intPageCount%>页，当前页<%=Page%>，每页显示<%=intPageSize%>条记录 
                              <%
			'计算每一段的开始页
			intStarPage=(Section-2) * intSectionSize + 1
			'前一段
			if Section<=1 then
				response.Write(PrevSectionText & " ")
			else
				response.Write("<a href='" & strPageUrl & "&page=" & intStarPage & "&section=" & Section-1 & "'>" & PrevSectionText & "</a> ")
			end if 
			
			'显示页码列表
			response.Write("第")
			intStarPage=(Section-1) * intSectionSize + 1
		    for p=intStarPage to intStarPage + intSectionSize - 1
				if p > intPageCount then exit for
				if p=page then
		    		response.Write("<strong>[" & p & "]</strong> ")
				else
		    		response.Write("<a href='" & strPageUrl & "&page=" & p & "&section=" & Section & "'>[" & p & "]</a> ")
				end if	
		    next
			response.Write("页")
			'后一段
			intStarPage=(Section) * intSectionSize + 1
			if Section>=intSectionCount then
				response.Write(" " & NextSectionText)
			else
				response.Write(" <a href='" & strPageUrl & "&page=" & intStarPage & "&section=" & Section+1 & "'>" & NextSectionText & "</a> ")
			end if 
		  %>
                              　 </td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr> 
                      <td height="23" align="right" >&nbsp;</td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td>&nbsp;</td>
              </tr>
            </table>
            <p><br>
            </p>
            </td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="3" bgcolor="#0D9DE3"></td>
  </tr>
</table>
<table width="760" border="0" align="center" cellpadding="8" cellspacing="0">
  <tr> 
    <td align="center" bgcolor="F3F3F3">公司地址：未知<br>电话： E-Mail:zfadshu@cn9sky.com<br>Copyright&copy;2005-2006 dddddd All Rights Reserved.<br><br>
      您是本站第 
      <script language="JavaScript" src="admin/count/counter.asp"></script>
      位访问者&nbsp;</td>
  </tr>
</table>
<script language="JavaScript" src="common/init.js"></script><br><script language=Javascript src="common/tranbig5.Js"></script>
</body>
</html>



