<table width="100" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="images/pingtuan.jpg" width="267" height="25" border="0" usemap="#Map"></td>
  </tr>
  <tr>
    <td style="background-image:url(images/leftbg.gif);"><br>
      <table width="95%" border="0" align="center" cellpadding="3" cellspacing="0">
      <%
	  set rsxx = server.CreateObject("adodb.recordset")
	  rsxx.open "select top 5 id,name,pgAllCarID,pgxj from member where ifpinggushi = '1' order by id desc",conn,1,1	  
	  %>
	  <tr style="font-weight:bold;">
        <td align="center">评估师</td>
        <td width="5" align="center">&nbsp;</td>
        <td align="center">评估量</td>
        <td align="center">星级</td>
      </tr>
	  <%do while not rsxx.eof%>
      <tr>
        <td colspan="4" align="center"><img src="images/Snap25.gif" width="234" height="5"></td>
        </tr>
      <tr>
        <td align="center"><span style="margin-left:10px; color:#000000; cursor:pointer;"><a onclick="window.open('viewPgs.asp?id=<%=rsxx("id")%>','_blank')" onfocus="this.blur()"><%=rsxx("name")%></a></span></td>
        <td align="center">&nbsp;</td>
        <td align="center">
		<%=getAllpg(rsxx("id"))%>
		</td>
        <td align="center">
		<%if trim(rsxx("pgxj"))<>"" then
			for i = 1 to rsxx("pgxj")
				response.write "<img src='images/xing1.gif' />"
			next
			
			for i = 1 to 5 - cint(rsxx("pgxj"))
				response.write "<img src='images/xing2.gif' />"
			next
		  else
		  	response.write "暂无"
		  end if
		%>		
		</td>
      </tr>
	  <%
	rsxx.movenext
	loop
	%>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<%
'================================================
'获取字符串中评估邀请的数量
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(pinggushid)	
	dim tmp
	tmp=0
	
	set rs_getallpg=server.createobject("adodb.recordset")  
	rs_getallpg.open "select top 1 pgAllCarId from member where Id="& pinggushid &" 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 + 120
end function
%>
<map name="Map" id="Map"><area shape="rect" coords="208,3,259,22" href="viewMorePgs.asp" target="_blank" />
</map>