| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 621 人关注过本帖
标题:商务网站..下定单模块出错了..求助..急急急..在线等.
只看楼主 加入收藏
glx
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-5-18
收藏
 问题点数:0 回复次数:1 
商务网站..下定单模块出错了..求助..急急急..在线等.
各位大侠...3Q啦!!!
我的QQ59319837

[[it] 本帖最后由 glx 于 2008-5-18 14:33 编辑 [/it]]
搜索更多相关主题的帖子: 定单 模块 商务 在线 
2008-05-18 14:14
glx
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-5-18
收藏
得分:0 
回复 1# 的帖子
代码如下
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/conn.asp" -->


<!--#include file="manage/inc/config.asp"-->
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/chk.asp"-->
<%
dim id,i,iii ,books,bookscount,product
id=request("id")
if id="" then
    call MsgBox("你的购物车内没有商品!","Back","None")
    response.end
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网上书城</title>
<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>
<!--#include file="head.htm"-->


<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="219" align="left" valign="top"><!--#include file="uleft.asp"--></td>
    <td width="561" align="left" valign="top">
      <br>      <br>      <form name="form1" method="post" action="">
        <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
         
          <tr align="center" bgcolor="#eeeeee">
            <td align="left">商品名称</td>
            <td width="9%">市场价</td>
            <td width="9%"> 会员价</td>
            <td width="9%">折扣</td>
            <td width="10%">VIP会员价</td>
            <td width="9%"> 数量</td>
            <td width="12%"> 小计</td>
            <td width="10%">修改数量</td>
          </tr>
<%
Dim cart
Dim cart_numRows

Set cart = Server.CreateObject("ADODB.Recordset")
cart.ActiveConnection = MM_conn_STRING
cart.Source = "SELECT id,name,price1,price2,vipprice,discount  FROM product  WHERE id in ("&id&")  ORDER BY id"
cart.CursorType = 1
cart.CursorLocation = 2
cart.LockType = 1
cart.Open()

cart_numRows = 0
%>      
<%
      iii=0
      bookscount=request.QueryString("id").count
%>

<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
cart_numRows = cart_numRows + Repeat1__numRows
%>


<%
While ((Repeat1__numRows <> 0) AND (NOT cart.EOF))
%>
  <%
     dim quatity
     Quatity = CInt( Request( "shop"&cart("id")) )
    If Quatity <=0 Then Quatity = 1
    %>
  <tr align="center">
    <td style='PADDING-LEFT: 5px' align="left"><%=(cart.Fields.Item("name").Value)%>
      <input type=hidden name=name value=<%=(cart.Fields.Item("name").Value)%>>    </td>
    <td ><%=(cart.Fields.Item("price1").Value)%>元</td>
    <input type=hidden name=price2 value=<%=(cart.Fields.Item("price2").Value)%>>
    <td><%=(cart.Fields.Item("price2").Value)%>元</td>
    <td><%=(cart.Fields.Item("discount").Value)*100%>%</td>
    <td><%=(cart.Fields.Item("vipprice").Value)%>元</td>
    <td><input name="<%="shop"& cart("id")%>" type="text" size="3" value="<%=Quatity%>" onKeyPress= "return regInput(this,    /^[0-9]*$/,    String.fromCharCode(event.keyCode))"onpaste    = "return regInput(this,/^[0-9]*$/, window.clipboardData.getData('Text'))"ondrop= "return regInput(this,/^[0-9]*$/,event.dataTransfer.getData('Text'))">    </td>
    <td>
      <%
Dim rsvip,strvip,strdeposit,txtvip
set rsvip=server.CreateObject("adodb.recordset")
rsvip.open "select vip from [user] where username='"&request.cookies(cookieName)("username")&"' ",conn,1,1
strvip = rsvip("vip")
if  strvip = true then
txtvip = "VIP会员"
if Quatity<=1 then
      response.write cart("vipprice")*1&"元"
      else
      response.write cart("vipprice")*Quatity&"元"
      end if      
      iii=cart("vipprice")*Quatity+iii
else
txtvip = "普通会员"
if Quatity<=1 then
      response.write cart("price2")*1&"元"
      else
      response.write cart("price2")*Quatity&"元"
      end if      
      iii=cart("price2")*Quatity+iii
      end if

      %></td>
    <td WIDTH="12%" align="center"><input type="submit" name="Submit" value="修改"  onClick="this.form.action='cart.asp?action=modify';this.form.submit()">    </td>
  </tr>
   <%if bookscount=1 then books=cart("id")%>
        
        
<%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  cart.MoveNext()
Wend
%>
<%
cart.Close()
Set cart = Nothing
%>

         <tr height="20">
            <td colspan="4" align="center">你是 <font color="#FF0000">
              <% = txtvip %>
            </font> 会员</td>
            <td colspan="4" align="right"><font color="#FF0000">总计:<%=iii%>元&nbsp;&nbsp;&nbsp;&nbsp;</font></td>
          </tr>
          <tr>
            <td height="32" colspan="8" align="center"><input type="submit" name="Submit2" value="下一步" onClick="this.form.action='checkout.asp';this.form.submit()" >
              <input name="id" type="hidden" id="id" value="<%=id%>">
  </td>
          </tr>
         
      </table>
    </form></td>
  </tr>
</table>

<!--#include file="foot.htm"-->
</body>
</html>
2008-05-20 09:06
快速回复:商务网站..下定单模块出错了..求助..急急急..在线等.
数据加载中...
 
   



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

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