| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 227 人关注过本帖
标题:类型不匹配。求教!
只看楼主 加入收藏
t502737399
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2011-4-19
收藏
 问题点数:0 回复次数:0 
类型不匹配。求教!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<!--#include file="conn.asp"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>生成订单</title>
</head>

<body>
<%
if trim(session("username"))="" then
response.redirect "login.asp"
end if
if lcase(trim(request("action")))="save" then
if trim(request("Consignee"))<>"" then
set rs=server.CreateObject("ADODB.RecordSet")
rs.open "tblIndent",conn,1,3
rs.addnew
'//生成订单编号
'//订单编号等于当前时间加上当前记录数,如果已存在,则加1
IndentID=year(now())&month(now())&day(now())&hour(now())&minute(now())&second(now())&cstr(rs.recordcount)
rs("IndentID")=IndentID
rs("Consignee")=trim(request("Consignee"))
rs("Sex")=trim(request("Sex"))
rs("Telephone")=trim(request("Telephone"))
rs("Email")=trim(request("Email"))
rs("Address")=trim(request("Address"))
rs("Postcode")=trim(request("Postcode"))
rs("Content")=trim(request("Content"))
rs("Invoice")=trim(request("Invoice"))
rs("AddDatetime")=now()
rs.update
rs.close
set rs=nothing
//更新购物车表中属于本用户且状态值更新为0的商品记录
conn.execute "UPDATE tblCart SET IndentID="&cstr(IndentID)&",Status=1 WHERE Status=0 AND UserName='"&session("UserName")&"'"
response.write "恭喜您! "&session("UserName")&" 您订单已经生成,订单号:"&cstr(IndentID)&"<br>我们将以最快的时间为您送货上门!再次感谢您的光临惠顾!<br>"
response.write "<a href=class.asp>返回首页</a>"
response.end
end if
end if
%>
<body>
<table border="0" width="100%" id="table1" cellspacing="0"
cellpadding="0">
<tr>
<td>
<form name="cart" method="POST" action="cart.asp">
<table border="1" width="100%" id="table2" cellspacing="0"
cellpadding="0" height="100%">
<tr>
<td align="center">商品名称</td>
<td align="center">数量</td>
<td align="center">单价</td>
<td align="center">总价</td>
</tr>
<%
'//读取购物车商品清单
set rs=server.CreateObject("ADODB.RecordSet")
sql="SELECT tblCart.CartID, tblProduct.ProductID, tblProduct.ProductName, tblCart.BuyCount,"&_
"tblCart.Price, tblCart.TotalAmount FROM tblProduct INNER JOIN tblCart ON tblProduct.ProductID"&_
" = tblCart.ProductID WHERE UserName='"&session("UserName")&"'"
rs.open sql,conn,1,3
do while not rs.eof
%>
<tr>
<td align="center">
<div align=left><a href=showproduct.asp?id=<%=rs("ProductID")%>
target=_blank><%=rs("ProductName")%></a>
<input name=cartid type=hidden value=<%=rs("CartID")%>>
</div>
</td>
<td align="center"><%=rs("BuyCount")%></td>
<td align="center"><%=rs("Price")%></td>
<td align="center">
<input type=hidden value=<%=rs("TotalAmount")%> name="TotalAmount">
<div align=center><font color=#FF3300><%=rs("TotalAmount")%></font> 元
</div>
</td>
</tr>
<%
'//累加商品总件数
AmountSum=AmountSum+rs("BuyCount")
'//累加商品总金额
TotalAmountSum=TotalAmountSum+rs("TotalAmount")
rs.movenext
loop
'//累加商品种类数
ProductCount=rs.recordcount
rs.close
set rs=nothing
%>
</table>
</form>
</td>
</tr>
<tr>
<td align="center">
<input type="button" value="返回继续购物"
onClick="javascript:window.history.go(-1)">
</td>
</tr>
<tr>
<td>
<p align="center">购物车里有商品:<%=ProductCount%>件 总数:<%=AmountSum%>
件 共计:<%=TotalAmountSum%>元</td>
</tr>
<tr>
<td>
<hr>
<form method="POST" name="Consignee " action="checkout.asp?action=save">
<p> 收货人名: <font color=#dd6600><input name=Consignee value=""
size=37></font></p>
<p>
性 别:<b><select name="Sex" id="shousex" class="wenbenkuang" size="1">
<option value="1">男</option>
<option value="2">女</option>
<option value="0">保密</option>
</select></b></p>
<p> 电 话: <font color=#dd6600><input name=Telephone value=""
size=37></font></p>
<p> 电子邮箱: <font color=#dd6600><input name=Email value=""
size=37></font></p>
<p> 详细地址: <font color=#dd6600><input name=Address value=""
size=37></font></p>
<p> 邮政编码: <font color=#dd6600><input name=Postcode value=""
size=37></font></p>
<p>其他说明:<textarea rows="2" name="Content" cols="22"></textarea></p>
<p> <input type="checkbox" name="Invoice" value="1" checked>要求发票</p>
</td>
</tr>
</table>
<p align="center">
<input type="submit" value="完成订单"</p>
</form>
</head>
</body>
</html>
搜索更多相关主题的帖子: request content include PUBLIC action 
2011-04-19 11:39
快速回复:类型不匹配。求教!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.023354 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved