<!--#include file="conn.asp"-->
<%
showTuiJianNum = 8 			'本页推荐车辆显示条数

dim id
id = request.QueryString("id")
if isnumeric(id) = false or id = "" then call wrong("参数传递发生错误！")

rs.open "select * from product where id="& id &"",conn,1,1
if rs.eof then call wrong("未找到相关数据！")
conn.execute("update product set hitnum = hitnum + 1 where id = "& id &"")

dim dats(5)
dats(0) = rs("productSort")
dats(1) = rs("caryear")
dats(2) = rs("provice")
dats(3) = exportpinp(dats(0),"pinpai")		'品牌
dats(4) = exportpinp(dats(0),"xinghao")		'型号
dats(5) = rs("memberPrice")					'出售价格


'如果是登录会员查看，则统计查看车辆数并对易卡贝贝数量进行适当操作
if session("userId23") <> "" then
	set rs_23 = server.CreateObject("adodb.recordset")
	rs_23.open "select * from userJiFen where userId = "& session("userId23") &"",conn,1,3
	
	if not rs_23.eof then
		num_23 = rs_23("tmp_seeCar")
		num_23 = num_23 + 1
		if num_23 >= 100 then			'如果查看的车辆超过100
			rs_23("yikabeibei") = rs_23("yikabeibei") + 1
			rs_23("tmp_seeCar") = 0
		else							'如果没有超过100，则查看车辆数加1
			rs_23("tmp_seeCar") = num_23
		end if
		rs_23.update
		
	end if
	
	rs_23.close
	set rs_23 = nothing
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>查看车辆详细信息</title>
<link href="css/comm.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/comm.js"></script>
<script language="javascript">
var peizhi01 = new Image();
var peizhi02 = new Image();
var feiyong01 = new Image();
var feiyong02 = new Image();
var chezhu01 = new Image();
var chezhu02 = new Image();

/*同品牌和同价位图片*/
var tongpai01 = new Image();
var tongpai02 = new Image();
var tongjia01 = new Image();
var tongjia02 = new Image();

peizhi01.src  = "images/viewinfo/peizhi01.jpg";
peizhi02.src  = "images/viewinfo/peizhi02.jpg";
feiyong01.src = "images/viewinfo/feiyong01.jpg";
feiyong02.src = "images/viewinfo/feiyong02.jpg";
chezhu01.src  = "images/viewinfo/chezhu01.jpg";
chezhu02.src  = "images/viewinfo/chezhu02.jpg";

tongpai01.src = "images/viewinfo/tongpai01.jpg";
tongpai02.src = "images/viewinfo/tongpai02.jpg";
tongjia01.src = "images/viewinfo/tongjia01.jpg";
tongjia02.src = "images/viewinfo/tongjia02.jpg";

/*配置信息鼠标上移*/
function peizhiover()
{
	showOb("peizhixinxi");
	hiddenOb("feiyongxinxi");
	hiddenOb("chezhuzishu");
	peizhi.src = peizhi01.src;
	feiyong.src = feiyong02.src;
	chezhu.src = chezhu02.src;
}

/*费用信息鼠标上移*/
function feiyongover()
{
	showOb("feiyongxinxi");
	hiddenOb("peizhixinxi");
	hiddenOb("chezhuzishu");
	peizhi.src = peizhi02.src;
	feiyong.src = feiyong01.src;
	chezhu.src = chezhu02.src;
}

/*车主信息鼠标上移*/
function chezhuover()
{
	showOb("chezhuzishu");
	hiddenOb("peizhixinxi");
	hiddenOb("feiyongxinxi");
	peizhi.src = peizhi02.src;
	feiyong.src = feiyong02.src;
	chezhu.src = chezhu01.src;
}

/*同品牌车鼠标上移*/
function tongpaiover()
{
	showOb("divtongpai");
	hiddenOb("divtongjia");
	tongpai.src = tongpai01.src;
	tongjia.src = tongjia02.src;
}

/*同价格车鼠标上移*/
function tongjiaover()
{
	showOb("divtongjia");
	hiddenOb("divtongpai");
	tongpai.src = tongpai02.src;
	tongjia.src = tongjia01.src;
}

/*点击复制*/
function copyToClipBoard()
{
	var clipBoardContent=''; 
	clipBoardContent+=document.title;
	clipBoardContent+=window.location;
	window.clipboardData.setData("Text",clipBoardContent);
	alert("你已复制链接及标题，请粘贴到QQ/MSN等发给好友吧!");
}

</script>
<style type="text/css" >
#Layer1{position:absolute;width:109px;height:14px;z-index:1;}
#Layer1 img{position:absolute;top:-20px;}
.STYLE1 {color: #FF0000}
.STYLE2 {
	color: #FFFFFF;
	font-weight: bold;
	font-size: 14px;
}
/*更多类似车辆按钮*/
#apDiv1 {
	position:absolute;
	width:47px;
	height:21px;
	z-index:2;
	left:875px;
}
</style>
</head>

<body>
<div class="bodyDiv">
<!------------框架用于处理各种按钮事件，勿删除----------->
<iframe src="" width="0" height="0" name="frame1" id="frame1"></iframe>
	<!--#include file="model_top.asp"-->
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="86" height="36" align="center" bgcolor="FF8601"><img src="images/2car_40.jpg" width="78" height="28" alt=""></td>
        <td width="162" bgcolor="FF8601" style="font-size:14px; color: #FFFFFF;	font-weight: bold;">登录莆田二手车网</td>
        <td width="43"><img src="images/2car_36.jpg" width="43" height="36" alt=""></td>
        <td valign="bottom" background="images/2car_38.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="4%" height="15"><img src="images/site.gif" width="14" height="13" /></td>
            <td width="96%" valign="bottom">当前位置：查看车辆详细信息</td>
          </tr>
          <tr>
            <td height=8 colspan="2"></td>
          </tr>
        </table></td>
      </tr>
	<tr>
    <td height="4" colspan="4" bgcolor="F0F0F0"></td>
  </tr>
</table>
	
  <table width="100%" height="190" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="5%" rowspan="2" valign="top">　</td>
        <td width="57%" rowspan="2" valign="top"><table width="100%" height="252" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td colspan="2">　</td>
          </tr>
          <tr>
            <td width="58%" valign="top"><div style=" padding:3px; text-align:center; width:277px; border:solid 1px #8C857B;">
			<%
			dim imgtmp
			if rs("smallImg")="nothing" then
				imgtmp = "img/car1.gif"
			else
				imgtmp = rs("smallImg")
			end if
			%>
			<a href="viewCarImg.asp?id=<%=id%>&imgName=1" target="_blank"><img src="<%=imgtmp%>" width="275" height="199"  border="0" /></a></div>
			  <div style="margin-top:3px;" align="center"><a href="viewCarImg.asp?id=<%=id%>&imgName=1" onfocus="this.blur()" target="_blank"><img src="images/200801072244.jpg" width="77" height="26" border="0" /></a></div>
			  <div style="margin-top:3px;">
			    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><div style="width:56px; background-color:#F2F6F7; float:left; margin-right:3px; height:40px;"><a href="viewCarImg.asp?id=<%=id%>&imgName=1" onfocus="this.blur()" target="_blank"><img src="<%=getshitu("smallImg")%>" width="56" height="40" alt="车辆图片" border="0" /></a></div>
					<div style="width:56px; background-color:#F2F6F7; float:left; margin-right:3px; height:40px;"><a href="viewCarImg.asp?id=<%=id%>&imgName=2" onfocus="this.blur()" target="_blank"><img src="<%=getshitu("smallImg2")%>" width="56" height="40" alt="前方视图" border="0" /></a></div>
					<div style="width:56px; background-color:#F2F6F7; float:left; margin-right:3px; height:40px;"><a href="viewCarImg.asp?id=<%=id%>&imgName=3" onfocus="this.blur()" target="_blank"><img src="<%=getshitu("smallImg3")%>" width="56" height="40" alt="汽车横图" border="0" /></a></div>
					<div style="width:56px; background-color:#F2F6F7; float:left; margin-right:3px; height:40px;"><a href="viewCarImg.asp?id=<%=id%>&imgName=4" onfocus="this.blur()" target="_blank"><img src="<%=getshitu("smallImg4")%>" width="56" height="40" alt="车内视图" border="0" /></a></div>
					<div style="width:56px; background-color:#F2F6F7; float:left; margin-right:3px; height:40px;"><a href="viewCarImg.asp?id=<%=id%>&imgName=5" onfocus="this.blur()" target="_blank"><img src="<%=getshitu("smallImg5")%>" width="56" height="40" alt="车箱视图" border="0" /></a></div></td>
                  </tr>
                </table> 
			    </div></td>
            <td width="42%" valign="top">
            <div style="color:#021D28; font-size:14px; font-weight:bold;">车辆信息&nbsp;
			<%if rs("fa_chuqiu")="出售" then%>
			<%if rs("chushou") = 1 then response.write "<font color=#FF0000;>已售</font>"else response.write "<font color=#FF0000;>待售</font>"%>
			<%else%>
				<font color=#FF0000;>求购</font>
			<%end if%>
			
			</div>
            <div style="color:#021D28; line-height:180%; color:#011B2A;">
            汽车编号：<%=rs("bianhao")%><%if rs("recommend")=1 and rs("fabu")=1 then response.write "&nbsp;<span style='color:#FF0000'>【本站推荐】</span>"%><br />
            汽车类别：<%=rs("leibie")%><br />
			汽车品牌：<%=dats(3)%><br />
			汽车型号：<%=dats(4)%><br />
			汽车颜色：<%=rs("carcolor")%><br />
			<%if rs("fa_chuqiu")="出售" then%>
				出售车价：
			<%else%>
				求购价格：
			<%end if%><%if rs("memberprice")=0 then response.write "<a>价格面议</a>" else response.write rs("memberPrice")&"元"%>
			<%if rs("fa_chuqiu")="出售" then%>
			<span style="margin-left:10px; font-weight:bold; color:#FF0000; cursor:pointer;"><a onclick="window.open('viewCarPg.asp?carid=<%=rs("id")%>','_blank')" onfocus="this.blur()">查看评估价格</a></span>
			<%end if%>
			<br />
			上牌日期：<%=rs("caryear")%>年<%=rs("carmonth")%>月<br />
			所在地区：<%=rs("provice_shi")%><br /><br />
			<div style="color:#021D28; font-size:14px; font-weight:bold;">
			<%
			'if rs("fa_class") = "私人" then 
			if rs("fa_chuqiu")="出售" then
				if ifchehanghuiyuan(id)="yes" then
					response.write "车行信息" 
			 	else 
					response.write "车主信息"
			 	end if
			elseif rs("fa_chuqiu")="求购" then
				response.Write "买家信息"
			end if
				%>
			</div>
			<div class="moren">
			  <%
			  'if rs("fa_class") = "私人" then
			  if ifchehanghuiyuan(id)="yes" then%>
				公司名称：<%call exportgongsi(rs("userId"),"公司名称")%><br />
				联系人：<%call exportgongsi(rs("userId"),"联系人")%><br />
			<%else%>
<%if rs("fa_chuqiu")="出售" then%>
					车主姓名：<%=rs("sell_name")%><br />
<%else%>
					买家姓名：<%=rs("sell_name")%><br />
				<%end if%>
				电子邮件：<%=rs("email")%><br />
			<%end if%>
			联系电话：<%=rs("tel")%><br />
			</div>
            </div></td>
          </tr>
          <tr>
            <td colspan="2" valign="top">
			<div style="line-height:25px;" class="moren">
			【<a href="user_csAdd.asp?action=xiugai&carId=<%=id%>">编辑信息</a>】【<a href="user_csAdd.asp?action=xiugai&carId=<%=id%>">调整价格</a>】【<a href="User/SetYiShou.asp?action=xiugai&carId=<%=id%>">设为已售</a>】【<a href="javascript:copyToClipBoard();">传给朋友</a>】【<a href="javascript:print()">打印此页</a>】
			<%if rs("fa_chuqiu")="出售" then%><span style="margin-left:10px; color:#000000; cursor:pointer;">【<a onclick="window.open('yaoqing_fun.asp?jd=<%=id%>','_blank')" onfocus="this.blur()">邀请评估团鉴定</a>&nbsp;】</span><%end if%></div>
			<div style="margin-top:30px;">
				<div style="background-image:url(images/viewinfo/toubg.jpg);">
				<img name="peizhi" src="images/viewinfo/peizhi01.jpg" width="104" height="26" style="cursor:pointer;" onmouseover="peizhiover()" /><img name="feiyong" src="images/viewinfo/feiyong02.jpg" width="104" height="26" style="cursor:pointer;" onmouseover="feiyongover()" /><img name="chezhu" src="images/viewinfo/chezhu02.jpg" width="104" height="26" style="cursor:pointer;" onmouseover="chezhuover()" />
				<div id="Layer1"><img src="images/viewinfo/2008-1-8-1130.jpg" width="199" height="38" /></div>
				</div>
				<div style="border:solid 1px #CACACA; border-top:none;">
				<div id="peizhixinxi">
				<%
				'获得本车辆所有配置字段
				carpz = ""& rs("bz")
				carpz = replace(carpz," ","")			
				
				set rs_pz=server.createobject("adodb.recordset")
				sql_pz = "SELECT * FROM peizhi order by ID"
				rs_pz.OPEN sql_pz,Conn,1,1
				dim i
				i=1		
				%>
				  <table width="100%" border="0" cellspacing="1" cellpadding="4">
                    <%do while not rs_pz.eof%>
					<tr <%if i mod 2 = 1 then response.write "bgcolor='#F2F6F7'"%>>					
                      <td align="center">
					  <%
					  if instr(carpz,rs_pz("id")) > 0 then		'如果车辆配置信息里有配置字段
					  	response.write "<img src='images/viewinfo/yixuan.gif' />"
					  else
					  	response.write "<img src='images/viewinfo/weixuan.gif' />"
					  end if
					  %>					  </td>
                      <td align="center"><%=rs_pz("pzname")%></td>
                      <td><%
					  rs_pz.movenext
					  if rs_pz.eof then exit do
					  if instr(carpz,rs_pz("id")) > 0 then
					  	response.write "<img src='images/viewinfo/yixuan.gif' />"
					  else
					  	response.write "<img src='images/viewinfo/weixuan.gif' />"
					  end if
					  %></td>
					  <td><%=rs_pz("pzname")%></td>
					  <td>
					  <%
					  rs_pz.movenext
					  if rs_pz.eof then exit do
					  if instr(carpz,rs_pz("id")) > 0 then
					  	response.write "<img src='images/viewinfo/yixuan.gif' />"
					  else
					  	response.write "<img src='images/viewinfo/weixuan.gif' />"
					  end if
					  %>
					  </td>                   
                      <td><%=rs_pz("pzname")%></td>
					</tr>
					<%
					i=i+1
					rs_pz.movenext
					loop
					rs_pz.close
					set rs_pz = nothing
					%>
					<div><%if rs("introduce") <> "" then response.write "附加配置："&rs("introduce")%></div>
                  </table>
				 
				</div>
				<!------费用信息------>
				<div id="feiyongxinxi" style="display:none;">
				  <table width="100%" border="0" cellspacing="0" cellpadding="5">
                    <tr>
                      <td bgcolor="#F2F6F7">养路费：<%=rs("yanglufei")%></td>
                    </tr>
                    <tr>
                      <td>保&nbsp;&nbsp;险：<%=rs("baoxian")%></td>
                    </tr>
                    <tr>
                      <td bgcolor="#F2F6F7">年&nbsp;&nbsp;检：<%=rs("nianjian")%></td>
                    </tr>
                  </table>
				</div>
				<!------车主自述------>
				<div id="chezhuzishu" style="display:none;">
				  <table width="100%" border="0" cellspacing="0" cellpadding="5">
                    <tr>
                      <td bgcolor="#F2F6F7" style="line-height:150%;">
					  <%if len(rs("explain"))=0 then					  			
					  response.Write"该会员很懒，没有对爱车车况进行描述，建议买家对交易价格看到实车后，再做定论。"		  %>
					  <%else%>
					  	<%=rs("explain")%>
					  <%end if%>
					  </td>
                    </tr>
                  </table>
				</div>
				</div>
			</div>
			<div style="margin-top:20px;">
			  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="559" height="108">
              <param name="movie" value="flash/car-1.swf" />
              <param name="quality" value="high" />
              <embed src="flash/car-1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="559" height="108"></embed>
			  </object>
			</div>
			<!------免责申明----->
			<div style="margin-top:20px; padding:10px 20px; line-height:150%; border:solid 1px #B9BABE;">
			<strong>免责申明：</strong>
			<br />
			&nbsp;&nbsp;&nbsp;&nbsp;莆田二手车网上发布的任何形式的内容、广告及资料由发布人负责其内容的真实性、准确性及合法性，本网站不承担任何相关责任，且不提供任何保证。本网有权但无义务更改会员发布资料的错误部分，且可随时删增、修订及拒绝任何内容、声明、功能及会员资料，且不作通知。			</div>
			
			<!------发表评论------>
			<div style="margin-top:20px; border:solid 1px #B9BABE;">
			  <div align="left"><img src="images/viewinfo/2008-1-8-1155.jpg" width="131" height="36" /></div>
			  <div style="background-color:#F2F3F5;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="36"><%
set rs6=server.CreateObject ("adodb.recordset")
sql6="select top 10 * from ly where newsid='"&request("id")&"' Order By ID Desc"
rs6.open sql6,conn,1,2
if rs6.eof and rs6.bof then   
response.write "<br />&nbsp;&nbsp;还没有人发表评论"
else
%>
<%do while not rs6.eof%>
<tr bgcolor="#FFFFFF"> 
<td width="20%" height="18"><font color="#CC0000">&nbsp;发表人：</font><%=rs6("name")%> 
<td width="27%" height="22">IP:<%=rs6("rip")%> 
<td width="53%" height="18">发表时间: <%=rs6("date")%> 
<tr bgcolor="#efefef"> 
<td height="22" colspan="3">&nbsp;&nbsp;<%=rs6("nr")%></td>
</tr>
<tr> 
<td height="5" colspan="3"></td>
</tr>
<%                                                
i=i+1
if i>=10 then exit do
rs6.movenext
loop
i="0"
end if
rs6.close                                               
%>
</table>
              
              </div>
			  <div>
			    <table width="100%" border="0" cellspacing="0" cellpadding="5">
				<form name="ff9" id="ff9" method="post" action="Savereview.asp?newsID=<%=request("id")%>">
                  <tr>
                    <td width="10%">　</td>
                    <td width="15%">姓名：</td>
                    <td><input name="name" type="text" id="name" style="border-left:solid 1px #333333; border-top:solid 1px #333333; border-bottom:solid 1px #CCCCCC; border-right:solid 1px #CCCCCC;" size="10" value="<%=session("userName")%>" />
                      联系电话：
                        <input name="tel" type="text" id="tel" style="border-left:solid 1px #333333; border-top:solid 1px #333333; border-bottom:solid 1px #CCCCCC; border-right:solid 1px #CCCCCC;" size="15" /><input name="name1" type="hidden" id="name1" value="用户名 "></td>
                    </tr>
                  <tr>
                    <td>　</td>
                    <td>留言内容：</td>
                    <td><textarea name="nr" cols="40" rows="5" id="nr"></textarea></td>
                    </tr>
                  <tr>
                    <td>　</td>
                    <td>　</td>
                    <td><input type="submit" name="Submit2" value="提交" />
                      <input type="reset" name="Submit3" value="重置" />
                      <input name="carId" type="hidden" id="carId" value="<%=id%>" /></td>
                  </tr>
                  <tr>
                    <td>　</td>
                    <td>　</td>
                    <td align="right" class="moren">共有
                      <%call pinglunnum(id)%>条评论&nbsp;&nbsp;&nbsp;&nbsp;<a href="rview.asp?id=<%=request("id")%>" target="_blank">更多留言&gt;&gt;&gt;</a></td>
                  </tr>
				  </form>
                </table>
			  </div>
			</div>			</td>
          </tr>
          
        </table></td>
        <td width="5%" rowspan="2" valign="top">　</td>
        <td width="28%" valign="top">　</td>
        <td width="5%" rowspan="2" valign="top">　</td>
      </tr>
      <tr>
        <td valign="top">
		<div>
          <div style=" background-image:url(images/viewinfo/2008-1-8-1239.jpg);width:257px; height:36px; line-height:30px; color:#FFFFFF; font-size:14px; font-weight:bold; text-align:center;">易卡搜搜吧车主信息</div>
		  <div style="background-image:url(images/viewinfo/2008-1-8-1237.jpg);">
		    <table width="90%" border="0" align="center" cellpadding="3" cellspacing="0">
              <tr>
                <td height="8"></td>
              </tr>
              <tr>
                <td>车主性质：
				  <%
				  if ifchehanghuiyuan(id)="yes" then
						response.Write "车行会员"
				  else
				  		response.Write "个人会员"
				  end if
				%>				</td>
              </tr>
              <tr>
                <td>发布时间：<%=rs("fa_time")%></td>
              </tr>
              <tr>
                <td>发布售车数：&nbsp;<%=getNum(rs("id"),"出售")%>&nbsp;辆&nbsp;&nbsp;<span style="margin-left:10px; font-weight:bold; color:#FF0000; cursor:pointer;"><a onclick="window.open('viewMoreCar.asp?action2=geren&userid=<%=finduser(rs("id"))%>','_blank')" onfocus="this.blur()">查看更多</a></span></td>
              </tr>
              <tr>
                <td>总资产：&nbsp;<span class="STYLE1">10</span>&nbsp;枚易卡贝贝</td>
              </tr>
              <tr>
                <td>信誉值：&nbsp;<span class="STYLE1">10</span>&nbsp;分</td>
              </tr>
              <tr>
                <td>投诉贴数：&nbsp;<span class="STYLE1">0</span>&nbsp;条</td>
              </tr>
              <tr>
                <td height="35" align="center"><strong>申请加入推荐二手车</strong></td>
              </tr>
              <tr>
                <td><img src="images/viewinfo/2008-1-8-1245.jpg" width="231" height="5" /></td>
              </tr>
              <tr>
                <td align="center" style="font-size:14px;">本车辆浏览次数：<span style="color:#FF0000;"><%=rs("hitnum")%></span>&nbsp;次</td>
              </tr>
              <tr>
                <td><img src="images/viewinfo/2008-1-8-1245.jpg" width="231" height="5" /></td>
              </tr>
              <tr>
                <td><table width="100%" border="0" cellspacing="3" cellpadding="0">
                  <tr>
                    <td height="25" bgcolor="#EF7929"><div align="center" class="STYLE2">会员服务区</div></td>
                    </tr>
                </table></td>
              </tr>
			  <tr>
                <td><table width="100%" height="87" border="0" cellpadding="0" cellspacing="3" class="moren">
                  <tr>
                    <td><img src="images/viewinfo/e.jpg" width="29" height="22" /></td>
                    <td><a href="#" onclick="window.open('view2Car_fun.asp?action=jubao&carId=<%=id%>&userId=<%=session("userId23")%>','frame1');return false;">举报不良信息</a></td>
                    <td><img src="images/viewinfo/a.jpg" width="29" height="22" /></td>
                    <td>如何交易</td>
                  </tr>
                  <tr>
                    <td><img src="images/viewinfo/d.jpg" width="29" height="22" /></td>
                    <td>最近浏览</td>
                    <td><img src="images/viewinfo/b.jpg" width="29" height="22" /></td>
                    <td><a href="user_shoucang.asp?carId=<%=id%>" target="_blank">加入收藏</a></td>
                  </tr>
                  <tr>
                    <td><img src="images/viewinfo/c.jpg" width="29" height="22" /></td>
                    <td colspan="3">安全交易注意事项</td>
                    </tr>
                </table></td>
              </tr>
              
            </table>
		  </div>
		  <div><img src="images/viewinfo/2008-1-8-12375.jpg" width="257" height="11" /></div>
        </div>
		
		<div style="margin-top:20px;">
			<div><img src="images/viewinfo/2008-1-8-1254.jpg" width="257" height="30" /></div>
			<div style="background-color:#EDEDEF; padding:10px 0;"><!--#include file="model_tuijian.asp"--></div>
		</div>
		
		</td>
      </tr>
      <tr>
        <td valign="top">　</td>
        <td colspan="3" valign="top">
		<div style="margin-top:20px;">
          <div style="font-size:14px; font-weight:bold; line-height:30px;"><img src="images/viewinfo/2008-1-8-1203.jpg" width="11" height="15" align="absmiddle" />您也许对下面的车辆感兴趣</div>
		  <div style="padding-top:10px;">
		  	<div style="background-image:url(images/viewinfo/toubg.jpg);" id="lingwai_tou">
            <img name="tongpai" src="images/viewinfo/tongpai01.jpg" width="104" height="26" onmouseover="tongpaiover()" style="cursor:pointer;" /><img onmouseover="tongjiaover()" name="tongjia" src="images/viewinfo/tongjia02.jpg" width="104" height="26" style="cursor:pointer;" /><div id="apDiv1"><a href="#"><img src="images/viewinfo/2008-1-24-1.jpg" alt="点击查看更多" width="47" height="21" border="0" /></a></div>
            </div>
			<!-----显示车辆------>
			<div id="divtongpai" style="padding-top:2px;">
				<!-----循环此Div即可----->
                <%
				set rs_tongpinpai = server.CreateObject("adodb.recordset")
				rs_tongpinpai.open "select top 4 * from product where(fabu=1 and fa_chuqiu='出售' and provice='"& dats(2) &"' and soukey like '%"& dats(3) &"%') order by id desc",conn,1,1
				do while not rs_tongpinpai.eof and not rs_tongpinpai.bof
				%>
				<div style="width:200px; float:left; margin-right:10px;">
				  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="52%" rowspan="4"><img src="images/cs10.jpg" width="95" height="72" /></td>
                        <td width="48%" height="17"><span style="color:#999999;">车型：<%=left(exportpinp(rs_tongpinpai("productSort"),"pinpaiandxinghao"),8)%></span></td>
                      </tr>
                      <tr>
                        <td height="18"><span style="color:#999999;">年份：<%=rs_tongpinpai("caryear")%></span></td>
                      </tr>
                      <tr>
                        <td height="15"><span style="color:#999999;">价格：<%=rs_tongpinpai("memberPrice")%></span></td>
                      </tr>
                      <tr>
                        <td><span style="color:#999999;">地点：<%=rs_tongpinpai("provice")%></span></td>
                      </tr>
                    </table>
			  </div>
			<%
			rs_tongpinpai.movenext
			loop
			rs_tongpinpai.close
			set rs_tongpinpai = nothing
			%>
            				
			</div>
            <!------------------列出本地同价格车------------------->
			<div id="divtongjia" style="display:none; padding-top:2px;">
				<!-----循环此Div即可----->
				<%
				tmp_jiage = int(dats(5) / 10000)
				
				tmp_lowP = tmp_jiage * 10000
				tmp_upper= (tmp_jiage+1) * 10000
				
				set rs_tongjiage = server.CreateObject("adodb.recordset")
				rs_tongjiage.open "select top 4 * from product where(fabu=1 and fa_chuqiu='出售' and provice='"& dats(2) &"' and soukey like '%"& dats(3) &"%' and (memberPrice between "& tmp_lowP &" and "& tmp_upper &")) order by id desc",conn,1,1
				do while not rs_tongjiage.eof and not rs_tongjiage.bof
				%>
				<div style="width:200px; float:left; margin-right:10px;">
				  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="52%" rowspan="4"><img src="images/cs10.jpg" width="95" height="72" /></td>
                        <td width="48%" height="17"><span style="color:#999999;">车型：<%=left(exportpinp(rs_tongjiage("productSort"),"pinpaiandxinghao"),8)%></span></td>
                      </tr>
                      <tr>
                        <td height="18"><span style="color:#999999;">年份：<%=rs_tongjiage("caryear")%></span></td>
                      </tr>
                      <tr>
                        <td height="15"><span style="color:#999999;">价格：<%=rs_tongjiage("memberPrice")%></span></td>
                      </tr>
                      <tr>
                        <td><span style="color:#999999;">地点：<%=rs_tongjiage("provice")%></span></td>
                      </tr>
                    </table>
				</div>
				<%
				rs_tongjiage.movenext
				loop
				rs_tongjiage.close
				set rs_tongjiage = nothing
				%>
			</div>
		  </div>
        </div>
		</td>
        <td valign="top">　</td>
      </tr>
  </table>
  <div style="height:20px;"></div>
  <!--#include file="model_bottom.asp"-->
</div>
</body>
</html>
<%
'===================
'获得编号
function getBianhao(hh)
	if hh = "" then
		getBianhao = ""
	else
		hh = replace(hh," ","")
		hh = replace(hh,"-","")
		hh = replace(hh,":","")
		hh = replace(hh,"上午","")
		hh = replace(hh,"下午","")
		hh = replace(hh,"AM","")
		hh = replace(hh,"PM","")
		getBianhao = hh
	end if
end function

'===================
'输出各个视图的图片
function getshitu(ziduan)
	dim imgtmp
	if rs(ziduan)="nothing" then
		imgtmp = "img/car1.gif"
	else
		imgtmp = rs(ziduan)
	end if
	getshitu = imgtmp
end function

'==================
'功能：输出各个配置小图
function getImgDot(ziduan)
	if rs("ziduan") <> "" then
		response.Write "<img src='images/viewinfo/yixuan.gif' width='16' height='15' />"
	else
		response.write "<img src='images/viewinfo/weixuan.gif' width='16' height='15' />"
	end if
end function

'=====================
'功能：获得公司名称或联系人
function exportgongsi(name1,type1)
	set rs_gs = server.CreateObject("adodb.recordset")
	sql_gs = "select gsname,id,gsren from member where id = "& name1 &""
	rs_gs.open sql_gs,conn,1,1
if type1 = "公司名称" then
	if not rs_gs.eof then
		response.write "<a href='viewPgs.asp?id="& rs_gs("id") &"' target='_blank'>"& rs_gs("gsname") &"</a>"
	else
		response.write "无"
	end if
elseif type1 = "联系人" then
	if not rs_gs.eof then
		response.write rs_gs("gsren")
	end if
end if
	rs_gs.close
	set rs_gs = nothing
end function

'============================
'输出评论条数
sub pinglunnum(dd)
	set rs_gs = server.CreateObject("adodb.recordset")
	sql_gs = "select * from ly where newsid = '"& dd &"'"
	rs_gs.open sql_gs,conn,1,1
	if not rs_gs.eof then
		response.Write rs_gs.recordcount
	else
		response.Write "0"
	end if
	rs_gs.close
	set rs_gs = nothing
end sub

'================================================
'功能：通过车辆id获得该车主已发布或者出售的车辆数量
function getNum(carid,qk)
	dim userid,countnum
	
	set rs_num = server.CreateObject("adodb.recordset")
	sql_num = "select userid from product where id =" & carid
	rs_num.open sql_num,conn,1,1
	
	if rs_num.eof then
		userid=-1
	else
		userid=rs("userid")
	end if
	rs_num.close
	
	if userid<>-1 then
		if qk = "出售" then
			rs_num.open "select * from product where fabu=1 and fa_chuqiu='出售' and userId="& userid &" order by id desc",conn,1,1		
		elseif qk = "求购" then
			rs_num.open "select * from product where fabu=1 and fa_chuqiu='求购' and userId="& userid &" order by id desc",conn,1,1
		end if	
		
		if rs_num.eof then
			countnum = 0
		else
			countnum = rs_num.recordcount
		end if
	end if
	rs_num.close
	
	if userid=-1 then
		getNum = 0
	else
		getNum = countnum
	end if
	
end function

'================================================
'功能：通过车辆id获得该车主是否车行会员
function ifchehanghuiyuan(carid)
	dim userid
	
	set rs_num = server.CreateObject("adodb.recordset")
	sql_num = "select top 1 userid from product where id =" & cint(carid)
	rs_num.open sql_num,conn,1,1

	if rs_num.eof then
		userid=-1
	else
		userid=rs_num("userid")
	end if
	rs_num.close
	
	if userid<>-1 then
		rs_num.open "select top 1 * from member where id="& cint(userid) &" order by id desc",conn,1,1
		ifchehanghuiyuan=rs_num("ifchehang")
		rs_num.close
	end if	
	
	if userid=-1 then
		ifchehanghuiyuan = "no"
	end if
	
end function

'找到车主id
function finduser(carid)
	dim userid
	
	set rs_num = server.CreateObject("adodb.recordset")
	sql_num = "select userid from product where id =" & cint(carid)
	rs_num.open sql_num,conn,1,1
	
	if rs_num.eof then
		userid=-1
	else
		userid=rs_num("userid")
	end if
	
	finduser=userid
end function
%>