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

id    = request.QueryString("id")		    'tuangouCar表中的ID号
sort2 = request.QueryString("sort2")		'tuangouCar表中的sort2数字
sort1 = request.QueryString("sort1")
sort3 = request.QueryString("sort3")		'tuangouCar表中的sort3，识别汽车级联菜单样式
if sort2 = "" then sort2 = -1
if id    = "" then id    = 0

dim info(15)
set rs_4b5d = server.CreateObject("adodb.recordset")
rs_4b5d.open "select * from tuangouCar where id="& id &"",conn,1,1
if not rs_4b5d.eof then
	info(0)  = rs_4b5d("Sort1")
	info(1)  = rs_4b5d("Sort2")
	info(2)  = rs_4b5d("carColor")
	info(10) = rs_4b5d("carImg")
	info(11) = rs_4b5d("pinpaiImg")
	info(4)  = rs_4b5d("beizhu")
	info(3)  = rs_4b5d("endTime")
	info(9)  = rs_4b5d("chengjiaoren")
	info(5)  = rs_4b5d("cjj_shangzhou")
	info(6)  = rs_4b5d("cjj_benzhou")
	info(7)  = rs_4b5d("cjj_zhidao")
	info(8)  = rs_4b5d("cjj_tuangou")
	info(13) = rs_4b5d("ifshenhe")
	info(12) = rs_4b5d("faqizhe")
	info(14) = rs_4b5d("cenjiaren")
else
	response.write "未找到相关信息"
	response.End()
end if
rs_4b5d.close
set rs_4b5d = nothing


'获得厂家的名字
xilieName = getSortNameById(sort2)

'获得型号
xinghao = ""
if sort3 <> "" then
	xinghao =  getSortNameById(sort3)
end if

'要显示的地方
pinpaixinghao = xilieName & xinghao
%>
<!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>
<script type="text/javascript" src="../js/city.js"></script>
<script language="javascript">
/*表单提交验证*/
function chk()
{
if(getId("ifsort2").value=="yessort2")				//如果显示出了共二级菜单
{
	if(getId("sort3").value=="" || getId("sort4").value=="")
	{
		alert("请选择完整汽车信息。");
		getId("sort4").focus();
		return false;
	}
}
else											//如果只显示出了最后一级菜单
{
	if(getId("sort4").value=="")
	{
		alert("请选择完整汽车信息。");
		getId("sort4").focus();
		return false;
	}
}
	
	if(getId("name1").value.Trim()=="")
	{
		alert("请填写您的姓名。");
		getId("name1").focus();
		return false;
	}
	
	if(getId("shouji").value.Trim()=="")
	{
		alert("请填写您的手机号码。");
		getId("shouji").focus();
		return false;
	}
	
	if(/[a-zA-Z]/gi.test(getId("shouji").value)==true)
	{
		alert("请正确填写您的手机号码。");
		getId("shouji").focus();
		return false;
	}
	
	if(getId("shouji").value.length != 11)
	{
		alert("请正确填写您的手机号码。");
		getId("shouji").focus();
		return false;
	}
	
	if(getId("city").value=="")
	{
		alert("请填写您所在的地区。");
		getId("city").focus();
		return false;
	}
	
	if(getId("email").value=="")
	{
		alert("请填写您的邮箱地址。");
		getId("email").focus();
		return false;
	}
	
	if(chkemail(getId("email").value)==0)
	{
		alert("请正确填写您的邮箱地址。");
		getId("email").focus();
		return false;
	}
	
}

/*AJAX获得第四级菜单*/
function getSort4()
{
	var idd = getId("sort3").value;
	
	if(idd=="")
	{
		idd = -1;
	}

	window.open("ajax_getSort.asp?parentId="+ idd +"","frame2");

}

</script>
<style type="text/css">
.hong{color:#FF0000;}
.hong a:link{text-decoration:none; color:#FF0000; font-size:14px;}
.hong a:visited{text-decoration:none; color:#FF0000; font-size:14px;}
.hong a:hover{text-decoration:underline; color:#FF0000; font-size:14px;}
.hong a:active{text-decoration:none; color:#FF0000; font-size:14px;}
</style>
</head>

<body>
<div class="bodyDiv">
<iframe name="frame2" id="frame2" src="" width="0" height="0"></iframe>
<!--#include file="tuangou_top.asp"-->
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="29%">　</td>
          <td width="1%">　</td>
          <td width="70%">　</td>
        </tr>
        <tr>
          <td valign="top">
            <!--#include file="model_paihang.asp"-->
            <div><img src="img/Snap2.jpg" width="267" height="44" /></div>
            <div><img src="img/Snap3.jpg" width="267" height="95" /></div>
            <!--#include file="model_shuohua.asp"-->          </td>
          <td><div style="width:12px;"></div></td>
          <td valign="top">
<div style="border:solid 1px #a6bcc9;">
<form name="formd4f5" id="formd4f5" method="post" action="viewCar_fun.asp" onSubmit="return chk()">
    <div style="padding-left:10px;">
    	<div style="margin-top:10px;">
    	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="47%"><img name="" src="<%if info(10)="" then response.write "/tuangou/img/tuangou_noimg.jpg" else response.write "/"&info(10)%>" width="290" height="170" alt="" />
                <div style="background-color:#dddddd; margin-top:1px; line-height:25px; text-align:center;"><%=pinpaixinghao%></div></td>
              <td width="53%" valign="top">
              <div style="line-height:30px; margin-left:20px; font-weight:bold; border-bottom:dotted 1px #CCCCCC; font-size:14px;">团购品牌：<%="<font color='#424b50' style='font-weight:normal;'>" & pinpaixinghao &"</font>"%></div>
              <div style="margin-left:20px;">
                <table width="100%" border="0" cellspacing="0" cellpadding="5" style="color:#4c4c4e; font-weight:bold; font-size:14px;">
                  <tr>
                    <td>发起者：<%=info(12)%></td>
                  </tr>
                  <tr>
                    <td>参加人数：<%=info(14)%></td>
                  </tr>
                  <tr>
                    <td>结束时间：<%=info(3)%></td>
                  </tr>
                  <tr>
                    <td>厂商：<%="<font style='font-weight:normal;'>"& xilieName &"</font>"%></td>
                  </tr>
                  <tr>
                    <td>历届成交人数：<%=info(9)%></td>
                  </tr>
                  <tr>
                    <td><span class="hong"><a href="moreinfo.asp?type1=shili" target="_blank">查看更多成功案例&gt;&gt;&gt;</a></span></td>
                  </tr>
                </table>
              </div></td>
            </tr>
          </table>
    	</div>

     </div>
     <div style="border-bottom:solid 1px #a6bcc9; border-top:solid 1px #a6bcc9; margin-top:20px;">
       <table width="95%" border="0" cellpadding="0" cellspacing="0">
         <tr>
           <td width="2%" height="31" style="font-size:14px; font-weight:bold;">　</td>
           <td width="98%" style="font-size:14px; font-weight:bold;">团购介绍</td>
         </tr>
         <tr>
           <td style="line-height:150%;">　</td>
           <td style="line-height:150%;"><%=info(4)%></td>
         </tr>
       </table>
     </div>
     <div style="border-bottom:solid 1px #a6bcc9; margin-top:10px;">
       <table width="95%" border="0" cellpadding="0" cellspacing="0">
         <tr>
           <td width="2%">　</td>
           <td width="98%" style=" font-size:14px; font-weight:bold;">团购须知</td>
         </tr>
         <tr>
           <td>　</td>
           <td style="line-height:150%;"><span style="line-height:150%; padding:5px;">&nbsp;&nbsp;&nbsp;&nbsp;汽车团购服务是以集体的力量来争取最大的实惠，大家通过网络报名，由
			莆田二手车网组织在有实力的汽车4S店中进行的自愿购买，享受团体采购价，共享优惠的消费服务形式。<br />
&nbsp;&nbsp;&nbsp;&nbsp;为了保证团购活动顺利进行，特制定规则如下：<br />
· 活动凭个人自愿参加，参加团购期间须完全遵守本站团购规则。<br />
· 参加团购的用户，请先自行确定团购车型，并填写相关信息。<br />
· 用户信息审核确认后工作人员会第一时间电话通知，请确保手机开机。<br />
· 团购客户按照本网所提供的服务流程完成购车，本次团购服务即告结束。<br />
· 为保证购车过程的透明性，所有车型均由厂家授权之品牌经销商提供。<br />
			· 如果您想了解团购的最新动态消息或提问题、建议，发表评论，或需要团购新的车型，请邮件至cs@pt98.com。 </span></td>
         </tr>
       </table>
     </div>
     <div style="padding-left:10px;">
        <div style="margin-top:10px;"><img src="img/Snap12.jpg" width="566" height="25" /></div>
        <div style="font-size:14px; line-height:30px;">本表<font color="#FF0000">*</font>部分为必填内容</div>
        <div style="line-height:27px; margin-right:10px; height:27px; background-image:url(img/Snap13.jpg);"><span style="padding-left:10px; color:#404b4f; font-size:14px;">报名信息</span></div>
        <div>
          <table width="96%" height="59" border="0" align="center" cellpadding="3" cellspacing="0" style="color:#404b4f; font-size:14px;">
          <%if sort3 = "" then%>
            <tr>
              <td>系&nbsp;&nbsp;&nbsp;&nbsp;列：<select name="sort3" id="sort3" onchange="getSort4()">
                <option value="">请选择</option>
                <%
				set rs_123 = server.CreateObject("adodb.recordset")
				rs_123.open "select * from carSort where parentId = "& sort2 &" order by id desc",conn,1,1
				do while not rs_123.eof
					response.write "<option value='"& rs_123("id") &"'>"& rs_123("sortName") &"</option>"
				rs_123.movenext
				loop
				rs_123.close
				set rs_123 = nothing
				%>
                </select>&nbsp;&nbsp;&nbsp;&nbsp;型号：
                <select name="sort4" id="sort4">
                  <option value="">请选择</option>
                </select><font color="#FF0000">&nbsp;*&nbsp;</font>
                <input name="ifsort2" type="hidden" id="ifsort2" value="yessort2" /></td>
            </tr>
            <%else%>
            <tr>
              <td>型&nbsp;&nbsp;&nbsp;&nbsp;号：<select name="sort4" id="sort4">
                <option value="">请选择</option>
                <%
				set rs_123 = server.CreateObject("adodb.recordset")
				rs_123.open "select * from carSort where parentId = "& sort3 &" order by id desc",conn,1,1
				do while not rs_123.eof
					response.write "<option value='"& rs_123("id") &"'>"& rs_123("sortName") &"</option>"
				rs_123.movenext
				loop
				rs_123.close
				set rs_123 = nothing
				%>
                </select><font color="#FF0000">&nbsp;*&nbsp;</font>
                <input name="ifsort2" type="hidden" id="ifsort2" value="nosort2" />
                <input name="sort3" type="hidden" id="sort3" value="<%=sort3%>" /></td>
            </tr>
            <%end if%>
            <tr>
              <td>汽车颜色：<input name="carColor" type="text" id="carColor" size="10" /></td>
            </tr>
            <tr>
              <td>
                预购时间：<select name="yugoushijian" id="yugoushijian">
                  <option value="一周内">一周内</option>
                  <option value="半月内">半月内</option>
                  <option value="一月内">一月内</option>
                </select><font color="#FF0000">&nbsp;*&nbsp;</font></td>
            </tr>
            <tr>
              <td>
                付款方式：
                  <input name="fukuantype" type="radio" id="radio" value="一次性" checked="checked" />
                  一次性
                  <input type="radio" name="fukuantype" id="radio2" value="分期" />分期
                  <font color="#FF0000">&nbsp;*&nbsp;</font></td>
            </tr>
          </table>
        </div>
        <div style="line-height:27px;margin-right:10px; height:27px; background-image:url(img/Snap13.jpg);"><span style="padding-left:10px; color:#404b4f; font-size:14px;">联系方式</span></div>
       <div>
          <table width="100%" height="59" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td><table width="96%" height="59" border="0" align="center" cellpadding="3" cellspacing="0" style="color:#404b4f; font-size:14px;">
                <tr>
                  <td width="12%">姓&nbsp;&nbsp;名：</td>
                  <td width="88%"><input name="name1" type="text" id="name1" maxlength="5" /><font color="#FF0000">&nbsp;*&nbsp;</font></td>
                </tr>
                <tr>
                  <td>性&nbsp;&nbsp;别：</td>
                  <td><select name="sex" id="sex">
                    <option value="男">男</option>
                    <option value="女">女</option>
                  </select><font color="#FF0000">&nbsp;*&nbsp;</font></td>
                </tr>
                <tr>
                  <td>手&nbsp;&nbsp;机：</td>
                  <td><input name="shouji" type="text" id="shouji" maxlength="13" /><font color="#FF0000">&nbsp;*&nbsp;</font></td>
                </tr>
                <tr>
                  <td>地&nbsp;&nbsp;区：</td>
                  <td><script language="javascript">showprovince('province', 'city', '');showcity('city', '');</script>
                  <font color="#FF0000">&nbsp;*&nbsp;</font></td>
                </tr>
                <tr>
                  <td>邮&nbsp;&nbsp;箱：</td>
                  <td><input name="email" type="text" id="email" maxlength="50" />
                    <font color="#FF0000">&nbsp;*&nbsp;</font></td>
                </tr>
              </table></td>
            </tr>
          </table>
        </div>
        <div style="line-height:27px; margin-right:10px; height:27px; background-image:url(img/Snap13.jpg);"><span style="padding-left:10px; color:#404b4f; font-size:14px;">备注内容</span></div>
        <div>
          <table width="100%" height="59" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td><textarea name="beizhu" id="beizhu" cols="82" rows="8"></textarea></td>
                </tr>
                <tr>
                  <td height="20" align="center"><input type="hidden" name="carId" id="carId" value="<%=id%>" />
                    <input name="regTime" type="hidden" id="regTime" value="<%=date()%>" />
                    <input name="sort1" type="hidden" id="sort1" value="<%=sort1%>" />
                    <input name="sort2" type="hidden" id="sort2" value="<%=sort2%>" /></td>
                </tr>
              </table></td>
            </tr>
          </table>
        </div>
        <div style="text-align:center; padding-top:10px;"><input type="image" src="img/Snap14.jpg" name="button2" id="button2" value="提交" />&nbsp;&nbsp;<img src="img/Snap15.jpg" width="114" height="34" style="cursor:pointer;" onclick="document.formd4f5.reset();" /></div>
    </div>
</form>
<!--<div style="line-height:27px; margin-right:10px; height:27px; background-image:url(img/Snap13.jpg); margin-top:20px;"><span style="padding-left:10px; color:#404b4f; font-size:14px;">团购列表</span></div>-->
</div>

<!-----------列出所有报名人员------------->
<div>
  <table width="100%" border="0" cellspacing="0" cellpadding="5">
    <tr>
      <td>　</td>
    </tr>
  </table>
</div>
</td>
        </tr>
      </table>
      <!--#include file="../model_bottom.asp"-->
</div>
</body>
</html>
<%
'=============================
'功能：根据ID号获得sortName
function getSortNameById(iddd)
	dim rs_1232456
	if iddd = "" then
		getSortNameById = "未定义"
	else
		set rs_1232456 = conn.execute("select sortName from carSort where id="& iddd &"")
		if rs_1232456.eof then 
			getSortNameById = "未定义"
		else
			getSortNameById = rs_1232456("sortName")
		end if
		set rs_1232456 = nothing
	end if
end function
%>