<!--#include file="conn.asp"-->
<!--#include file="ad_chk.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=inc/css.css rel=STYLESHEET type=text/css>
<body topmargin="5" leftmargin="5" rightmargin="5" bottommargin="5">
<%
if Request.Cookies("WrzcNet")("admin_class")<>0 and Request.Cookies("WrzcNet")("admin_class")<>1 then
response.write "你没有这个权限!"
response.end
end if
%>
<table border="0" cellspacing="0" cellpadding="5"><form method="POST" action="ad_delhwt.asp">
<tr><td align="right">搜索商品：</td>
<td align="center"><input type="text" name="hw_name" size="20"></td>
<td><input type="submit" value="搜索" name="B1"></td>
<td><b>商品配件：<font color="#FF0000">可实现买商品送配件、买商品加*元送配件等功能</font></b></td>
</tr></form></table>


<table border="0" cellpadding="0" width="100%" cellspacing="0" >
<tr><td width="130" valign="top" align="center"><SCRIPT language=javascript1.2 src="inc/menu.js"></SCRIPT>
<table border="0" cellspacing="0" cellpadding="5" class="st">
<tr><td align="center" class="sa"><font color="#000000"><b>商品分类</b></font></td></tr>
<%set rs=server.createobject("adodb.recordset")
sql="select * from WrzcNet_sort" 
rs.open sql,conn,1,1 
i=0
do while not rs.eof
i=i+1
id=rs("sort_id")%>
<tr><td class="s<%=i mod 2%>"><a href="ad_delhwt.asp?sort_id=<%=rs("sort_id")%>">
	<b><%=rs("sort_name")%></b></a><b>&nbsp;&nbsp;
<u><font color="#0000FF"><span  class="helpimg" onclick="menuclick(submenu<%=rs("sort_id")%>,bar<%=rs("sort_id")%>)" id=bar<%=rs("sort_id")%>>小类</span></font></u></b></td></tr>
<tr id=submenu<%=rs("sort_id")%> style="DISPLAY: none;"><td bgcolor="#F0F0F0">
<%set rs8=server.CreateObject("adodb.recordset")
rs8.open "select * from WrzcNet_nsort where sort_id="&id&"" ,conn,1,1
do while not rs8.eof and not rs8.bof%>
<p style="margin: 5px;"><a href="ad_delhwt.asp?nsort_id=<%=rs8("Nsort_id")%>"><%=rs8("Nsort_name")%></a>
<%rs8.movenext
loop
rs8.close
set rs8=nothing%>
</td></tr>
<%rs.movenext 
loop
rs.close
set rs=nothing%>
</table></td>
	<td width="5" valign="top" align="center">　</td>
<td valign="top">
<table border="0" cellspacing="0" cellpadding="5" class="st">
<tr><td align="center" height="23" class="sa">商品名称</td>
<td align="center" class="sa">价格</td>
<td align="center" class="sa">现有配件</td>
<td align="center" class="sa">管理</td>
</tr>
<%
page=request("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)
set rs=server.createobject("adodb.recordset")
if request("nsort_id")<>"" then
nsortid=request("nsort_id")
sql="select * from WrzcNet_hw where nsort_id=" + nsortid + " order by hw_id DESC"
elseif request("sort_id")<>"" then
sortid=request("sort_id")
sql="select * from WrzcNet_hw where sort_id=" + sortid + " order by hw_id DESC"
elseif request("hw_name")<>"" then
hwname=request("hw_name")
sql="select * from WrzcNet_hw where hw_name like '%"&hwname&"%' order by hw_id DESC"
elseif request("quehuo")="yes" then
sql="select * from WrzcNet_hw where hw_kucun<=0 order by hw_id DESC"
else
sql="select * from WrzcNet_hw order by hw_id DESC"
end if
rs.open sql,conn,1,1
if rs.eof then
response.write "<tr><td align=center bgcolor=ffffff height=30  colspan=10>没有商品</td></tr>"
response.end
else
rs.pagesize=20
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
i=0
do while not rs.eof and (i<rs.pagesize)
i=i+1%>
<tr><td height="23" class="s<%=i mod 2%>">&nbsp;<a href="ad_changehw.asp?hw_id=<%=rs("hw_id")%>"><%=rs("hw_name")%></a></td>
<td align="center" class="s<%=i mod 2%>"><%=rs("hw_price2")%></td>
<td align="center" class="s<%=i mod 2%>">

<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>
<%for ii=1 to 5
if rs("tao_name"&ii)<>"" then%><td width=20%>+<%=rs("tao_name"&ii)%>(<%=rs("tao_price"&ii)%>元)</td><%end if
next%></tr></table>

</td>
<td align="center" class="s<%=i mod 2%>"><a href="ad_tao.asp?hw_id=<%=rs("hw_id")%>">管理配件</a></td>
</tr>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing%>
<tr><td bgcolor="#FFFFFF" colspan="4">
<p style="line-height: 200%">

<table border="0" width="100%" cellspacing="0">
<form action=<%=filename%>?nsort_id=<%=request("nsort_id")%>&sort_id=<%=request("sort_id")%>&hw_name=<%=request("hw_name")%>&quehuo=<%=request("quehuo")%> method=post>
<tr><td height="30">共<font color=red><%=totalpage%></font>页&nbsp;第<%=page%>页&nbsp;
<%if page-1>0 then%><a href="ad_delhwt.asp?nsort_id=<%=request("nsort_id")%>&sort_id=<%=request("sort_id")%>&hw_name=<%=request("hw_name")%>&quehuo=<%=request("quehuo")%>&page=<%=page-1%>">上一页</a><%else%>上一页<%end if%>
&nbsp;
<%if page+1<=totalpage then%><a href="ad_delhwt.asp?nsort_id=<%=request("nsort_id")%>&sort_id=<%=request("sort_id")%>&hw_name=<%=request("hw_name")%>&quehuo=<%=request("quehuo")%>&page=<%=page+1%>">下一页</a><%else%>下一页<%end if%>
&nbsp;&nbsp;页面跳转：<input type="text" name="page" value="<%=page+1%>" size="1" style="text-align: center" class=input><input type="submit" value="GO" class=input>
</td></tr></form></table>


</td></tr></table><!--#include file="ad_bottom.asp"-->