<!--#include file="top.asp"-->
<title><%=sitename%>--̨</title>
<BODY LEFTMARGIN="0" TOPMARGIN="0" background="images/sybj.gif" align="center">
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tr>
<td width=180 valign="top">
<!--#include file="include/56770_userlogins.asp"-->
</td>
<td width=5></td>
<td align="center" width="565">
<script language="JavaScript">
<!--
if(parent.frames.length > 0)
{ 
        parent.location.href = location.href;
}
function form1_onsubmit()
{
        if(document.form1.to_name.value == "")
        {
                alert("ջΪա")
                document.form1.to_name.focus()
                return false
        }
        else if(document.form1.to_adds.value == "")
        {
                alert("ջ˵ַΪա")
                document.form1.to_adds.focus()
                return false
        }
        else if(document.form1.postcode.value == "")
        {
                alert("ջʱ಻Ϊա")
                document.form1.postcode.focus()
                return false
        }
        else if(document.form1.tel.value == "")
        {
                alert("ϵ绰Ϊա")
                document.form1.tel.focus()
                return false
        }
        else if(document.form1.email.value == "")
        {
                alert("ϵ䲻Ϊա")
                document.form1.email.focus()
                return false
        }
        else if(document.form1.other.value == "")
        {
                alert("עΪա")
                document.form1.other.focus()
                return false
        }
}
// -->
</script>
<%
if session("user_id")="" then
        response.redirect "login.asp"
response.end
end if
set rs=server.createobject("adodb.recordset")
if request("action")="buy" then
        if request("count")="" then
        count=1
else
        count=request("count")
end if
if request("hw_id")="" then
        response.write "ûд˻!"
else
        hw_id=request("hw_id")
end if
sql="select * from 56770_basket where hw_id='"&hw_id&"' and user_id='"&session("user_id")&"' and basket_check=false"
rs.open sql, conn, 3, 3
if rs.eof then
        rs.addnew
rs("user_name")=user_name
rs("hw_id")=hw_id
rs("user_id")=session("user_id")
rs("basket_count")=count
rs("basket_date")=now()
rs("product_name")=request("product_name")
rs("price")=request("price")
rs("user_type")=request("user_type")
else
        rs("basket_count")=int(rs("basket_count"))+int(count)
end if
rs.update
rs.close
%>
<%end if%>
<form method="POST" language="javascript" onsubmit="return form1_onsubmit()" name="form1" action="cashsave.asp">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3"><img src="images/top/protop.gif" width="565" border="0"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" bgcolor="#CCCCCC"><img src="images/space.gif" width="1" height="1" border="0"></td>
<td>
<table width="563" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" valign="top" align="center">
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#ffffff">
<tr align="center">
<td width="195" height="25" bgcolor="#C9C3AD"> Ʒ</td>
<td width="60" height="25" bgcolor="#C9C3AD"> </td>
<td width="60" height="25" bgcolor="#C9C3AD"> </td>
<td width="80" height="25" bgcolor="#C9C3AD"> ϼ</td>
</tr>
<%
user_id=session("user_id")
sql="select * from 56770_basket where user_id='"&user_id&"' and basket_check=false"
rs.open sql, conn, 3, 3
if rs.eof then
        response.write "ûжκƷ"
else
        do while not rs.eof
%>
<tr>
<td width="195" height="25" bgcolor="#C9C3AD"><div align="center"><font color=red><%=rs("product_name")%></font></div></td>
<td width="60" height="25" bgcolor="#C9C3AD"><div align="center"><%=rs("price")%>Ԫ</div></td>
<td width="60" height="25" bgcolor="#C9C3AD"><div align="center"><%=rs("basket_count")%></div></td>
<td width="80" height="25" bgcolor="#C9C3AD"><div align="center"><%=rs("price")*rs("basket_count")%>Ԫ
</div></td>
</tr>
<%totalcash=totalcash+(rs("price")*rs("basket_count"))%>
<%rs.movenext
loop
end if
rs.close
%>
<tr>
<td height="25" background="images/cart/buy_02.gif"><div align="center"><b class="dz1">ܼƣ<font color=red><%=totalcash%></font>Ԫ</b></div><input type=hidden name=totalcash value="<%=totalcash%>"></td>
<td height="25" colspan="3" background="images/cart/buy_02.gif">
</td>
</tr>
</table>
</td>
</tr>
</table>
</TD><td width="1" bgcolor="#CCCCCC"><img src="images/space.gif" width="1" height="1" border="0"></td>
</TR>
<tr>
		<td colspan="3"><img src="images/top/storelower.gif" width="565" height="9" border="0"></td>
	</tr></TABLE>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3"><img src="images/top/protop.gif" width="565" border="0"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" bgcolor="#CCCCCC"><img src="images/space.gif" width="1" height="1" border="0"></td>
<td>
<table width="563" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="center">
<font color="#FF0000"><b>*ĹϢѾȷϽ޷޸ģдÿһϢлл</b></font>
</div>
<%
set rs1=server.CreateObject("adodb.recordset")
sql="select top 1 * from 56770_user where user_id='"&session("user_id")&"'"
rs1.open sql, conn, 1, 2
%>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#C9C3AD">
<tr>
<td height="25" colspan="2" background="images/cart/buy_02.gif"> <font color=white>дջ˵ϸϢ</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">
<div align="right"></div>
</td>
<td width="81%" height="25">
<input style="FONT-SIZE: 12px; WIDTH: 110px" type="text" name="to_name" size="20" class=input value="<%=rs1("user_name")%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">
<div align="right">ַ</div>
</td>
<td height="25">
<input style="FONT-SIZE: 12px; WIDTH: 210px" type="text" name="to_adds" size="40" class=input value="<%=rs1("user_adds")%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">
<div align="right">ʱࣺ</div>
</td>
<td height="25">
<input style="FONT-SIZE: 12px; WIDTH: 110px" type="text" name="postcode" size="10" class=input value="<%=rs1("user_postalcode")%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">
<div align="right">绰</div>
</td>
<td height="25">
<input style="FONT-SIZE: 12px; WIDTH: 110px" type="text" name="tel" size="20" class=input value="<%=rs1("user_tel")%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="25">
<div align="right">E-mail</div>
</td>
<td height="25">
<input style="FONT-SIZE: 12px; WIDTH: 110px" type="text" name="email" size="20" class=input value="<%=rs1("user_mail")%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="12">
<div align="right">ʽ</div>
</td>
<td height="25">
<select size="1" name="paymenttype">
<option value=""></option>
<option value="ת">ת</option>
<option value=""></option>
</select>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="12">
<div align="right">ͷʽ</div>
</td>
<td height="25">
<select size="1" name="sendtype">
<option value="ͻ">ͻ</option>
<option value="ͨʼ">ͨʼ</option>
<option value="ؿר">ؿר</option>
</select>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="19%" height="12">
<div align="right">ע<br>
(50)</div>
</td>
<td height="12"> 
<textarea style="FONT-SIZE: 12px; WIDTH: 250px" name="other" cols="30" class="input" rows="3"></textarea>
</td>
</tr>
<tr bgcolor="#FFFFFF" align="center">
<td height="35" colspan="2">
<table width="40%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<div align="center">
<input type="submit"  name="form22" value="ȷ"class="submit">
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</TD><td width="1" bgcolor="#CCCCCC"><img src="images/space.gif" width="1" height="1" border="0"></td>
</TR>
<tr>
		<td colspan="3"><img src="images/top/storelower.gif" width="565" height="9" border="0"></td>
	</tr></TABLE>
</td>
</tr>
</table>
<!--#include file="footer.asp"-->
