<% sub Orderdetail() yanzheng=request("yanzheng") if request.form("edit")="修改" then set rs=Server.Createobject("ADODB.RecordSet") sql="select * from billinfo where bi_orderid='"&yanzheng&"'" rs.Open sql,conn,1,3 rs("bi_mobile")=request("bi_mobile") rs("bi_fphone")=request("bi_fphone") rs("bi_fpostcode")=request("bi_fpostcode") rs("bi_faddress")=request("bi_faddress") rs("bi_money")=request("bi_money") rs("bi_count")=request("bi_count") rs("bi_flag")=request("bi_flag") rs("bi_ischeck")=request("bi_ischeck") if request("bi_ischeck")=1 then rs("bi_admin")=session("admin") rs("bi_admindate")=now() end if rs.update sql="update ryzl set grade="&request("bi_money")&" where sqr_bh='"&rs("bi_userid")&"'" conn.execute sql rs.close set rs=nothing response.write "修改成功" response.write "
" response.end elseif request.form("edit")="修改订单" then yanzheng=request("yanzheng") set rs=Server.Createobject("ADODB.RecordSet") sql="select * from OrderDetail where ol_orderid='"&yanzheng&"'" rs.Open sql,conn,1,3 userid = rs("ol_userid") Sum=0 Num=0 While Not rs.EOF Quatity = CInt(Request("Q_" & rs("ol_id"))) If cstr(Quatity) = "" then Quatity = 0 If Quatity < 0 Then Quatity = Cint(rs("Quantity")) If Quatity < 0 Then Quatity = 0 End If buyPrice = Cdbl(rs("ol_prodprice")) Sum = Sum + ccur(buyPrice * Quatity) Num = Num + Quatity conn.execute("update orderDetail set ol_prodcount="&Quatity&" where ol_id="&rs("ol_id")) rs.movenext Wend conn.execute("update billinfo set bi_money="&Sum&",bi_count="&Num&" where bi_orderid='"&yanzheng&"'") rs.close set rs=nothing response.write "修改成功" response.write "
" response.end end if sqlinfo = "select * from billinfo where bi_orderid='"&yanzheng&"'" set rsorder=Server.Createobject("ADODB.RecordSet") rsorder.Open sqlinfo,conn,1,3 if rsorder.eof and rsorder.bof then response.write "
对不起!订单错误,请您仔细检查!

如果还有问题,请联系网站管理员
" response.write "
" response.end else %>
  订单号:<%=rsorder("bi_orderid")%>
> <% set rs=server.createobject("adodb.recordset") sql = "Select * From OrderDetail where ol_orderid='"&yanzheng&"'" rs.open sql,conn,1,1 dim Sum,Num Sum = 0 Num = 0 While Not rs.EOF Quatity = CDbl(rs("ol_prodcount")) buyPrice = CDbl(rs("ol_prodprice")) Sum = Sum + ccur(buyPrice * Quatity) Num = Num + ccur(buyPrice * Quatity) %> <% rs.movenext Wend %>
选购
产品
数量
备注
单价
小计
" Checked disabled>
<%=rs("ol_prodid")%>--<%=rs("ol_prodname")%>
" type="text" value="<%=Quatity%>" size=2 width="30" onKeyUp="value=value.replace(/\D+/g,'')">
<%=rs("ol_prodcolor")%> <%=buyPrice%>.00 <%=ccur(buyPrice * Quatity)%>
共计:<%=Sum%> 元
'">
<% rs.close set rs=nothing %>

收货人详细信息
姓名:  <%=rsorder("bi_fname")%>
联系电话:  <%=rsorder("bi_fmobile")%>
订购日期:  <%=rsorder("bi_date")%>
订单金额:  <%=rsorder("bi_money")%>
邮编:  <%=rsorder("bi_fpostcode")%>
收货地址:  <%=rsorder("bi_faddress")%>
付款方式:  <%=banklist(rsorder("bi_paytype"))%>
备注信息:  <%=rsorder("bi_remark")%>
  '">
<% end if set rsorder=nothing end sub %>