📄 map2.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>
地区展示→<%
'//省
province1=request("province")
if province1 <> "" then
tj6="and province ="&province1
else
tj6=""
end if
if province1 <> "" then
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 "城市:"
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">
<!--二手车收索--><!--#include file="in_search.asp"-->
<!--二手车评估--><!--#include file="in_evaluation.asp"-->
<!--排行榜--><!--#include file="in_top.asp"-->
</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 or by_tongguo=0 ) and searchf=0 "&tj1&" "&tj2&" "&tj3&" "&tj4&" "&tj5&" "&tj6&" "&tj7&" and searche=0",conn,1,1
if rs.recordcount=0 then
%>
没有记录
<%
else
rs.PageSize =10 '每页记录条数
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
%>
<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=19%>
<table border="0" width="100%" id="table4">
<tr>
<td bgcolor="#BDDBE9">
<p align="center">出售车价</td>
</tr>
</table>
</td>
<td valign=top width="13%">
<table border="0" width="100%" id="table5">
<tr>
<td bgcolor="#BDDBE9">
<p align="center">发布日期</td>
</tr>
</table>
</td>
<td valign=top width="21%">
<table border="0" width="100%" id="table6">
<tr>
<td bgcolor="#BDDBE9">
<p align="center">交易地区</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%></td>
<td align="center" ><%
if rs("sellmoney")<> "0" then
%><font color="#FF0000"><%
response.write rs("sellmoney")&"万元"
else
%></font>
<%
response.write "面议"
end if
%></td>
<td align="center" >
<%=year(rs("adddate"))%>-<%=month(rs("adddate"))%>-<%=day(rs("adddate"))%></td>
<td align="center" >
<%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 + -