<!--#include file="userCheck.asp"-->
<!--#include file="conn.asp"-->
<%
if request.QueryString("action") = "del" then call del()		'删除收藏车辆
%>
<!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">&nbsp;</td>
      <td><table width="537" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td><img src="images/usersc.jpg" width="537" height="26" /></td>
        </tr>
        <tr>
          <td height="96" align="center" background="images/user/0006.JPG">
          <%set rs_nj = server.CreateObject("adodb.recordset")
		  rs_nj.open "select * from user_shoucang where userId="& session("userId23") &" order by id desc",conn,1,1
		  if not rs_nj.eof and not rs_nj.bof then
		  %>
          <table width="494" height="58" border="0" cellpadding="10" cellspacing="0">
            <tr>
              <td>
              <%do while not rs_nj.eof
			 
			'找到此车辆获取相关信息
			set rs = server.CreateObject("adodb.recordset")
			rs.open "select * from product where id="& rs_nj("carId") &"",conn,1,1
			if not rs.eof and not rs.bof then
				dim imgtmp
				if rs("smallImg")="nothing" then
					imgtmp = "img/car1.gif"
				else
					imgtmp = rs("smallImg")
				end if
				
				
				dats_1 = rs("productSort")
				dats_2 = exportpinp(dats_1,"pinpai")		'品牌
				dats_3 = exportpinp(dats_1,"xinghao")		'型号
			end if
			rs.close
			set rs = nothing

			  %>
              <div style="width:150px; margin-right:10px; float:left;"><a href="view2Car.asp?id=<%=rs_nj("carId")%>" target="_blank"><img name="" style="border:solid 1px #999999;" src="<%=imgtmp%>" width="148" alt="" /></a>
                <div style="text-align:center; padding-bottom:5px; width:148px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;" class="moren"><a href="view2Car.asp?id=<%=rs_nj("carId")%>" target="_blank"><%=dats_2 & dats_3%></a></div>
                <div style="padding-bottom:10px; text-align:left;" class="moren"><a href="?action=del&carid=<%=rs_nj("carId")%>" onclick="return confirm('确定要删除吗？')"><font color="#FF0000">删除</font></a></div>
              </div>
              <%
			  rs_nj.movenext
			  loop
			  %>
              </td>
            </tr>
          </table>
          <%
		  else
		  	response.write "暂无任何收藏汽车！"
		  end if
		  rs_nj.close
		  set rs_nj = nothing
		  %>
          </td>
        </tr>
        <tr>
          <td><img src="images/user/0007.JPG" width="537" height="17" /></td>
        </tr>
        </table>
	  
	  <br />
	  <br /></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 del()
	dim tt
	tt = request.QueryString("carid")
	conn.execute("delete from user_shoucang where userId="& session("userId23") &" and carId = "& tt &"")
	response.Redirect "userCang.asp"
end function
%>