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

📄 sellclass.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>
<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> &gt; <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.close
					  	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> &gt; <a href="sellclass.asp">出售信息</a> >【<a href=sellclass.asp?id=big&anid=<%=anclassid%>><%=anclassname%></a>】&gt;【<a href=sellclass.asp?id=small&anid=<%=anclassid%>&nid=<%=nclassid%>><%=nclassname%></a>】				  
					


    <%
					  case ""
					  	
					  %>  
		
              您的位置:<a href="default.asp">网站首页</a> &gt; <a href="sellclass.asp">出售信息</a> 
		&gt;【<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">&nbsp;
  <a href=sellcar.asp?id=<%=rs("id")%> title="<%=rs("titlename")%>"><%=rs("titlename")%></a><%if rs("carpic")<>""then%>&nbsp;<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
			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)
    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 + -