<!--#include file="conn.asp"--><%seo_title="Search:"&request("hw_name")&"-"&sitename%>
<!--#include file="IncAsp/WrzcNethtml_top.asp"-->
<div align="center">
<table cellpadding="0" cellspacing="0" class="all_t1">
<tr><td class="all_l_td" valign="top">
<!--#include file="IncAsp/WrzcNethtml_log.asp"--><div class="d5"></div><!--#include file="IncAsp/WrzcNethtml_sort.asp"--><div class="d5"></div>
</td>
<td valign="top" class="all_c_td">
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<%
if request("action")="search" then
showp="search.asp?action=search"
order=request("order")
page=request("page")
orderx=getorder(order)
page=getpage(page)

hw_name=request("hw_name")


if hw_name<>"" then
	hwn=split(hw_name," ")
	sera=sera&" and ( (1=1 "
	for i=0 to ubound(hwn)
	hwna=trim(hwn(i))
	if hwna<>" " and hwna<>"" then
	sera=sera&" and hw_name like '%"&hwna&"%'"
	end if
	next
	sera=sera&" )"
	
	if searchsn=1 then
		sera=sera&" or (1=1"
		for i=0 to ubound(hwn)
		hwna=trim(hwn(i))
		if hwna<>" " and hwna<>"" then
		sera=sera&" and hw_sn like '%"&hwna&"%'"
		end if
		next
		sera=sera&" )"
	end if
	
	if searchc1=1 then
		sera=sera&" or (1=1"
		for i=0 to ubound(hwn)
		hwna=trim(hwn(i))
		if hwna<>" " and hwna<>"" then
		sera=sera&" and hw_content like '%"&hwna&"%'"
		end if
		next
		sera=sera&" )"
	end if
	
	if searchc2=1 then
		sera=sera&" or (1=1"
		for i=0 to ubound(hwn)
		hwna=trim(hwn(i))
		if hwna<>" " and hwna<>"" then
		sera=sera&" and hw_content2 like '%"&hwna&"%'"
		end if
		next
		sera=sera&" )"
	end if
	
	if searchk=1 then
		sera=sera&" or (1=1"
		for i=0 to ubound(hwn)
		hwna=trim(hwn(i))
		if hwna<>" " and hwna<>"" then
		sera=sera&" and hw_keyword like '%"&hwna&"%'"
		end if
		next
		sera=sera&" )"
	end if
	sera=sera&" or (1=2) )"
	showp=showp&"&hw_name="&hw_name
end if

price1=DelStr(request("price1"))
if price1="" or not(isnumeric(price1)) then price1=0
price2=DelStr(request("price2"))
if price2="" or not(isnumeric(price2)) then price2=1000000000
showp=showp&"&price1="&price1
showp=showp&"&price2="&price2

if request("pagec")="" or Not(isNumeric(request("pagec"))) then
   pagec=25
else
   pagec=DelStr(request("pagec"))
end if
showp=showp&"&pagec="&pagec

sort_id=Request("sort_id")
if sort_id="" then sort_id=0
if not(isnumeric(sort_id)) then sort_id=0
if sort_id<1 then sort_id=0
sort_id=int(sort_id)
if sort_id<>0 then
chkid(sort_id)
sera=sera&" and sort_id=" & sort_id & ""
showp=showp&"&sort_id="&sort_id
end if

nsort_id=Request("nsort_id")
if nsort_id="" then nsort_id=0
if not(isnumeric(nsort_id)) then nsort_id=0
if nsort_id<1 then nsort_id=0
nsort_id=int(nsort_id)
if nsort_id<>0 then
chkid(nsort_id)
sera=sera&" and nsort_id=" & nsort_id & ""
end if

pinpai=request("pinpai")
if pinpai<>"" and pinpai<>0 then
chkid(pinpai)
sera=sera&" and pinpai_id=" & pinpai & ""
showp=showp&"&pinpai="&pinpai
end if
set rs=server.createobject("adodb.recordset")
sql="select hw_id,hw_name,hw_price1,hw_price2,hw_pic,hw_content from WrzcNethtml_hw where hw_price2>="&price1&" and hw_price2<="&price2&" " &sera&"  order by "&orderx&""
rs.open sql,conn,1,1
if rs.eof then%><tr><td align="center" height="30">No Data</td></tr><%else
rs.pagesize=pagec
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
rs.cachesize=rs.pagesize

if request.form("hw_name")<>"" then
set rss=server.createobject("adodb.recordset")
sql="select * from WrzcNethtml_search where search_name='"&hw_name&"'"
rss.open sql,conn,1,3
if rss.eof then
rss.addnew
rss("search_name")=hw_name
rss("hits")=1
else
rss("hits")=rss("hits")+1
end if
rss.update
rss.close
set rss=nothing
end if
%>                
<tr><td class="sort">&nbsp;<IMG src="Skin/<%=WrzcNethtml_skin%>/home.gif" border=0 align="absmiddle">   
	<a href="index.html">Home</a> >>&nbsp;Search&nbsp;(Total:<%=totalrec%>,The page show:<%=(page-1)*rs.pagesize+1%>-<%if page+1<=totalpage then%><%=page*rs.pagesize%><%else%><%=totalrec%><%end if%>)</td></tr>
<tr><td height=30>
<%
if sort_id=0 then
response.write "<b>Categories:</b>"
set rss=conn.execute("select sort_id from WrzcNethtml_hw where hw_price2>="&price1&" and hw_price2<="&price2&" " &sera&" group by sort_id order by count(sort_id) desc")
do while not rss.eof
response.write "<a href="""&showp&"&sort_id="&rss("sort_id")&"&order="&order&"&lookt="&lookt&""">"
response.write conn.execute("select sort_name from WrzcNethtml_sort where sort_id="&rss("sort_id")&"")(0)&"("&conn.execute("select count(*) from WrzcNethtml_hw where hw_price2>="&price1&" and hw_price2<="&price2&" " &sera&"")(0)&")</a>&nbsp;&nbsp;"
rss.movenext
loop
rss.close
set rss=nothing
else
response.write "<b>Categories:</b>"
set rss=conn.execute("select nsort_id from WrzcNethtml_hw where hw_price2>="&price1&" and hw_price2<="&price2&" " &sera&" group by nsort_id order by count(nsort_id) desc")
do while not rss.eof
if rss("nsort_id")<>0 then
response.write "<a href="""&showp&"&nsort_id="&rss("nsort_id")&"&order="&order&"&lookt="&lookt&""">"
response.write conn.execute("select nsort_name from WrzcNethtml_nsort where nsort_id="&rss("nsort_id")&"")(0)&"("&conn.execute("select count(*) from WrzcNethtml_hw where hw_price2>="&price1&" and hw_price2<="&price2&" " &sera&"")(0)&")</a>&nbsp;&nbsp;"
end if
rss.movenext
loop
rss.close
set rss=nothing
end if
%>
</td></tr>
<tr><td id="sorta">
<!--#include file="IncAsp/WrzcNethtml_ins.asp"-->
<table width="100%" border="0" cellpadding="0" cellspacing="0">



<table width="100%" border="0" cellpadding="0" cellspacing="0"><form action=<%=showp%> method=post>
<tr><td id="page"> 
<%
if page<=pagecc then
spage=1
else
spage=page-pagecc
end if
if page>=totalpage-pagecc then
lpage=totalpage
else
lpage=page+pagecc
end if
%>
Page:<%=page%>/Total:<%=totalpage%>&nbsp;&nbsp;
Go to page:<input type="text" name="page" value="<%=page+1%>" size="2" style="text-align: center"><input type="submit" value=" GO "><br>
<a href="<%=showp%>&page=1" class="page_h"></a>
<%if page-1>0 then%><a href="<%=showp%>&page=<%=page-1%>" class="page_p"></a><%else%><span class="page_p0"></span><%end if%>
<%for i=spage to lpage
if i=page then%><span class="page_a0"><%=i%></span>
<%else%><a href="<%=showp%>&page=<%=i%>" class="page_a"><%=i%></a><%end if
next%>
<%if page+1<=totalpage then%> <a href="<%=showp%>&page=<%=page+1%>" class="page_n"></a><%else%><span class="page_n0"></span><%end if%>
<a href="<%=showp%>&page=<%=totalpage%>" class="page_l"></a>
</td></tr></form></table>



</td></tr>
<%end if%><%
rs.close
set rs=nothing
end if%></table>
<br>
<div align="center">
<table width="581" border="0" cellpadding="0" cellspacing="0"><form method="POST" action="search.asp?action=search">
<tr><td height="41"><img border="0" src="img/s-0.gif"></td></tr>
<tr><td background="img/s-1.gif" align="left">
<table border="0" cellpadding="5" cellspacing="0" width="90%">
<tr><td align="right" width="100">Keyword:</td>
<td width="200"><input type="text" name="hw_name" size="20" class=input value="<%=request("hw_name")%>"></td>
</tr>
<tr><td align="right" width="100">Categories:</td><td width="423"><%set rs=server.createobject("adodb.recordset")
rs.open "select sort_id,sort_name from WrzcNethtml_sort order by sort_id DESC",conn,1,1%>
<select name="sort_id"><option value="0">All Categories</option>
<%do while not rs.eof%>
<option value="<%=rs("sort_id")%>"<%if int(request("sort_id"))=rs("sort_id") then%> selected<%end if%>><%=rs("sort_name")%></option>
<%rs.movenext
loop
rs.close
set rs=nothing%></select></td></tr>
<tr><td align="right" width="100">Brand:</td>
<td width="423"><select name="pinpai">
<option value="0">All</option>
<%set rs=server.createobject("adodb.recordset")
rs.open "select pinpai_id,pinpai_name from WrzcNethtml_pinpai order by pinpai_id DESC",conn,1,1%><%do while not rs.eof%>
<option value="<%=rs("pinpai_id")%>"<%if int(request("pinpai"))=rs("pinpai_id") then%> selected<%end if%>><%=rs("pinpai_name")%></option>
<%rs.movenext
loop
rs.close
set rs=nothing%></select></td></tr>
<tr>
	<td align="right" width="100">Price:</td><td width="423">
<input type="text" name="price1" size="3" class=input value="<%=request("price1")%>"> -
<input type="text" name="price2" size="3" class=input value="<%=request("price2")%>"></td>
</tr>
<tr><td align="right" width="100">Hot Keywords:</td><td width="423"><%getsearch 10,10,null%></td></tr>
</table></td></tr>
<tr><td height="86"><img border="0" src="img/s-2.gif"></td></tr>
<tr><td align="left" background="img/s-1.gif"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td height="30" width="100" align="right">Per Page Count:</td><td height="30" width="423"><select size="1" name="pagec">
<option>10</option>
<option selected>25</option>
<option>50</option>
<option>100</option></select></td></tr>
<tr><td width="100" height="30"></td><td height="30" width="423"><input type="submit" value="Submit" style="height:23;width:107"></td></tr>
</table></td></tr>
<tr><td height="17"><img border="0" src="img/s-3.gif" width="581" height="17"></td></tr></form>
</table></div>
	</td></tr></table></div><!--#include file="IncAsp/WrzcNethtml_copy.asp"-->