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

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

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

dim arr_pgsId, arr_pricem, arr_pgMes
if rs("pgshiId")="nothing" or rs("pgPrice")="nothing" then
	havepgs = 0
else
	havepgs = 1
end if

arr_pgsId = split(rs("pgshiId")&"","|")		'所有的评估师ID号
arr_price = split(rs("pgPrice")&"","|")		'所有的评估价格
arr_pgMes = split(rs("pgMes")&"","|")			'所有的评估信息
%>
<!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>
</head>

<body>
<div class="bodyDiv">
	<!--#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">当前位置：查看车辆评估价格 / <%=exportpinp(rs("productSort"),"pinpai")%></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%>
			<img src="<%=imgtmp%>" width="275" height="199"  /></div>
			  <div style="margin-top:3px;" align="center"><a href="<%=imgtmp%>" 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="<%=getshitu("smallImg")%>" 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="<%=getshitu("smallImg2")%>" 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="<%=getshitu("smallImg3")%>" 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="<%=getshitu("smallImg4")%>" 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="<%=getshitu("smallImg5")%>" 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("chushou") = 1 then response.write "<font color=#FF0000;>已售</font>"else response.write "<font color=#FF0000;>待售</font>"%></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 />
			汽车品牌：<%=exportpinp(rs("productSort"),"pinpai")%><br />
			汽车型号：<%=exportpinp(rs("productSort"),"xinghao")%><br />
			汽车颜色：<%=rs("carcolor")%><br />
			出售车价：<%if rs("memberprice")="0" then response.write "<a>价格面议</a>" else response.write rs("memberPrice")&"元"%><br />
			上牌日期：<%=rs("caryear")%>年<%=rs("carmonth")%>月<br />
			所在地区：<%=rs("provice")%><br /><br />
			<div style="color:#021D28; font-size:14px; font-weight:bold;">车主信息</div>
			<div>
			出售类别：<%=rs("fa_class")%><br />
			车主姓名：<%=rs("sell_name")%><br />
			电子邮件：<%=rs("email")%><br />
			联系电话：<%=rs("tel")%><br />
			</div>
            </div></td>
          </tr>
          
        </table>
		<!----------------------评估价格----------------------->
		<style type="text/css">
		.pgjg .pic{margin-bottom:5px;}
		.pgjg .name1{color:#696969; margin-bottom:1px; background-color:#F9F9F9; line-height:18px;}
		</style>
		<div style="margin-top:10px;" class="pgjg">
			<div class="moren" style="padding:10px 0; border-top:dotted 1px #CCCCCC;"><img src="images/2008-1-131129.jpg" width="107" height="31" alt="评估价格" /><%if  havepgs = 0 then%><span style="margin-left:300px;">【<a href="yaoqing_fun.asp?jd=<%=carid%>" title="您可以邀请我们的评估团对该车进行鉴定" target="_blank">邀请评估团鉴定</a>】</span><%end if%></div>
			<!-----评估师头像单元---->
			<%
if havepgs = 1 then
			for tmp_i = 0 to ubound(arr_pgsId)

			%>
			<div style="width:136px; float:left; margin-right:10px;">
				<div><a href="viewPgs.asp?id=<%=arr_pgsId(tmp_i)%>" target="_blank"><img src="<%=exportTou(arr_pgsId(tmp_i),"touxiang")%>" width="134" height="103" style="padding:1px;border:solid 3px #F5F5F5;" /></a></div>
				<div class="name1" style="margin-top:10px;">评估师：<%=exportTou(arr_pgsId(tmp_i),"mingzi")%></div>
				<div class="name1">评估价格：<%=arr_price(tmp_i)%></div>
				<div title="<%=arr_pgMes(tmp_i)%>" class="name1">评估信息：<br><%=left(arr_pgMes(tmp_i),6)%>...</div>
			</div>
			<%
			next
			response.write "<div style='clear:both;'></div>"
end if%>
</div>

<%if  havepgs = 0 then%>
			<div style="padding:0 10px 0 0px; line-height:180%;">
				&nbsp;&nbsp;&nbsp;&nbsp;该会员未邀请评估团鉴定，您若对该车辆有意向，且想了解“专业、公正、权威”的评估价格，可在该车辆信息的显示页面选择“邀请评估团鉴定”服务，专业资深评估团将为您服务。您也可以直接电话咨询：0571-88991811、88992855，第一时间给您回复。
			</div>		
		
<%end if%>		

		</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 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>
  </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

'==================
'功能：在所有评估过的车辆中找本辆车的ID，找到返回true，否则返回false
'参数：  pgedAllCarId    (所有评估过的车辆ID号)
'        carId1          (需要查找的车辆ID号)
function srhCarId(pgedAllCarId,carId1)
	
	dim tmp_arr, tmp_i, tmp_flag
	
	if pgedAllCarId = "" or isnull(pgedAllCarId) = true then
		srhCarId = false
		exit function
	end if

	if instr(pgedAllCarId,"|") = 0 then
		if cstr(pgedAllCarId) = cstr(carId1) then
			srhCarId = true
			exit function
		else
			srhCarId = false
			exit function
		end if
	end if

	tmp_arr = split(pgedAllCarId,"|")
		
	for tmp_i = 0 to ubound(tmp_arr)
		if tmp_arr(tmp_i) = cstr(carId) then
			srhCarId = true
			exit function
		end if
	next

	srhCarId = false
	exit function
end function

'=========================================
'功能：输出评估师头像或名字
'参数：  fd      (评估师ID号)
'        type1   (输出类型)
function exportTou(fd,type1)
	dim rs_fd
	if fd = "" or isnull(fd) = true then
		exportTou = "images/morepgs/notouimg.jpg"
		exit function
	else
		set rs_fd = server.CreateObject("adodb.recordset")
		rs_fd.open "select pgimg,name,gsname from member where id = "& fd &" ",conn,1,1
		
		if type1 = "touxiang" then			'输出头像
		
			if rs_fd.eof then
				exportTou = "images/morepgs/notouimg.jpg"
				exit function
			end if
		
			if rs_fd("pgimg") = "nothing" then
				exportTou = "images/morepgs/notouimg.jpg"
			else
				exportTou = rs_fd("pgimg")
			end if
		elseif type1 = "mingzi" then		'输出名字
			if rs_fd.eof then
				exportTou = ""
				exit function
			end if
			exportTou = rs_fd("name")
			exit function
		elseif type1 = "gsname" then		'输出公司名称
			if rs_fd.eof then
				exportTou = ""
				exit function
			end if
			exportTou = rs_fd("gsname")
			exit function
		end if
		
	end if
end function
%>