<!--#include file="../conn.asp"-->
<%
pid = request.QueryString("pid")		'商品的ID编号

dim aa(8)
set rs_p = server.CreateObject("adodb.recordset")
rs_p.open "select * from zh_pro where id = "& pid &"",conn,1,1

if not rs_p.eof then
	aa(0) = rs_p("proImg")
	aa(1) = rs_p("price_shic")
	aa(2) = rs_p("price_xianshi")
	aa(3) = datediff("d",date(),rs_p("time_xianshi"))
	aa(4) = rs_p("jianjie")
	aa(5) = rs_p("Proname")
	aa(6) = rs_p("bigClass")
end if
rs_p.close
set rs_p = nothing

%>
<!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 language="javascript">
/*表单提交验证*/
function chk()
{
	
	if(getId("name1").value.Trim()=="")
	{
		alert("请填写您的姓名。");
		getId("name1").focus();
		return false;
	}
	
	if(getId("tel").value.Trim()=="")
	{
		alert("请填写您的联系电话。");
		getId("tel").focus();
		return false;
	}
	
	if(/[a-zA-Z]/gi.test(getId("tel").value)==true)
	{
		alert("请正确填写您的联系电话。");
		getId("tel").focus();
		return false;
	}
	
	if(getId("youjiAddr").value.length <= 5)
	{
		alert("请详细填写您的邮寄地址。");
		getId("youjiAddr").focus();
		return false;
	}
	
	if(getId("pname").value=="")
	{
		alert("商品名称不能为空。");
		return false;
	}
	
	if(getId("num").value=="")
	{
		alert("请填写购买商品数量。");
		getId("num").focus();
		return false;
	}
}

</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">
<!--#include file="top.asp"-->
<!--#include file="zh_daohang.asp"-->
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="29%" bgcolor="#f0f0f0">&nbsp;</td>
          <td width="1%">&nbsp;</td>
          <td width="70%">&nbsp;</td>
        </tr>
        <tr>
          <td valign="top" bgcolor="#f0f0f0">
            <!--#include file="paihang.asp"-->
          <div style="text-align:center; padding:10px 0;"><img src="zh_img/Snap2.jpg" width="257" height="67" /></div>
          <!--#include file="chengjiao.asp"--><br />
          <!--#include file="model_cuxiao.asp"--><br />
          <!--#include file="pinpai.asp"--><br /></td>
          <td><div style="width:12px;"></div></td>
          <td valign="top">
          <div>
          <table width="100%" height="60" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="33%" style="border-right:dotted 1px #CCCCCC;"><img src="/<%=aa(0)%>" alt="" width="190" /></td>
              <td width="4%" valign="top">&nbsp;</td>
              <td width="63%" valign="top"><div style="font-size:16px; font-weight:bold; margin-bottom:15px;"><%=aa(5)%></div>
              <div style="padding-left:10px; line-height:180%; color:#969789;">市场价格：<span style="text-decoration:line-through;"><%=aa(1)%></span>&nbsp;元<br />
              限时特价：<span style="color:#FF4900;"><%=aa(2)%></span>&nbsp;元<br />
              节&nbsp;&nbsp;&nbsp;&nbsp;省：<%=cint(aa(1)) - cint(aa(2))%>&nbsp;元<br />
              剩余时间：<%=aa(3)%>&nbsp;天<br />
              </div></td>
            </tr>
          </table>
        </div>
          
<div style="border:solid 1px #a6bcc9; margin-top:10px;">
<form name="formd4f5" id="formd4f5" method="post" action="baoming_fun.asp" onSubmit="return chk()">
  <div style="padding-left:10px;">
        <div style="margin-top:10px; line-height:25px; background-image:url(zh_img/Snap17.jpg); background-repeat:no-repeat;">
        	<span style="margin-left:18px; color:#FFFFFF; font-weight:bold; font-size:14px;">报名购买</span>
        </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(/tuangou/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="14%">姓&nbsp;&nbsp;&nbsp;&nbsp;名：</td>
                  <td width="86%"><input name="name1" type="text" id="name1" size="10" maxlength="8" />
                    <font color="#FF0000">&nbsp;*&nbsp;</font></td>
                </tr>
                <tr>
                  <td>联系电话：</td>
                  <td><input name="tel" type="text" id="tel" size="15" maxlength="15" />
                    <font color="#FF0000">&nbsp;*&nbsp;</font></td>
                </tr>
                <tr>
                  <td>邮寄地址：</td>
                  <td><input name="youjiAddr" type="text" id="youjiAddr" size="50" maxlength="50" />
                  <font color="#FF0000">&nbsp;*&nbsp;</font></td>
                </tr>
                <tr>
                  <td>邮&nbsp;&nbsp;编：</td>
                  <td><input name="youbian" type="text" id="youbian" size="10" maxlength="6" /></td>
                </tr>
                <tr>
                  <td>商品名称：</td>
                  <td><input name="pname" type="text" id="pname" maxlength="50" value="<%=aa(5)%>" readonly="readonly" />
                    <font color="#FF0000">*&nbsp;</font></td>
                </tr>
                <tr>
                  <td>商品数量：</td>
                  <td><input name="num" type="text" id="num" value="1" size="5" maxlength="10" />
                    <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(/tuangou/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">&nbsp;</td>
                </tr>
              </table></td>
            </tr>
          </table>
        </div>
        <div style="text-align:center; padding-top:10px;"><input type="image" src="/tuangou/img/Snap14.jpg" name="button2" id="button2" value="提交" />
        &nbsp;&nbsp;<img src="/tuangou/img/Snap15.jpg" width="114" height="34" />
        <input name="pid" type="hidden" id="pid" value="<%=pid%>" />
        <input name="bigClass" type="hidden" id="bigClass" value="<%=aa(6)%>" />
        </div>
    </div>
</form>
</div>

<!-----------列出所有报名人员------------->
<div>
  <table width="100%" border="0" cellspacing="0" cellpadding="5">
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
</td>
        </tr>
      </table>
      <!--#include file="../model_bottom.asp"-->
</div>
</body>
</html>