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

📄 sellcar.asp

📁 模块及功能: 1.汽车新闻 分类.查询.翻页 2.出售信息 搜索.评估.地区展示.发布.展示.固顶.刷新 3.求购信息 发布.展示.固顶.刷新 3.加盟商家管理 注册.登录.信
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--数据库链接文件-->
<!--#include file="byshop_conn.asp"-->
<!--网站头文件-->
<!--#include file="webhead.asp"-->
<%
Public Function FilterHtml(Str)
    If Trim(Str) = "" Or IsNull(Str) Then
        FilterHtml=""
    Else
    Str = Replace(Str, "&lt;p&gt;&lt;/p&gt;", "</p><p>" )
       Str = Replace(Str, "&lt;/p&gt;&lt;p&gt;", "</p><p>" )
        Str = Replace(Str, "&lt;/P&gt;&lt;P&gt;", "</p><p>" )
    
    Str = Replace(Str, "&lt;br&gt;" ,"<br>")
    FilterHtml = Str
    End If
End Function

function byshop_num(num)
num_l=instr(1,num,".")
if num_l >0 then
if num_l=1 then 
response.write 0
else 
num_ll=num_l-1
response.write left(num,num_ll)
end if
num_xx=mid(num,num_l)
num_r=left(num_xx,3)
response.write num_r
else
response.write num
end if
end function

%>



<%dim id
		id=trim(request("id"))
		if IsNumeric(request.QueryString("id"))=False or request.QueryString("id")="" then
		response.write"<SCRIPT language=JavaScript>alert('参数错误');"
		response.end	
		end if
		sql="select * from 1car where  id=" &id & ""
		Set rs= Server.CreateObject("ADODB.Recordset")
		rs.open sql,conn,1,3
		if rs.bof and rs.eof then
			response.write"<SCRIPT language=JavaScript>alert('参数错误');"
		response.write"javascript:history.go(-1)</SCRIPT>"
				response.end
		else
		rs("count")=rs("count")+1
		titlename=rs("titlename")
		rs.update
		pinlunid=rs("id")
		end if
		%>
		
		<title><%=rs("titlename")%>-<%=webname%></title>
				
		

<script>
firstpic=new Image;
firstpic.src="<%=rs("carpic")%>"
//******************
//预载图片
//******************
function mh_preloadimgs()
{
   if(!document.images) return;
   imgarr=new Array(); 
   for(i=0; i<parr.length; i++)
   {
     len=imgarr.length;
	 imgarr[len]=new Image;
	 imgarr[len].src=parr[i];	 
   }
}
//*********************
//画表格及图片位置
//*********************

function mh_drawtable()
{

  mh_tb  = "<table width=100% cellpadding=0 cellspacing=0 border=0>";
  mh_tb += "<tr>";

  for(i=0;i<perpage;i++)
  {
    mh_tb += "<td><table width=0 border=0 cellpadding=0 cellspacing=1 bgcolor=#CCCCCC><tr>";
   mh_tb +=  "<td height=30 bgcolor=#FFFFFF style=color: #293D05; font-size: 12px><table width=0 border=0 cellpadding=0 cellspacing=1 bgcolor=#FFFFFF><tr>";
   mh_tb +="<td height=30 bgcolor=#FFFFFF style=color: #293D05; font-size: 12px>"
	mh_tb += "<img name='img"+i+"' width=90 height=60 border=0 title=点击放大 onmouseover='bigimg.src=this.src' onclick='window.open(this.src)'>";
	mh_tb += "</td>";
	if(i<perpage-1)
	mh_tb += "</td></tr></table></td></tr></table></td>";
  }  

  mh_tb += "</tr>";
  mh_tb += "</table>";

  document.all.showtime.innerHTML = mh_tb;
}
//*********************
//执行分页操作
//*********************
function mh_callpage(obj)
{
  pages = Math.ceil(parr.length/perpage); //总共页数
  if(obj)
  {
   newpage=curpage+1>pages?pages:curpage+1;
  }
  else
  {
   newpage=curpage-1<1?1:curpage-1;
  }
  pagefrom = (newpage-1)*perpage;          //页面起始点

  for(i=0;i<perpage;i++)
  {
    img=document.all["img"+i];
	if(!parr[pagefrom+i]){
	 if(!parr[(pagefrom+i-parr.length)])
	 	img.src="images/nocarimg.jpg";
	else	
	 img.src=imgdir+parr[(pagefrom+i-parr.length)];
	 }           //空图片
	else
	 img.src=imgdir+parr[pagefrom+i];
  }
  curpage=newpage;
  window.focus();
}
//*********************
//初始化
//*********************
function mh_run()
{
perpage = 4;   //每页显示数
curpage = 1;   //当前第几页
curimg = new Array(); //当前显示图片
imgdir=""; //图片文件夹
blankimg="nocarimg.jpg"; //空白图片

parr=new Array(
	"<% if  rs("carpic1") <>"" then
	response.write  rs("carpic1")
	end if
	
	%>","<% if  rs("carpic2") <>"" then
	response.write  rs("carpic2")
	end if
	
	%>","<% if  rs("carpic3") <>"" then
	response.write  rs("carpic3")
	end if
	
	%>","<% if  rs("carpic4") <>"" then
	response.write  rs("carpic4")
	end if
	
	%>"	);//图片列表

mh_preloadimgs();
mh_drawtable();
mh_callpage(0);
}

</script>
			<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="mh_run()">
			<tr>
					<div align="center">
						<table border="0" width="779" id="table1" cellspacing="0" cellpadding="0">
							<tr>
								<td>您的位置:<a href="default.asp">网站首页</a>&nbsp;&gt;&nbsp;<a href="sellclass.asp">出售信息</a>&nbsp;&gt;&nbsp;<%=rs("titlename")%></td>
							</tr>
						</table>
</div>

<div align="center">
	<table border="1" width="779" id="table2" cellpadding="0" style="border-collapse: collapse" bordercolor="#BDDBE9">
		<tr>
			<td>
			<div align="center">
				<table border="1" width="95%" id="table9" cellspacing="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#C0C0C0">
					<tr>
						<td bgcolor="#BDDBE9">基本信息</td>
					</tr>
				</table>
				<table border="0" width="100%" cellspacing="0">
					<tr>
						<td> </td>
					</tr>
				</table>
			</div>
			<table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0">
				<tr>
					<td width="45%" height="202" valign="top">
					<div align="center">
						<table width=95 border=0 cellpadding=0 cellspacing=1 bgcolor=#CCCCCC><tr>
						<td height=30 bgcolor=#FFFFFF style="color: #293D05; font-size: 12px"><table width=95 border=0 cellpadding=0 cellspacing=1 bgcolor=#FFFFFF><tr>
							<td height=30 style="color: #293D05; font-size: 12px" valign="top"><%if rs("carpic") <> "" then%><a href="<%=rs("carpic")%>" ><%end if%>
<img border="0" title="点击放大" id="bigimg"src=<% if rs("carpic") <> "" then response.write rs("carpic") else  response.write "images/nocarimg.jpg" end if %>  onmouseover="this.src=firstpic.src"  width="240" height="180"></a></td></tr></table></td></tr></table>
					</div>
					 </td>
					<td width="55%" height="202" valign="top">
					<table border="1" width="95%" id="table5" style="border-collapse: collapse" cellspacing="1" cellpadding="3" bordercolor="#C0C0C0">
						<tr>
							<td><font color="#02adfe">·</font>信息标题:<font color="#FF0000"><%=rs("titlename")%></font></td>
						</tr>
						<tr>
							<td bgcolor="#f0f9fe"><font color="#02adfe">·</font>汽车类别:<%if rs("cartype")=1 then response.write"轿车" end if%>
							<%if rs("cartype")=2 then response.write"跑车" end if%>
							<%if rs("cartype")=3 then response.write"SUV及越野车" end if%>
							<%if rs("cartype")=4 then response.write"面包车" end if%>
							<%if rs("cartype")=5 then response.write"箱形车" end if%>
							<%if rs("cartype")=6 then response.write"概念车" end if%>
							<%if rs("cartype")=7 then response.write"客车" end if%>
							<%if rs("cartype")=8 then response.write"货车" end if%>
							<%if rs("cartype")=9 then response.write"摩托车" end if%>
							<%if rs("cartype")=10 then response.write"电动自行车" end if%>
							<%if rs("cartype")=11 then response.write"其它车型" end if%>
							</td>
						</tr>
						<tr>
							<td><font color="#02adfe">·</font>汽车品牌:<%set rs2=server.createobject("adodb.recordset")
									rs2.open "select * from anclass where anclassid="&rs("anclass"),conn,1,1
									if rs2.recordcount>0 then
									response.write "<a href=sellclass.asp?id=big&anid="&rs2("anclassid")&" targer=_blank>"&rs2("anclass")&"</a>"
									end if
									rs2.close
									set rs2=server.createobject("adodb.recordset")
									rs2.open "select * from nclass where nclassid="&rs("nclass"),conn,1,1
									if rs2.recordcount>0 then
									response.write "--<a href=sellclass.asp?id=small&anid="&rs2("anclassid")&"&nid="&rs2("nclassid")&" targer=_blank>"&rs2("nclass")&"</a>"
									end if
									rs2.close
									set rs2=nothing%><%
									if rs("type")<>"" then
									response.write "--"&rs("type")
									end if
									%></td>
						</tr>
						<tr>
							<td bgcolor="#F0F9FE"><font color="#02adfe">·</font>原车购价:<%byshop_num(rs("yuanmoney"))%>万元</td>
						</tr>
						<tr>
							<td><font color="#02adfe">·</font>出售车价:<% if  rs("sellmoney") <>"0" then
							%><font color="#FF0000"><%
							byshop_num(rs("sellmoney"))
							response.write   "万元"
							else
							response.write "面议"
							end if
							%></font></td>
						</tr>
						<tr>
							<td bgcolor="#F0F9FE"><font color="#02adfe">·</font>汽车颜色

⌨️ 快捷键说明

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