<!--#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" />

</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;"> <br />
	  <table width="710" border="0" cellspacing="0" cellpadding="0" align="left" style="text-align:left;">
	    <tr>
	      <td width="25">　</td>
      <td><table width="537" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td><img src="images/user/0005.JPG" width="537" height="26" /></td>
        </tr>
        <tr>
          <td background="images/user/0006.JPG"><div style="margin:10px 20px; line-height:180%;">
            <p>欢迎&nbsp;<span style="text-decoration:underline;color:#FF6600;"><%=session("userName")%></span>&nbsp;会员成功登录莆田二手车，您现有<span style="text-decoration:underline;color:#FF6600;">0</span>枚
			莆卡贝贝，信誉值<span style="text-decoration:underline;color:#FF6600;">0</span>分。<br />
              您目前共有&nbsp;<span style="color:#FF6600;text-decoration:underline;"><a href="user_mypro.asp"><%=getNum("出售")%></a></span>&nbsp;个手车出售信息，共有&nbsp;<span style="color:#FF6600;text-decoration:underline;"><a href="user_mybuy.asp"><%=getNum("求购")%></a></span>&nbsp;个二手车求购信息。
            <%if session("ifpinggushi")="yes" then%>
			<br>您有&nbsp;
			<%if getPg()=0 then%>
				<%=getPg()%>
			<%else%>
				<span style="color:#FF6600;text-decoration:underline;"><a href="user_mypg.asp"><%=getPg()%></a></span>
			<%end if%>
			&nbsp;个评估请求需要处理
			<%end if%></p>
          </div></td>
        </tr>
        <tr>
          <td><img src="images/user/0007.JPG" width="537" height="17" /></td>
        </tr>
        </table>
	  
	  <br />
        <table width="537" border="0" cellpadding="0" cellspacing="0" style="border:solid 1px #D1D0BE;" class="moren">
          <tr> 
            <td colspan="6">　</td>
          </tr>
          <tr> 
            <td align="center"><img src="images/user/a.gif" width="35" height="30"></td>
            <td width="16%" align="center"><img src="images/user/b.gif" width="35" height="30"></td>
            <td width="16%" align="center"><img src="images/user/c.gif" width="35" height="30"></td>
            <td width="16%" align="center"><img src="images/user/d.gif" width="35" height="30"></td>
            <td width="16%" align="center"><img src="images/user/e.gif" width="35" height="30"></td>
            <td width="16%" align="center"><img src="images/user/f.gif" width="35" height="30"></td>
          </tr>
          <tr> 
            <td width="16%" align="center"><a href="default.asp">网站首页</a></td>
            <td align="center">发布信息</td>
            <td align="center"><a href="user_mypro.asp">出售信息</a></td>
            <td align="center"><a href="user_mybuy.asp">求购信息</a></td>
            <td align="center">租车信息</td>
            <td align="center"><a href="user_modiziliao.asp">个人信息</a></td>
          </tr>
		  <%if session("ifpinggushi")="yes" then%>
		  <tr>
		    <td height="8" align="center">&nbsp;</td>
		    <td height="8" align="center">&nbsp;</td>
		    <td height="8" align="center">&nbsp;</td>
		    <td height="8" align="center">&nbsp;</td>
		    <td height="8" align="center">&nbsp;</td>
		    <td height="8" align="center">&nbsp;</td>
		    </tr>
		  <tr> 
            <td align="center">　</td>
            <td width="16%" align="center"><img src="images/user/b.gif" width="35" height="30"></td>
            <td width="16%" align="center"><img src="images/user/c.gif" width="35" height="30" /></td>
            <td width="16%" align="center">　</td>
            <td width="16%" align="center">　</td>
            <td width="16%" align="center">　</td>
          </tr>
          <tr> 
            <td width="16%" align="center"><a href="default.asp"></a></td>
            <td align="center"><a href="user_mypg.asp">待评估邀请</a></td>
            <td align="center"><a href="user_myAllpg.asp">已发布的评估</a></td>
            <td align="center">　</td>
            <td align="center">　</td>
            <td align="center">　</td>
          </tr>
		  <%end if%>
          <tr>
            <td colspan="6">　</td>
          </tr>
          </table>
	    <br />
        <table width="537" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="images/user/g.gif" width="50" height="35" /></td>
          </tr>
          <tr>
            <td>
              <table width="100%" border="0" cellspacing="0" cellpadding="4">
                <%
		  rs.open "select top 4 * from article where classid=10 order by articleid desc",conn,1,1
		  do while not rs.eof
		  %>
                <tr>
                  <td width="10">　</td>
                <td width="391" class="moren" style="border-bottom:solid 1px #EEEEEE;">·<%="<a href='user_viewgonggao.asp?id="& rs("articleid") &"' target='_blank'>"&trim(rs("title"))&"</a>"%></td>
                <td width="112" style="border-bottom:solid 1px #EEEEEE;"><%=rs("dateandtime")%></td>
              </tr>
                <%
			rs.movenext
			loop
			rs.close
			%>
                </table></td>
          </tr>
          </table></td>
    </tr>
  </table>
    </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 getNum(qk)
	dim yu123
	if qk = "出售" then
		rs.open "select * from product where fa_chuqiu='出售' and userId="& session("userId23") &" order by id desc",conn,1,1		
	elseif qk = "求购" then
		rs.open "select * from product where fa_chuqiu='求购' and userId="& session("userId23") &" order by id desc",conn,1,1
	end if
	if rs.eof then
		yu123 = 0
	else
		yu123 = rs.recordcount
	end if
	rs.close
	getNum = yu123
end function
%>

<%
'================================================
'获取字符串中评估邀请的数量
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 getPg()	
	dim tmp
	tmp=0
	
	rs.open "select top 1 waitPgCarId from member where Id="& session("userId23") &" order by id desc",conn,1,1		
	
	if rs.eof then    
		tmp = -1
	else		
		if countpg("|",rs("waitPgCarId"))=0 then
			if trim(rs("waitPgCarId"))="nothing" then  '如果本来为空
				tmp=0
			else        '如果有1个，但无逗号
				tmp=1
			end if
		else	        '有1个以上逗号		
			tmp=countpg("|",rs("waitPgCarId"))+1
		end if
	end if
	rs.close
	getPg = tmp
end function
%>