⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 buyclass.asp

📁 模块及功能: 1.汽车新闻 分类.查询.翻页 2.出售信息 搜索.评估.地区展示.发布.展示.固顶.刷新 3.求购信息 发布.展示.固顶.刷新 3.加盟商家管理 注册.登录.信
💻 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>
		<body style="text-align: right">

<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=request("anid")
					  	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"<SCRIPT language=JavaScript>alert('参数错误3!');"
						response.write"javascript:history.go(-1)</SCRIPT>"
						response.end
						end if
						anclassname=rs("anclass")
						rs.close
					  %>你的位置:<a href="default.asp">网站首页</a> &gt;
		<a href="buyclass.asp">求购信息</a> &gt;【<a href=buyclass.asp?id=big&anid=<%=anclassid%>><%=anclassname%></a>】
            
               <%
					  case "small"
					  	anclassid=request("anid")
					  	nclassid=request("nid")
					  	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"<SCRIPT language=JavaScript>alert('参数错误4!');"
						response.write"javascript:history.go(-1)</SCRIPT>"
						response.end
						end if
						anclassname=rs("anclass")
						rs.close
					  	rs.open "select * from nclass where   nclassid="&nclassid,conn,1,1
						if rs.bof and rs.eof then
						response.write"<SCRIPT language=JavaScript>alert('参数错误5!');"
						response.write"javascript:history.go(-1)</SCRIPT>"
						response.end
						end if
						nclassname=rs("nclass")
						rs.close
					  %>你的位置:<a href="default.asp">网站首页</a> &gt;
		<a href="buyclass.asp">求购信息</a> &gt;【<a href=buyclass.asp?id=big&anid=<%=anclassid%>><%=anclassname%></a>】&gt;【<a href=buyclass.asp?id=small&anid=<%=anclassid%>&nid=<%=nclassid%>><%=nclassname%></a>】				  
					


    <%
					  case ""
					  	
					  %>你的位置:<a href="default.asp">网站首页</a> &gt;
		<a href="buyclass.asp">求购信息</a> &gt;【<a href=buyclass.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 2car where   anclass="&anclassid&" and ( by_tongguo=1) order by adddate desc",conn,1,1
		elseif leixing="small" then
			rs.open "select * from 2car where  anclass="&anclassid&" and nclass="&nclassid&" and ( by_tongguo=1 )  order by adddate desc",conn,1,1
		else
			rs.open "select * from 2car where ( by_tongguo=1  )  order by adddate desc",conn,1,1
		end if
		if rs.recordcount=0 then 
		%>
		
		<%
		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
		%>

		<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%"> 
          <div align="left">
          <table border="0" width="100%" id="table3">
			<tr>
				<td bgcolor="#BDDBE9">
				<p align="center">标题信息</td>
			</tr>
			</table>
			</div>
			</td>
          <td valign=top width=19%> 
          <table border="0" width="100%" id="table4">
			<tr>
				<td bgcolor="#BDDBE9" >
				<p align="center"><span lang="zh-cn">求购车价</span></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
        byshop_i=0
					   do while not rs.eof 
					   %>
        <tr onmouseout="mOut(this,'#FFFFFF');" onmouseover="mOvr(this,'#e4f3fa');"> 
          <td  height="22">&nbsp; 
        <a href=buycar.asp?id=<%=rs("id")%> title="<%=rs("titlename")%>"><%=rs("titlename")%></a>
          </td>
          <td  align="center" ><%
                  if  trim(rs("money")) <> "" then
                  %><font color="#FF0000"><%
                   response.write   rs("money")&"万元"
                   %></font><%
                   else
                  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
        byshop_i=byshop_i+1
   
  if byshop_i>=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"-->
		
		</div>  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -