<!--#include file="conn.asp"-->
<!--#include file="inc/exportProvice.asp"-->

<%
page=request.QueryString("page")
if page="" or isnumeric(page)=false then page=1

type1 = request.QueryString("type1")
zhi   = request.QueryString("zhi")
zhi1  = request.QueryString("zhi1")
zhi2  = request.QueryString("zhi2")

sql = ""

if type1 = "nianfen" then
	sql = "select * from product where ("& cint(year(date())) &" - cint(caryear) <= "& zhi &" and fabu=1 and fa_chuqiu='出售') order by id desc"
elseif type1 = "jiage" then
	sql = "select * from product where (memberPrice >= "& zhi1 &" and memberPrice <= "& zhi2 &" and fabu=1 and fa_chuqiu='出售') order by id desc"
elseif type1 = "chexing" then
	sql = "select * from product where(leibie like '%"& zhi &"%' and fabu=1 and fa_chuqiu='出售') order by id desc"
elseif type1 = "pinpai" then
	sql = "select * from product where(soukey like '%"& zhi &"%' and fabu=1 and fa_chuqiu='出售') order by id desc"
else
	sql = "select * from product where(fabu=1 and fa_chuqiu='出售') order by id desc"
end if

rs.open sql,conn,1,1
page_size = 10
if not rs.eof then
	have = 1
	rs.pagesize     = page_size
	rs.absolutePage = page
	recordCountNum  = rs.recordcount
else
	have = 0
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>搜索结果</title>
<link href="css/comm.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="inc/showo_page.js"></script>
<script type="text/javascript" src="js/city.js"></script>
</head>

<body>
<div class="bodyDiv">
<!--#include file="model_top.asp"-->
<!--#include file="model_daohang.asp"-->
    <table width="100%" height="176" border="0" cellpadding="0" cellspacing="0" background="images/searchbg.jpg">
      <tr>
        <td valign="top">
		  <table width="784" height="48" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><!--#include file="model_searchH.asp"--></td>
            </tr>
          </table>
        <%
		dim i
		i = 1
		do while not rs.eof and i <=page_size
		%>
		<br />
        <table width="723" height="125" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td valign="top">
            <div style="line-height:30px;">
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><img align="absmiddle" src="images/search1.jpg" width="13" height="13" />&nbsp;<%=exportpinp(rs("productSort"),"pinpaiandxinghao")%>&nbsp;<%=rs("fa_chuqiu")%></td>
                  </tr>
              </table>
            </div>
            
            <table width="100%" border="0" cellspacing="0" cellpadding="0" style="color:#696969;">
              <tr>
                <td width="21%" rowspan="4"><a href="view2Car.asp?id=<%=rs("id")%>" target="_blank"><img src="<%if rs("smallImg")="nothing" then response.write "img/car1.gif" else response.write rs("smallImg")%>" width="134" height="70" border="0" /></a></td>
                <td width="31%" height="20">购买日期：<%=rs("caryear")%>年<%=rs("carmonth")%>月</td>
                <td width="24%">发布类型：<%=rs("fa_class")%></td>
                <td width="24%">&nbsp;</td>
              </tr>
              <tr>
                <td height="20">期望价格：<%if rs("memberprice")="0" then response.write "价格面议"	else response.write rs("memberPrice")%></td>
                <td width="24%">&nbsp;</td>
                <td width="24%">&nbsp;</td>
              </tr>
              <tr>
                <td height="20">联系信息：<%=rs("sell_name")&"&nbsp;&nbsp;"&rs("tel")%></td>
                <td width="24%">&nbsp;</td>
                <td width="24%">&nbsp;</td>
              </tr>
              <tr>
                <td height="20">登记时间：<%=FormatTime(rs("fa_time"),4)%></td>
                <td width="24%">点击数量：<%=rs("hitnum")%></td>
                <td width="24%" class="moren"><a href="view2Car.asp?id=<%=rs("id")%>" target="_blank"><strong>【查看详情】</strong></a></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="15"><img src="images/search2.jpg" width="695" height="3" /></td>
          </tr>
        </table>
        <%
		i = i + 1

		rs.movenext
		loop
		rs.close
		
		if have = 1 then
		%>
          <table width="723" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><Script Language="JavaScript">
ShowoPage("<table style='BORDER-COLLAPSE: collapse' borderColor='#111111' height='10' cellSpacing='0' cellPadding='0' width='95%' border='0'><tr><td vAlign='bottom'  style='font-family: Verdana,宋体; font-size: 11.5px; line-height: 15px'>","</td></tr></table>","页次:<font color='red'>","</font>/","","&nbsp;","&nbsp;每页<font color='red'>","</font>&nbsp;","&nbsp;共计:<font color='red'>","</font></td><td vAlign='bottom' align='right'  style='font-family: Verdana,宋体; font-size: 11.5px; line-height: 15px'>","<font face=webdings>9</font>","<font face=webdings>7</font>","<font face=webdings>8</font>","<font face=webdings>:</font>","&nbsp;&nbsp;跳转:","<font color='orange'>[","]</font>","","","<font color='red'>","</font>","","",<%=recordCountNum%>,<%=page_size%>,4,"?p=parm1&<%=prm%>")
</Script></td>
            </tr>
          </table>
          <%
		  else
		  	response.write "<center>未搜索到任何符合要求的信息！</center>"
		  end if%><br />
        </td>
      </tr>
    </table>
	
<!--#include file="model_bottom.asp"-->
</div>
</body>
</html>
<%
'====================================
'功能：获得厂家或品牌
function getpinxing(type1)
	dim tmp_arr
	tmp_arr = split(type1&"",",")
	
	if type1 = "厂家" then
		getpinxing = tmp_arr(1)
	elseif type1 = "品牌" then
		getpinxing = tmp_arr(2)
	end if
end function
%>