<!--#include file="userCheck.asp"-->
<!--#include file="conn.asp"-->

<!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 language="javascript" src="inc/showo_page.js" type="text/javascript"></script>
<style type="text/css">
a:link{color:#333333; text-decoration:none;}
a:visited{color:#333333; text-decoration:none;}
a:hover{color:#FF6600; text-decoration:none;}
</style>
</head>

<body>
<table width="910" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="2" colspan="2"><!--#include file="user_top.asp"--></td>
  </tr>
  <tr>
    <td width="178" style="border-right:dotted 1px #CCCCCC; background-color:#F8F8F6;" height="200" valign="top"><!--#include file="user_left.asp"--></td>
    <td width="732" valign="top">
	  <div style=" margin-top:2px;">
	  <div style="font-weight:bold; text-align:center; line-height:30px;">
	    <div style="line-height:180%; text-align:left; padding:2px 10px;">
          <div align="center">已评估车辆信息</div>
          <br>
          尊敬的评估师，以下是您已经做过评估的车辆信息，您可以点击修改您对车辆的评估，非常感谢您的工作！</div>
	  </div>
		
		<table width="100%" height="63" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#ABABAB">
        <tr align="center" bgcolor="#dedede"> 
          <td width="24%">车辆编号</td>
          <td width="23%">型号</td>
          <td width="10%">年限</td>
          <td width="25%">发布日期</td>
          <td width="18%">操作</td>
          </tr>
		<%
		dim i,ary_pg
		
		sql="select top 1 waitpgcarid,pgallcarid from member where Id="& session("userId23") &" order by id desc"
        rs.open sql,conn,1		
		
		'如果待评估字段不为空，则列出所有待评估车辆信息
		'if rs("waitpgcarid")<>"nothing" or trim(rs("waitpgcarid"))<>"" then
		if getAllPg()>0 then
			ary_pg=split(rs("pgAllCarId"),"|")
			rs.close
					
			'do while not rs.eof and i <= page_size
			for i=0 to Ubound(ary_pg)	   '读出每一个待评估车辆的信息					
				set rs_car=server.createObject("adodb.recordset")
				sql_car="select id,productSort,caryear,fa_time from product where ID=" & ary_pg(i)
				rs_car.open sql_car,conn,1,1							
			%>
			<tr align="center" bgcolor="#FFFFFF">
			  <td  style="cursor:hand" title="点击查看车辆具体信息" onClick="Javascript:window.open('view2car.asp?id=<%=rs_car("id")%>','_blank') "><%=rs_car("id")%></td>
			  <td><%=exportpinp(rs_car("productSort"),"pinpaiandxinghao")%></td>
			  <td><%=rs_car("caryear") & "年"%></td>
			  <td><%=rs_car("fa_time")%></td>
			  <td><a href="user_mypgAllModi.asp?id=<%=rs_car("id")%>">修改评估</a></td>
			  </tr>
			<%
				rs_car.close
			next
			'i = i + 1
	'		rs.movenext
	'		loop
	'		rs.close
		end if
	%>
      </table>
<%if have = 1 then%>
<div><Script Language="JavaScript">
ShowoPage("<table style='BORDER-COLLAPSE: collapse' borderColor='#111111' height='10' cellSpacing='0' cellPadding='0' width='95%' border='0'><tr><td vAlign='bottom'  style='font-family: Verdana,宋体; font-size: 11.5px; line-height: 15px'>","</td></tr></table>","页次:<font color='red'>","</font>/","","&nbsp;","&nbsp;每页<font color='red'>","</font>&nbsp;","&nbsp;共计:<font color='red'>","</font></td><td vAlign='bottom' align='right'  style='font-family: Verdana,宋体; font-size: 11.5px; line-height: 15px'>","<font face=webdings>9</font>","<font face=webdings>7</font>","<font face=webdings>8</font>","<font face=webdings>:</font>","&nbsp;&nbsp;跳转:","<font color='orange'>[","]</font>","","","<font color='red'>","</font>","","",<%=recordCountNum%>,<%=page_size%>,4,"?p=parm1&<%=prm%>")
</Script></div>
<%end if%>
      </div>
	  </td>
  </tr>
</table>
<table width="910" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><!--#include file="model_bottom.asp"--></td>
  </tr>
</table>

</body>
</html>

<%
'================================================
'获取字符串中分隔符的数量
function countpg(str1,str2)
	dim i,counter
	counter=0
	if InStr(str2,str1) then
		for i=1 to len(str2)
			if mid(str2,i,len(str1))=str1 then
				counter=counter+1
			end if
		next 
	end if
	countpg=counter
 end function
%>
<%
'================================================
'功能：获得评估的数量
function getAllPg()	
	dim tmp
	tmp=0
	
	set rs_getallpg=server.createobject("adodb.recordset")  
	rs_getallpg.open "select top 1 pgAllCarId from member where Id="& session("userId23") &" order by id desc",conn,1,1		
	
	if rs_getallpg.eof then    
		tmp = -1
	else		
		if countpg("|",rs_getallpg("pgAllCarId"))=0 then
			if trim(rs_getallpg("pgAllCarId"))="nothing" then  '如果本来为空
				tmp=0
			else        '如果有1个，但无逗号
				tmp=1
			end if
		else	        '有1个以上逗号		
			tmp=countpg("|",rs_getallpg("pgAllCarId"))+1
		end if
	end if
	rs_getallpg.close
	getAllPg = tmp
end function
%>