<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<!--#include file="FFunction.asp"-->
<!--#include file="FHeadTitle.asp"-->
<!--#include file="include/coding.asp "-->
<!--#include file="include/tishi.asp" -->
<!--#include file="include/page.asp" -->
<!--#include file="include/money.asp" -->
<!--#include file="include/defray.asp" -->
<style type="text/css" media="screen">
@import url("home/css/global/v1.2.css@t=20060512.css");
@import url("home/css/layout.css@t=20050712.css");
@import url("home/css/component.css@t=20060512.css");
@import url("home/css/sys/frontpage.css@t=20060512.css");
</style>
<body class="<%= pagestyle%>">
<div class="HackBox"></div>
<%IsShowHotKey=False
IsShowChannel=False%>
<!--#include file="FHeadAll.asp"-->

<%
'禁止网页缓存及涮新
Response.Buffer = true
Response.ExpiresAbsolute = Now() - 1 
Response.Expires = 0 
Response.CacheControl = "no-cache"
hy "../user/login.asp"
If shopnet("userid") ="" Then
response.write "<br>非常抱谦，参数错误。"
response.end
end If
%>
<%
shopid=decode(shopnet("userid"))
cpid=decode(shopnet("cpid"))
buyxianzhi=CLng(request("buyxianzhi"))


if cpid<>"" And IsNumeric(cpid) then
set rs = conn.execute("select * from chanpin where cang=0 and id="&cpid&"")
if rs.eof then
Response.Write("<script>alert(""错误的产品ID，隐藏产品或未审核产品不能购买!"");history.back();</script>")
Response.end
End if
If rs("sj2")<now() then
Response.Write("<script>alert(""错误提示：该产品已结束销售。"");history.back();</script>")
Response.End
End if
if request.cookies(rikee)("huiyuan")=rs("huiyuan") then

Response.Write("<script>alert(""错误提示：不能购买自己的商品!"");history.back();</script>")
Response.End
End if
rs.close
set rs=Nothing
set rs1 = conn.execute("select xinyong from huiyuan where huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"'")
if Not rs1.eof Then
xinyong2=rs1("xinyong")
rs1.close
set rs1=Nothing
set rs2 = conn.execute("select buyxianzhi,number from chanpin where id="&cpid&"")
if Not rs2.eof Then
buyxianzhi=rs2("buyxianzhi")
cpnumber=rs2("number")
rs2.close
set rs2=Nothing
If buyxianzhi>xinyong2 Then
Response.Write("<script>alert(""掌柜设置了星级限制，您的信用没有达到"&buyxianzhi&"!"");history.back();</script>")
Response.end
End If
End If
End If
%>

  <TABLE width=762 align="center" cellPadding=0 cellSpacing=0 bgcolor="#FFFFFF" class="table-zuoyou">
    <TR>
    <TD width="760" valign="top" class="table-shang"><table width="760" cellpadding="0" cellspacing="0">
          <tr> 
            <td height="30" valign="middle">&nbsp;您目前的位置：<a href="index.asp">首页</a> 
              -&gt;购物结算(个人信息及配送/支付方式)</td>
          </tr>
        </table> 
      <table width="98%" align="center" cellpadding="0" cellspacing="0">
         <tr> 
            <td height="1"  colspan="6" background="/image/1x3.gif"></td>
        </tr></table> <table width="550" align="center">
      </table>
<script language="javascript">
<!--//
function checksignup() {
if ( document.formSignUp.name.value == '' ) {
window.alert('请输入您的名称!!');
document.formSignUp.name.focus();
return false;}
if ( document.formSignUp.dz.value == '' ) {
window.alert('请输入联系地址!!');
document.formSignUp.dz.focus();
return false;}
if ( document.formSignUp.dz.value.length<5) {
window.alert('请输入详细的联系地址!!');
document.formSignUp.dz.focus();
return false;}
if ( document.formSignUp.yb.value == '' ) {
window.alert('请输入联系人邮政编码!!');
document.formSignUp.yb.focus();
return false;}
if(isNaN(document.formSignUp.yb.value)||( document.formSignUp.yb.value.length!=6)) {
window.alert('邮政编码必须为6位数字！');
document.formSignUp.yb.focus();
return false;}
if ( document.formSignUp.tel.value == '' ) {
window.alert('请输入联系人电话!!');
document.formSignUp.tel.focus();
return false;}
if(isNaN(document.formSignUp.tel.value)||(document.formSignUp.tel.value.length<7)) {
window.alert("请输入您的有效电话号码,只能是7位以上的数字!!");
document.formSignUp.tel.focus();
return false;}
if ( document.formSignUp.mail.value.length> 0 &&!document.formSignUp.mail.value.indexOf("@")==-1|document.formSignUp.mail.value.indexOf(".")==-1 ) {
window.alert('请输入您正确的Email地址!!');
document.formSignUp.mail.focus();
return false;}
if (( document.formSignUp.number.value == '' )||(isNaN(document.formSignUp.number.value))||(document.formSignUp.number.value<1) ){
window.alert('请正确输入产品数量，只能为大于1的数值!!');
document.formSignUp.number.focus();
return false;}
if (document.formSignUp.read.value.length>500){
window.alert("备注不能超过500个字符！");
document.formSignUp.read.focus();
return false;}
return true;}
//-->
</script>
<% set rs = conn.execute("select name,dz,yb,tel,mail,shouji from huiyuan where huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"'") %>  
<br><TABLE width=580 border="0" align="center" cellpadding="6" cellspacing="1" bgcolor="#efefef">
  <FORM action=order.asp?cpid=<%=shopnet("cpid")%> method=post name=formSignUp id="formSignUp">
<SCRIPT language=JavaScript1.2>
scores = new Array(20);
var numTotal=0;
NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;
function initIt()
{ 
	if (!ver4) return;
	if (NS4) 
	{
		if(document.formSignUp.lb[0].checked||document.Club_reister_timelength.lb[1].checked)
		{
			for (i=0; i<document.layers.length; i++) g
			{ 
				whichEl = document.layers[i];
				if (whichEl.id.indexOf("Child") != -1)  whichEl.visibility = "hide"; 
			}
		}
		else
		{
			for (i=0; i<document.layers.length; i++) 
			{ 
				whichEl = document.layers[i];
				if (whichEl.id.indexOf("Child") != -1)  whichEl.visibility = "show"; 
			}
		}
		arrange();    
	} 
	else 
	{ 
		divColl = document.all.tags("DIV");
		if(document.formSignUp.lb[0].checked||document.formSignUp.lb[1].checked)
		{
			for (i=0; i<divColl.length; i++) 
			{ 
				whichEl = divColl(i);
				if (whichEl.className == "child") whichEl.style.display = "none"; 
			}    
		}
		else
		{
			for (i=0; i<divColl.length; i++) 
			{ 
				whichEl = divColl(i);
				if (whichEl.className == "child") whichEl.style.display = "block"; 
			}    
		}
	}
}
function ShowTime(el) 
{
	if (!ver4) return; 
	if (IE4) 
	{ 
		whichEl1 = eval(el + "Child");
		whichEl1.style.display = "block";        
	}
	else 
	{ 
		whichEl = eval("document." + el + "Child"); 
		whichEl.visibility = "show";        
		arrange();
	}
}
function HideTime(el)
{
	if (!ver4) return; 
	if (IE4) 
	{ 
		whichEl1 = eval(el + "Child");
		whichEl1.style.display = "none"; 
	}
	else 
	{ 
		whichEl = eval("document." + el + "Child"); 
		whichEl.visibility = "hide";
		arrange();    
	}
}
onload = initIt;
</SCRIPT>
          
          <TR valign="middle"> 
            <TD height=22 colspan="2" align="left" background="../image/bk3.jpg" bgcolor="#FFFFFF">购物结算--您的个人信息</TD>
          </TR>
          <TR valign="middle"> 
            <TD width="149" height=25 align="right" bgcolor="#FFFFFF" class=main1>真实姓名：</TD>
            <TD width="419" height=25 bgcolor="#FFFFFF" class=main1> 
              <INPUT                  name=name class="wenbenkuang" id="name"  onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("name")%>" size=13 maxLength=49> 
            <font color="#ff3333">*</font></TD>
          </TR>
          <tr valign="middle"> 
            <TD height=25 align="right" bgcolor="#FFFFFF" class=main1>联系地址：</TD>
            <TD height=25 bgcolor="#FFFFFF" class=main1> 
              <INPUT                  name=dz class="wenbenkuang" id="dz"  onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("dz")%>" size=65 maxLength=200> 
            <font color="#ff3333">*</font> </TD>
          </tr>
          <tr valign="middle"> 
            <TD height=25 align="right" bgcolor="#FFFFFF" class=main1>邮政编码：</TD>
            <TD height=25 bgcolor="#FFFFFF" class=main1> 
              <INPUT                  name=yb class="wenbenkuang" id="yb" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("yb")%>" size=13 maxLength=16> 
            <font color="#ff3333">*</font> </TD>
          </tr>
          <tr valign="middle"> 
            <TD height=25 align="right" bgcolor="#FFFFFF" class=main1>联系电话：</TD>
            <TD height=25 bgcolor="#FFFFFF" class=main1> 
              <INPUT                  name=tel class="wenbenkuang" id="tel" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("tel")%>" size=23 maxLength=40> 
            <font color="#ff3333">*</font> </TD>
          </tr>
          <tr valign="middle">
            <TD height=25 align="right" bgcolor="#FFFFFF" class=main1>手机：</TD>
            <TD height=25 bgcolor="#FFFFFF" class=main1><input                  name=shouji class="wenbenkuang" id="shouji" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("shouji")%>" size=23 maxlength=40></TD>
          </tr>
          <tr valign="middle"> 
            <TD height=25 align="right" bgcolor="#FFFFFF" class=main1>电子信箱：</TD>
            <TD height=25 bgcolor="#FFFFFF" class=main1> 
            <INPUT                  name=mail class="wenbenkuang" id="mail"  onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=rs("mail")%>" size=35 maxLength=49>            </TD>
          </tr>
          <tr valign="middle">
            <TD height=25 colspan="2" bgcolor="#FFFFFF" class=main1>&nbsp;</TD>
          </tr>
          <tr valign="middle">
            <TD height=25 colspan="2" bgcolor="#FFFFFF" class=main1>购买数量:
            <INPUT                  name=number class="wenbenkuang" id="number"  onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="1" size=8 maxLength=5>&nbsp;&nbsp;剩余产品数量为<font color=red><%=cpnumber%></font><input type="hidden" name="cpnumber" id="cpnumber" value="<%=cpnumber%>"></TD>
          </tr>
          <tr valign="middle"> 
            <TD height=20 colspan="2" align="left" background="../image/bk3.jpg" bgcolor="#FFFFFF" class=main1>购物结算--货币支付方式</TD>
          </tr>
          <tr valign="middle"> 
            <TD height=40 colspan="2" bgcolor="#FFFFFF" class=main1><DIV class=child id=KB1Child>
              <input name="pay" type="radio" value="自行联系卖家付款" checked>
              自行联系卖家付款
              <%fukuan()%>
              
            </div></TD>
          </tr>
          <tr valign="middle"> 
            <TD height=30 colspan="2" align="left" background="../image/bk3.jpg" bgcolor="#FFFFFF" class=main1>购物结算--商品配送方式</TD>
          </tr>
          <tr valign="middle"> 
            <TD height=40 colspan="2" bgcolor="#FFFFFF" class=main1> 
<%rs.close
set rs=nothing
fukuan2()
if mai="卖家负担费用" then
fukuan3()
end if
%>            </TD>
          </tr>
          <tr valign="middle">
            <TD height=19 colspan="2" align="left" valign="bottom" background="../image/bk3.jpg" bgcolor="#FFFFFF" class=main1>产品配送费用:</TD>
          </tr>
          <tr valign="middle">
            <TD height=40 colspan="2" bgcolor="#FFFFFF" class=main1>
              <%if mai="卖家承担运费" then%><%=mai%>：<%end if%><input name="feiyong" type="radio" value="特快专递" checked>
              特快专递(EMS)：<%=amount%>元&nbsp; <input type="radio" name="feiyong" value="平邮">
            平邮：<%=amount1%>元&nbsp; <input type="radio" name="feiyong" value="快递">
            快递：<%=amount2%>元
            <input name="amount" type="hidden" id="amount" value="<%=amount%>">
            <input name="amount1" type="hidden" id="amount1" value="<%=amount1%>">
            <input name="amount2" type="hidden" id="amount2" value="<%=amount2%>"></TD>
          </tr>
          <tr valign="middle"> 
            <TD height=20 colspan="2" align="left" valign="bottom" background="../image/bk3.jpg" bgcolor="#FFFFFF" class=main1>产品脱销方案</TD>
          </tr>
          <tr valign="middle"> 
            <TD height=25 colspan="2" bgcolor="#FFFFFF" class=main1>假如发生产品脱销现象，我们不能在约定期限给您发货，请您选择如下的一种处理方式            </TD>
          </tr>
          <tr valign="middle"> 
            <TD height=25 colspan="2" bgcolor="#FFFFFF" class=main1>
<input name="tx" type="radio" value="等货" checked>
              等货 
              <input name="tx" type="radio" value="取消订单">
            取消订单 </TD>
          </tr>
          <tr valign="middle"> 
            <TD height=25 align="right" bgcolor="#FFFFFF" class=main1>订单备注：</TD>
            <TD height=25 bgcolor="#FFFFFF" class=main1> 
            <textarea name="beizhu" cols="54" rows="4" class="wenbenkuang" id="beizhu" title="备注的内容，请保持在500字以内。
谢谢您对我们的支持！" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></textarea>            </TD>
          </tr>
          <tr valign="middle"> 
            <TD height=25 colspan="2" align="center" bgcolor="#FFFFFF" class=main1>如果需要<font color="#FF3300"><strong>发票</strong></font>，请在订单备注中标明，并附上开票信息。如果您有其它问题也可在订单备注中填写。</TD>
          </tr>
          <tr valign="middle"> 
            <TD height=20 colspan="2" align="center" bgcolor="#FFFFFF" class=main1> 
              <input name="Submit" type="button" class="go-wenbenkuang" value="上一步" onFocus="this.blur()" onClick="javascript:window.history.go(-1)"> 
              <input name="Submit2" type="submit" onClick="javascript:return checksignup()" class="go-wenbenkuang" value="OK,下一步" onFocus="this.blur()"> 
            <input name="userid" type="hidden" id="userid" value="<%=request("userid")%>">            </TD>
          </tr>
          
        </FORM>
      </TABLE>
      <br></TD>
  </TR>
</TABLE>
<%
Else
Response.Write("<script>alert(""错误提示：错误的参数提交！"");history.back();</script>")
End if
%>
<!--#include file="bottom.asp" -->
