📄 research.asp
字号:
<!--网站头文件-->
<!--#include file="byshop_conn.asp"-->
<!--#include file="webhead.asp"-->
<title>信息搜索结果-<%=webname%></title>
<SCRIPT language=javaScript>
<!--
function mOvr(src,clrOver){
if (!src.contains(event.fromElement)) {
src.style.cursor = 'hand';
src.bgColor = clrOver;
}
}
function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.style.cursor = 'default';
src.bgColor = clrIn;
}
}
//-->
</SCRIPT>
<div align="center">
<table border="0" width="779" id="table2" cellspacing="0" cellpadding="0">
<tr>
<td>
搜索条件:<%
dim byshop_9
byshop_9=1
cartype1=request("mytype")
if cartype1 <>"" then
tj1="and cartype like "&cartype1
else
tj1=""
end if
if tj1<>"" then
response.write " 条件"&byshop_9&" "
byshop_9=byshop_9+1
response.write "汽车分类:"
if cartype1=1 then
response.write "<font color='#FF0000'>轿车</font>"
end if
if cartype1=2 then
response.write "<font color='#FF0000'>跑车</font>"
end if
if cartype1=3 then
response.write "<font color='#FF0000'>SUV及越野车</font>"
end if
if cartype1=4 then
response.write "<font color='#FF0000'>面包车</font>"
end if
if cartype1=5 then
response.write "<font color='#FF0000'>箱形车</font>"
end if
if cartype1=6 then
response.write "<font color='#FF0000'>概念车</font>"
end if
if cartype1=7 then
response.write "<font color='#FF0000'>客车</font>"
end if
if cartype1=8 then
response.write "<font color='#FF0000'>货车</font>"
end if
if cartype1=9 then
response.write "<font color='#FF0000'>摩托车</font>"
end if
if cartype1=10 then
response.write "<font color='#FF0000'>电动自行车</font>"
end if
if cartype1=11 then
response.write "<font color='#FF0000'>其它车型</font>"
end if
end if
anclass1=request("anclass")
if anclass1<>"" then
tj2="and anclass ="&anclass1
else
tj2=""
end if
if tj2<>"" then
response.write " 条件"&byshop_9&" "
byshop_9=byshop_9+1
response.write "汽车属地:"
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from anclass where anclassid="&anclass1,conn,1,1
if rs2.recordcount>0 then
response.write "<font color='#FF0000'>"&rs2("anclass")&"</font>"
end if
rs2.close
end if
nclass1=trim(request("nclass"))
if nclass1<>"" then
tj3="and nclass="&nclass1
else
tj3=""
end if
if tj3<>"" then
response.write " 条件"&byshop_9&" "
byshop_9=byshop_9+1
response.write "汽车品牌:"
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from nclass where nclassid="&nclass1,conn,1,1
if rs2.recordcount>0 then
response.write "<font color='#FF0000'>"&rs2("nclass")&"</font>"
end if
rs2.close
end if
'//最高价
high1=request("high")
if high1 <> "" then
tj4="and sellmoney <"&high1
if high1 =0 then
response.write " 条件"&byshop_9&" "
byshop_9=byshop_9+1
response.write "最高价:<font color='#FF0000'>不限</font>"
tj4=""
end if
else
tj4=""
end if
if tj4<>"" then
response.write " 条件"&byshop_9&" "
byshop_9=byshop_9+1
response.write "最高价:<font color='#FF0000'>"&high1&"万元</font>"
end if
'//最低价
low1=request("low")
if low1 <> "" then
tj5="and sellmoney >"&low1
if low1 =0 then
response.write " 条件"&byshop_9&" "
byshop_9=byshop_9+1
response.write "最低价:<font color='#FF0000'>不限</font>"
tj5=""
end if
else
tj5=""
end if
if tj5<>"" then
response.write " 条件"&byshop_9&" "
byshop_9=byshop_9+1
response.write "最低价:<font color='#FF0000'>"&low1&"万元</font>"
else
end if
'//省
province1=request("province")
if province1 <> "" then
tj6="and province ="&province1
else
tj6=""
end if
if province1 <> "" then
response.write " 条件"&byshop_9&" "
byshop_9=byshop_9+1
response.write "省份:"
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from province where shengNo="&province1,conn,1,1
if rs2.recordcount>0 then
response.write "<font color='#FF0000'>"&rs2("shengname")&"</font>"
shengid=rs2("id")
else
response.write "<font color='#FF0000'>全国各地</font>"
end if
rs2.close
end if
city1=request("city")
if city1 <> "" then
tj7="and city ="&city1
else
tj7=""
end if
if city1 <> "" then
response.write " 条件"&byshop_9&" "
byshop_9=byshop_9+1
response.write "城市:"
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from city where shengid="&shengid&" and shiNo="&city1&"",conn,1,1
if rs2.recordcount>0 then
response.write "<font color='#FF0000'>"&rs2("shiname")&"</font>"
else
response.write "<font color='#FF0000'>不限城市</font>"
end if
rs2.close
end if
%>
</td>
</tr>
</table>
<table border="0" width="779" id="table1" cellspacing="0" cellpadding="0">
<tr>
<td width="175" valign="top">
<!--网站左面-->
<div align="center">
<table width="100%" border="0" cellspacing="1" cellpadding="0" id="table1">
<tr>
<td align="center" valign="top" height="2"></td>
</tr> <tr>
<td align="center" valign="top">
<!--新闻--><!--#include file="in_news.asp"-->
<!--二手车收索--><!--#include file="in_search.asp"-->
<!--广告--><!--#include file="in_ads2.asp"-->
</td>
</tr>
</table>
</div> </td>
<td valign="top" width="8"> </td>
<td valign="top" align="right" >
<!--品牌汽车--><div align="center">
</div>
<div align="right">
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from 1car where ( by_tongguo=1) "&tj1&" "&tj2&" "&tj3&" "&tj4&" "&tj5&" "&tj6&" "&tj7&" and 1=1 order by adddate desc",conn,1,1
if rs.recordcount=0 then
%>
<table border="0" width="100%" id="table7" height="4" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<table border="1" width="580" cellpadding="0" style="border-collapse: collapse" bordercolor="#BDDBE9">
<tr>
<td>暂无信息</td>
</tr>
</table><%
else
rs.PageSize =20 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
%>
</p>
<table border="0" width="100%" id="table7" height="4" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<table cellspacing=0 cellpadding=0 border=1 width="580" bordercolor="#BDDBE9" style="border-collapse: collapse">
<tr>
<td valign=top width="47%">
<table border="0" width="100%" id="table3">
<tr>
<td bgcolor="#BDDBE9">
<p align="center">信息标题</td>
</tr>
</table>
</td>
<td valign=top width="146">
<table border="0" width="100%" id="table4">
<tr>
<td bgcolor="#BDDBE9">
<p align="center">出售车价</td>
</tr>
</table>
</td>
<td valign=top width="146">
<table border="0" width="100%" id="table5">
<tr>
<td bgcolor="#BDDBE9">
<p align="center">发布日期</td>
</tr>
</table>
</td>
<td valign=top width="146">
<table border="0" width="100%" id="table6">
<tr>
<td bgcolor="#BDDBE9">
<p align="center"><span lang="zh-cn">交易</span>地区</td>
</tr>
</table>
</td>
</tr> <%
a=0
do while not rs.eof
%>
<tr onmouseout="mOut(this,'#FFFFFF');" onmouseover="mOvr(this,'#e4f3fa');">
<td width="47%" height="22" > <a href=sellcar.asp?id=<%=rs("id")%> title="<%=rs("titlename")%>"><%=rs("titlename")%></a><%if rs("carpic")<>""then%> <a href="<%=rs("carpic")%>" target=_blank><img border="0" src="images/pics.gif" title="点击查看大图"></a><%end if%><%if rs("guding")=1 then response.write "<font color=#FF0000>固顶</font>" end if%></td>
<td width="146" align="center" ><%
if rs("sellmoney")<> "0" then
%><font color="#FF0000"><%
response.write rs("sellmoney")&"万元"
else
%></font>
<%
response.write "面议"
end if
%></td>
<td align="center" width="146" > <%if rs("guding")=1 then%>
<%=year(rs("gddate"))%>-<%=month(rs("gddate"))%>-<%=day(rs("gddate"))%>
<%else%>
<%=year(rs("adddate"))%>-<%=month(rs("adddate"))%>-<%=day(rs("adddate"))%>
<%end if%> </td>
<td align="center" width="146" >
<%set rs2=server.createobject("adodb.recordset")
rs2.open "select * from province where shengNo="&rs("province"),conn,1,1
if rs2.recordcount>0 then
response.write rs2("shengname")
shengid=rs2("id")
else
response.write "全国各地"
end if
rs2.close
%>
<%set rs2=server.createobject("adodb.recordset")
rs2.open "select * from city where shengid="&shengid&" and shiNo="&rs("city")&"",conn,1,1
if rs2.recordcount>0 then
response.write "--"&rs2("shiname")
end if
rs2.close
%> </td>
</tr>
<%
rs.movenext
a=a+1
if a>=iPageSize then exit do
loop
rs.close
set rs=nothing%>
<tr>
<td valign=top height="1" colspan="4"><% call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
end if
rs.close
set rs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
Dim query, a, x, temp
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
Response.Write("<table " & Table_style & ">" & vbCrLf )
Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
Response.Write("<TD align=right>" & vbCrLf )
Response.Write(font_style & vbCrLf )
if page<=1 then
Response.Write ("首页 " & vbCrLf)
Response.Write ("上页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
end if
if page>=pagecount then
Response.Write ("下页 " & vbCrLf)
Response.Write ("尾页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾页</A> " & vbCrLf)
end if
Response.Write(" 页次:" & page & "/" & pageCount & "页" & vbCrLf)
Response.Write(" 共有" & iCount & "条信息" & vbCrLf)
Response.Write(" 转到" & "<INPUT TYEP=TEXT NAME=page SIZE=1 Maxlength=5 class=wenbenkuang VALUE=" & page & ">" & "页" & vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=go-wenbenkuang>")
Response.Write("</TD>" & vbCrLf )
Response.Write("</TR></form>" & vbCrLf )
Response.Write("</table>" & vbCrLf )
End Sub
%></td>
</tr>
</table> </td>
</tr>
</table>
<!--#include file=webfoot.asp-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -