?? sellclass.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><%leixing=lcase(trim(request("id")))
select case leixing
case "big"
anclassid=trim(request("anid"))
if IsNumeric(request.QueryString("anid"))=False or request.QueryString("anid")="" then
response.write"<SCRIPT language=JavaScript>alert('參數錯誤');"
response.end
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from anclass where anclassid="&anclassid,conn,1,1
if rs.bof and rs.eof then
response.write"參數錯誤!"
response.end
end if
anclassname=rs("anclass")
rs.close
%>
您的位置:<a href="default.asp">網站首頁</a> > <a href="sellclass.asp">出售信息</a> >【<a href=sellclass.asp?id=big&anid=<%=anclassid%>><%=anclassname%></a>】
<%
case "small"
anclassid=trim(request("anid"))
if IsNumeric(request.QueryString("anid"))=False or request.QueryString("anid")="" then
response.write"<SCRIPT language=JavaScript>alert('參數錯誤');"
response.end
end if
nclassid=trim(request("nid"))
if IsNumeric(request.QueryString("nid"))=False or request.QueryString("nid")="" then
response.write"<SCRIPT language=JavaScript>alert('參數錯誤');"
response.end
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from anclass where anclassid="&anclassid,conn,1,1
if rs.bof and rs.eof then
response.write"參數錯誤!"
response.end
end if
anclassname=rs("anclass")
rs.open "select * from nclass where nclassid="&nclassid,conn,1,1
if rs.bof and rs.eof then
response.write"參數錯誤!"
response.end
end if
nclassname=rs("nclass")
rs.close
%>
您的位置:<a href="default.asp">網站首頁</a> > <a href="sellclass.asp">出售信息</a> >【<a href=sellclass.asp?id=big&anid=<%=anclassid%>><%=anclassname%></a>】>【<a href=sellclass.asp?id=small&anid=<%=anclassid%>&nid=<%=nclassid%>><%=nclassname%></a>】
<%
case ""
%>
您的位置:<a href="default.asp">網站首頁</a> > <a href="sellclass.asp">出售信息</a>
>【<a href=sellclass.asp>全部信息</a>】<%
end select%></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_search.asp"-->
<!--二手車評估--><!--#include file="in_evaluation.asp"-->
<!--排行榜--><!--#include file="in_top.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")
if leixing="big" then
rs.open "select * from 1car where ( by_tongguo=1 ) and anclass="&anclassid&" order by adddate desc",conn,1,1
elseif leixing="small" then
rs.open "select * from 1car where ( by_tongguo=1 ) and anclass="&anclassid&" and nclass="&nclassid&" order by adddate desc",conn,1,1
else
rs.open "select * from 1car where ( by_tongguo=1 ) order by adddate desc",conn,1,1
end if
if rs.recordcount=0 then
%>
<%
else
rs.PageSize =30 '每頁記錄條數
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%><%if rs("guding")=1 then response.write "<font color=#FF0000>固頂</font>" 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" >
<%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" >
<%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
<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)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上頁</A> " & vbCrLf)
end if
if page>=pagecount then
Response.Write ("下頁 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下頁</A> " & vbCrLf)
end if
Response.Write(" 頁次:" & page & "/" & pageCount & "頁" & vbCrLf)
Response.Write(" 共有" & iCount & "條信息" & vbCrLf)
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 + -