<!--#include file="admin_start.asp" -->

<body topmargin="30" marginwidth="10" marginheight="10">
<div id=search_open style='display:none'>
<table cellspacing=3 cellpadding=3 width=98% bgcolor='#f7f7f7' align=center style='border:1px dashed #b7b7b7 '>
<form name=search_goods method=get action='admin_goods_list.asp'>	
<tr>
	<td valign='middle' align=right width=10% >商品名称:</td>
	<td valign='middle' align=left width=40% >
	<input size=45 name=goods_name value='<%=request("goods_name")%>' >
	</td>
	<td valign='middle' align=right width=10% >所属分类:</td>
	<td  valign='middle' align=left width=40% >
	<select name=sort_id >
	<%
	ti=timer
	dim s
	set s=MySys.temp.search
	if request("sort_id")="" then
	s.list_Sort "", "jins_goods_sort",0,"根目录|0"
	else
	s.list_Sort "", "jins_goods_sort",0,"根目录|"&request("sort_id")
	end if
	response.write s.sort_list
	set s=nothing
	%>
	</select>
	<%'response.write timer-ti%>
	</td>
</tr>
<tr>
	<td  valign='middle' align=right width=10% >上市日期:</td>
	<td  valign='middle' align=left width=40% >
	 从 
	<input size=18 name=goods_publishtime_s value='<%=request("goods_publishtime_s")%>' > 
	 到 
	<input size=18 name=goods_publishtime_e value='<%if request("goods_publishtime_e")<>"" then response.write request("goods_publishtime_e") else response.write now() %>' > 
	 </td>
	<td  valign='middle' align=right width=10% >加入时间:</td>
	<td  valign='middle' align=left width=40% >
	 从 
	<input size=18 name=goods_addtime_s value='<%=request("goods_addtime_s")%>' > 
	 到 
	<input size=18 name=goods_addtime_e value='<%if request("goods_addtime_e")<>"" then response.write request("goods_addtime_e") else response.write now() %>' > 
	 </td>
</tr>
<tr>
	<td  valign='middle' align=right width=10% >商品库存:</td>
	<td  valign='middle' align=left width=40% >
	 从 
	<input size=18 name=goods_stocks_s value='<%=request("goods_stocks_s")%>' > 
	 到 
	<input size=18 name=goods_stocks_e value='<%=request("goods_stocks_e")%>' > 
	 </td>
	<td valign='middle' align=right width=10% >销 售 量:</td>
	<td valign='middle' align=left width=40% >
	 从 
	<input size=18 name=goods_sellnum_s value='<%=request("goods_sellnum_s")%>' > 
	 到 
	<input size=18 name=goods_sellnum_e value='<%=request("goods_sellnum_e")%>' > 
	 </td>
</tr>
<tr>
	<td  valign='middle' align=right width=10% >是否打开:</td>
	<td  valign='middle' align=left width=15% >
	<select name=goods_open >
	<option value='' <%if request("goods_open")="" then response.write "selected"%>>随便</option>
	<option value=1 <%if request("goods_open")="1" then response.write "selected"%>>打开</option>
	<option value=0 <%if request("goods_open")="0" then response.write "selected"%>>关闭</option>
	</select>
	 | 是否推荐:
	<select name=goods_commend >
	<option value='' <%if request("goods_commend")="" then response.write "selected"%>>随便</option>
	<option value=1 <%if request("goods_commend")="1" then response.write "selected"%>>是</option>
	<option value=0 <%if request("goods_commend")="0" then response.write "selected"%>>否</option>
	</select>
	</td>
	<td  valign='middle' align=right width=10% >是否新品:</td>
	<td  valign='middle' align=left width=15% >
	<select name=goods_new >
	<option value='' <%if request("goods_new")="" then response.write "selected"%>>随便</option>
	<option value=1 <%if request("goods_new")="1" then response.write "selected"%>>是</option>
	<option value=0 <%if request("goods_new")="0" then response.write "selected"%>>否</option>
	</select>
     | 是否特价:
	<select name=goods_special >
	<option value='' <%if request("goods_special")="" then response.write "selected"%>>随便</option>
	<option value=1 <%if request("goods_special")="1" then response.write "selected"%>>是</option>
	<option value=0 <%if request("goods_special")="0" then response.write "selected"%>>否</option>
	</select>
	</td>
</tr>
<tr>
<td height='1' width='100%' colspan='10' background='images/dot03.gif'></td>
</tr>
<%
ii=0
set rs_t=conn.execute("select sort_description,sort_name from jins_customer_sort order by sort_grade")
do while not rs_t.eof

if ii mod 2 = 0 then
%>
<tr>
<%
end if
%>
	<td valign='middle' align=right width=10% ><%=rs_t("sort_description")%>价:</td>
	<td valign='middle' align=left width=40% >
	 从 
	<input size=18 name=goods_price_<%=rs_t("sort_name")%>_s value='<%=request("goods_price_"&rs_t("sort_name")&"_s")%>' > 
	 到 
	<input size=18 name=goods_price_<%=rs_t("sort_description")%>_e value='<%=request("goods_price_"&rs_t("sort_name")&"_e")%>' > 
	 </td>
<%
ii=ii+1
if ii mod 2=0 then
%>
</tr>
<%
end if
n_s=n_s&"|4,goods_price_"&rs_t("sort_name")&",0"
rs_t.movenext
loop
set rs_t=nothing
%>
</tr>
<tr>
<td height='1' width='100%' colspan='10' background='images/dot03.gif'></td>
</tr>
<tr>
	<td  valign='middle' colspan=10 align=center width=100% >
	<input type=hidden  name=s_n value="0,goods_name,1|5,goods_addtime|5,goods_publishtime|1,goods_open,0|1,goods_commend,0|1,goods_special,0|1,goods_new,0|4,goods_stocks,0|4,goods_sellnum,0|6,sort_id,0<%=n_s%>" >
	<input type=image align=absmiddle border=0 src='Images/search.jpg'  alt='开始搜索！！'  hspace='3' ></td>
</tr>
</form>
</table>
<br>
</div>
<%
price_name=request("price_name")
if price_name="" then 
price_name="mart"
price_description="市场"
end if

set rs_t=conn.execute("select sort_description from jins_customer_sort where sort_name='"&price_name&"' ")
if not rs_t.eof then price_description=rs_t("sort_description")
set rs_t=nothing

c_order="商品名称$goods_name|加入日期$goods_addtime|发布日期$goods_publishtime|商品"&price_description&"价格$goods_price_"&price_name&"|是否开放$goods_open|是否推荐$goods_commend|是否特价$goods_special|是否新品$goods_new|商品库存$goods_stocks|销售量$goods_sellnum|人气$goods_clicknum,升序$|降序$desc"

c_h="<form name=jins_goods_list action='admin_goods_list_handle.asp' method=post>"
c_h=c_h+"<table cellspacing=0 cellpadding=0 align=center width=100% bgcolor=#F7F7F7 style='border-top: 1px solid #EBEBEB; '>"
c_h=c_h+"<tr>"
c_h=c_h+"<td height=30 width='5%' align=center>选择</td>"
c_h=c_h+"<td height=30 width='23%' align=left>商品名称</td>"
c_h=c_h+"<td height=30 width='15%' align=left>"
'response.write MySys.url_request
'response.end
c_h=c_h+"<select name=price_name onchange=""javacsript:window.location='admin_goods_list.asp?"&replace(MySys.url_request,"&price_name="&price_name,"")&"&price_name='+document.jins_goods_list.price_name.value;"">"
c_h=c_h+"<option value='mart' >市场价</option>"

set rs_t=conn.execute("select sort_description,sort_name from jins_customer_sort order by sort_grade")
do while not rs_t.eof
c_h=c_h+"<option value='"&rs_t("sort_name")&"' "
if rs_t("sort_name")=price_name then c_h=c_h+" selected "
c_h=c_h+"> "&rs_t("sort_description") &"价</option>"
rs_t.movenext
loop
set rs_t=nothing

c_h=c_h+"</select>"
c_h=c_h+"</td>"
c_h=c_h+"<td height=30 width='15%' align=center>加入日期</td>"
c_h=c_h+"<td height=30 width='10%' align=center>开关</td>"
c_h=c_h+"<td height=30 width='4%' align=center>特价</td>"
c_h=c_h+"<td height=30 width='4%' align=center>新品</td>"
c_h=c_h+"<td height=30 width='4%' align=center>推荐</td>"
c_h=c_h+"<td height=30 width='5%' align=center>销售量</td>"
c_h=c_h+"<td height=30 width='10%' align=center>操作</td>"
c_h=c_h+"<td height=30 width='5%' align=center>删除</td>"
c_h=c_h+"</tr>"
c_h=c_h+"<tr>"
c_h=c_h+"<td height='1' width='100%' colspan='10' background='images/dot03.gif'></td>"
c_h=c_h+"</tr>"
c_h=c_h+"</table>"

c="<table cellspacing=0 cellpadding=0 width=100% align=center >"
c=c+"<tr onmouseover=""this.style.background='#ebebeb';"" onmouseout=""this.style.background='#ffffff';"">"
c=c+"<td height=30  width='5%' align=center>"
c=c+"<input type=checkbox name=ids value='$$goods_id$$'> "
c=c+"</td>"

c=c+"<td height=30  width='23%' align=left >"
'c=c+"<a title='[$$goods_name$$] > 点击进行详细设置！' href='admin_goods_edit.asp?id=$$goods_id$$'>"
c=c+"<input name=goods_name_$$goods_id$$ type=text value='$$goods_name$$' size=25>"
'c=c+"</a>"
c=c+"</td>"

c=c+"<td height=30  width='15%' align=left><font color=red style='font-size:10pt'>"&MySys.info.unit_money(1)
c=c+" <input name=goods_price_"&price_name&"_$$goods_id$$ type=text value='$$goods_price_"&price_name&"$$' size=10>"
c=c+"</font></td>"

c=c+"<td height=30  width='15%' align=center>"
c=c+"$$goods_addtime$$"
c=c+"</td>"

c=c+"<td height=30  width='10%' align=center>"
c=c+"<select name=goods_open_$$goods_id$$ >"
c=c+"<option value=1 <%if $$goods_open$$=1 then response.write ""selected""%\> >打开</option>"
c=c+"<option value=0 <%if $$goods_open$$=0 then response.write ""selected""%\> >关闭</option>"
c=c+"</select>"
c=c+"</td>"

c=c+"<td height=30  width='4%' align=center>"
c=c+"<input name=goods_special_$$goods_id$$ type=checkbox value='1' <%if $$goods_special$$=1 then response.write ""checked""%\> >"
c=c+"</td>"

c=c+"<td height=30  width='4%' align=center>"
c=c+"<input name=goods_new_$$goods_id$$ type=checkbox value='1' <%if $$goods_new$$=1 then response.write ""checked""%\> >"
c=c+"</td>"

c=c+"<td height=30  width='4%' align=center>"
c=c+"<input name=goods_commend_$$goods_id$$ type=checkbox value='1' <%if $$goods_commend$$=1 then response.write ""checked""%\> >"
c=c+"</td>"

c=c+"<td height=30  width='5%' align=center><font color=blue style='font-size:10pt'>"
c=c+"<a title='列出关于此商品的所有订单！' href='admin_user_customer_order_list.asp?s_n=1,goods_id,0&goods_id=$$goods_id$$' >$$goods_sellnum,,0$$</a>"
c=c+"</font></td>"

c=c+"<td height=30  width='10%' align=center>"
c=c+"<a title='商品详细设置！' href='admin_goods_edit.asp?id=$$goods_id$$'><img hspace=3 border='0' src='Images/icon07_o.gif' align='bottom' alt='商品详细设置！'></a>"
c=c+"<a title='查看相关评论！' href='admin_info_review_list.asp?s_n=3,id,0|6,sort_id,0&sort_id=1&id=$$goods_id$$'><img hspace=3 border='0' src='Images/007.gif' align='bottom' alt='查看相关评论！！'></a>"
c=c+"<a title='手动刷新对应的静态页面！' href='../admin_basic_cache_refresh_handle.asp?tr=goods|detail&id=$$goods_id$$'><img hspace=0 border='0' src='Images/refresh2.gif' align='bottom' alt='手动刷新对应的静态页面！'></a>"
c=c+"</td>"
		
c=c+"<td height=30 width='5%' align=center>"
c=c+"<a title='点击删除此项！' href='admin_goods_edit_handle.asp?action=delete&ids=$$goods_id$$'>"
c=c+"<img border='0' src='Images/delete.gif' align='bottom' alt='点击删除此项！'></a>"
c=c+"</td></tr>"
c=c+"<tr>"
c=c+"<td height='1' width='100%' colspan='20' background='images/dot03.gif'></td>"
c=c+"</tr>"
c=c+"</table>"
dim ins(2)
dim sql

sql=MySys.search(trim(request("s_n")))

if sql<>"" then sql=" where 1=1 "&sql
'response.write sql
'response.end
MySys.ListThings c_order,c_h,c,sql,"jins_goods_list","goods_id",ins
%>
<!--#include file="admin_end.asp" -->