<!--#include file="include/conn.asp"-->
<!--#include file="menu.asp"-->
<%
Dim ProId
ProId=Trim(request("ProId"))
Dim cc,ys
Dim aaaa,bbbb,cccc,dddd,eeee,ffff,gggg,hhhh,iiii,tttt,alltotal,zzzz,uv,umm
Dim chicun,yanse,cpcp
aaaa=Trim(request("aaaa"))
bbbb=Trim(request("bbbb"))
cccc=Trim(request("cccc"))
dddd=Trim(request("dddd"))
eeee=Trim(request("eeee"))
ffff=Trim(request("ffff"))
gggg=Trim(request("gggg"))
hhhh=Trim(request("hhhh"))
iiii=Trim(request("iiii"))
tttt=Trim(request("tttt"))
alltotal=Trim(request("alltotal"))
zzzz=Trim(request("alltotal"))
cpcp=Trim(request("cpcp"))
chicun=Trim(request("chicun"))
yanse=Trim(request("yanse"))
If action="addorder" Then

If session("userid")="" Then
	Call alert("对不起您不是会员，无法直接购买。\n请注册成会员之后再购买。","/UserCenter.asp?gaozhen=myinfo")
Else
	oConn.Execute("INSERT INTO [LstOrder] (OProName,ONo,OPro,ONum,OName,OAddress,OTel,OZip,OEmail,OContent,OUserId,OState,OAddtime,OCCC,OYYY,Omoney,Ozongjia) VALUES ('"&cpcp&"','"&iiii&"','"&gggg&"','"&hhhh&"','"&aaaa&"','"&bbbb&"','"&cccc&"','"&dddd&"','"&eeee&"','"&ffff&"','"&session("userid")&"',0,now(),'"&chicun&"','"&yanse&"',0,'"&zzzz&"')")
End If
session("orderlst") = ""
	Call backurl("/Shopping3.asp?ddbh="&iiii&"")

End If
Set oRs=server.createobject("adodb.recordset")
sSql = "Select * From [LstPro]"
sSql = sSql& " Where Id ="&ProId
oRs.open sSql,oConn,3,3
cc = split(oRs("PSize"),"|")
ys = split(oRs("PColor"),"|")

%>
<!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" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<!---通用配置--->
<title>团购信息_<%=sWeb("WebTitle")%>_<%=sWeb("WebUrl")%>_Powered by www.gaozhen.name QQ_47329193</title>
<meta name="keywords" content="<%=sWeb("WebKeyWord")%>" />
<meta name="description" content="<%=sWeb("WebDescription")%>" />
<meta name="author" content="<%=sWeb("WebAuthor")%>" />
<meta name="copyright" content="<%=sWeb("WebCopyright")%>" />
<meta content="all" name="robots" />
<link rel="shortcut icon" href="/include/favicon/favicon.ico" />
<link rel="icon" href="/include/favicon/favicon.gif" type="image/gif" >
<link type="text/css" href="/include/css/global.css" rel="stylesheet" />
<script type="text/javascript" src="/include/Js/config.js"></script>
<script src="/css/addorder.js" type="text/javascript"></script>
<!---网站配置--->
<link type="text/css" href="/css/style.css" rel="stylesheet" />
</head>
<body>
<%Call TopMenu()%>
<%Call HeadMenu()%>
<div id="maindiv">
<!---主体部分--->
<div id="lstpro">
	<div id="lstleft">
	<div id="llfff">
	<div class="scontads"><%=BANNERSS(12,226,200)%></div>
	</div>
	<!--#include file="Leftpro.asp"-->
	</div>
	<div id="lstright">
	<div id="rrfff">
	<div class="sgohome">您现在的位置：首页 >> 提交订单</div>
	<div class="stitle"><h1>请如实填写以下信息</h1></div>
	<div class="scont">
<script>
function showprice(){
    var tttt = document.getElementById("tttt");
    var hhhh = document.getElementById("hhhh");
    var alltotal = document.getElementById('alltotal');
    //alltotal.value = parseInt(tttt.value,10) * parseInt(hhhh.value,10)+'' ;
	if (alltotal.value=="NaN")
	{
	alltotal.value = '0' ;
	}
	else
	{
	alltotal.value = parseInt(tttt.value,10) * parseInt(hhhh.value,10)+'' ;
	}
}
</script>
<form action="?ProId=<%=ProId%>&action=addorder" name="order" method="post">
<table border="0" width="744" cellspacing="1" style="border-collapse: collapse">
<tr>
	<td height="31" width="19%" align="center" bgcolor="#E27C16">
	<font color="#FFFFFF"><b>产品名称</b></font></td>
	<td height="31" align="center" bgcolor="#E27C16" width="18%">
	<font color="#FFFFFF"><b>市场价格</b></font></td>
	<td height="31" align="center" bgcolor="#E27C16" width="17%">
	<font color="#FFFFFF"><b>团购价格</b></font></td>
	<td height="31" align="center" bgcolor="#E27C16" width="8%">
	<font color="#FFFFFF"><b>数量</b></font></td>
	
	<td height="31" align="center" bgcolor="#E27C16" width="18%">
	<font color="#FFFFFF"><b>应付总价</b></font></td>
</tr>
<%While Not oRs.EOF%>
<tr>
	<td width="19%" bgcolor="#F3F5FC" align="center" height="52">
	<img width="50" height="50" src="<%=oRs("PSmallPic")%>" border="0"></td>
	<td bgcolor="#F3F5FC" align="center" height="52" width="18%">￥ <%=oRs("PSmoney")%></td>
	<td bgcolor="#F3F5FC" align="center" height="52" width="17%">￥ <%=oRs("PTuanMoney")%><input name="tttt" value="<%=oRs("PTuanMoney")%>" type=hidden></td>
	<td bgcolor="#F3F5FC" align="center" height="52" width="8%">
	<input type="text" VALUE="1" id="total" size="2" name="hhhh" onkeyup="this.value=this.value.replace(/\D/g,'')"  onafterpaste="this.value=this.value.replace(/\D/g,'')"></td>
	<input name="cpcp" type="hidden" value="<%=oRs("PTitle")%>">
	<td bgcolor="#F3F5FC" align="center" height="52" width="18%"><input type="text" size="5" id="alltotal" name="alltotal" onfocus="showprice();" /> 元
</td>
</tr>
<%
oRs.MoveNext
Wend
%>
</table>


<table width="744" border="0" cellpadding="0" cellspacing="0" height="249" onmousemove="showprice();">
<tr bgcolor="#F3F3F5">
<td height="30" align="right" bgcolor="#FAFAFA"> 订单编号：</td>
<td height="30" align="left" bgcolor="#FAFAFA"><input disabled name="x" value="<%=getOrdernum()%>" /> <B class="fred">* 请牢记此订单号。</B>
<input name="iiii" type="hidden" value="<%=getOrdernum()%>" />
<input name="gggg" type="hidden" size="50" value="<%=ProId%>" />
</td>
</tr>
<tr bgcolor="#FAFAFA">
<td height="30" align="right"> 颜色要求：</td>
<td height="30" align="left"><%if Isarray(ys) Then%><%For i = 0 To UBound(ys)%><input type="radio" name="yanse" value="<%=ys(i)%>"><%=ys(i)%>  <%next%><%End If%></td>
</tr>
<tr bgcolor="#FAFAFA">
<td height="30" align="right"> 尺寸要求：</td>
<td height="30" align="left"><%if Isarray(cc) Then%><%For i = 0 To UBound(cc)%><input type="radio" name="chicun" value="<%=cc(i)%>"><%=cc(i)%>  <%next%><%End If%></td>
</tr>
<tr bgcolor="#F3F3F5">
<td height="30" align="right" bgcolor="#FAFAFA"> 您的姓名：</td>
<td height="30" align="left" bgcolor="#FAFAFA">
<input size="10" name="aaaa" type="text" value="" />
</td>
</tr>
<tr bgcolor="#F3F3F5">
<td height="30" align="right"> 送货地址：</td>
<td height="30" align="left">
<input name="bbbb" type="text" size="50" value="<%If session("userid")="" Then%><%else%><%=Uid("UsrAddress")%><%End If%>" /></td>
</tr>
<tr bgcolor="#FAFAFA">
<td height="30" align="right"> 您的电话：</td>
<td height="30" align="left"><input name="cccc" type="text" size="15" value="<%If session("userid")="" Then%><%else%><%=Uid("UsrTel")%><%End If%>" /></td>
</tr>
<tr bgcolor="#F3F3F5">
<td height="30" align="right"> 邮政编码：</td>
<td height="30" align="left"><input name="dddd" type="text" size="10" value="<%If session("userid")="" Then%><%else%><%=Uid("UsrZip")%><%End If%>" /></td>
</tr>
<tr bgcolor="#FAFAFA">
<td height="30" align="right">您的邮箱：</td>
<td height="30" align="left"><input name="eeee" type="text" size="30" value="<%If session("userid")="" Then%><%else%><%=Uid("UsrEmail")%><%End If%>" /></td>
</tr>
<tr bgcolor="#F3F3F5">
<td height="96" align="right">其他说明：</td>
<td height="96" align="left">
<textarea name="ffff" cols="50" rows="6"></textarea>
<input name="ffff" value="【团购标识】" type=hidden></td>
</tr>
<tr bgcolor="#F3F3F5">
<td height="30" align="right" bgcolor="#FAFAFA"></td>
<td height="30" align="left" bgcolor="#FAFAFA"><input class="anlockblue" name="s" type="submit" onClick="return check()"  value="提交订单">
* 认真填写
</td>
</tr>
</table>
</form>

      

	</div>
	</div>
	</div>
</div>
<!---版权部分--->
<div class="clear"></div>
<%Call HelpMenu()%>
<%Call ShowEnd()%>
</div>
</body>
</html>
