⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 my_orderlist_temp.asp

📁 一套集网上购物和商品管理为一体的强大的网上商店(商城)系统
💻 ASP
字号:
<!-- #include file="conn.asp" -->
<!--#include file="webconfig.asp"-->
<%
'url=request.servervariables("HTTP_REFERER")
if  session("userid")="" then
  //response.write "<script>alert('你还未登陆,或登陆已超时,请重新登陆!!');</script>"
  response.write "<script>this.location.href='login_window.asp';</script>"
  response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=webname%></title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="include/top.asp" -->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr valign="top"> 
    <td width="1" bgcolor="#cccccc"></td>
    <td width="160" height="100"> 
      <!--#include file="include/left1.asp" -->
    </td>
    <td width="1" bgcolor="cccccc"></td>
    <td align="center"> 
      <!--#include file="include/search.asp" -->
      <%
if session("userid")="" then
response.redirect "login_window.asp"
else
%>
      <table cellspacing=0 cellpadding=2 width="99%" align=center border=0>
        <tbody> 
        <tr> 
          <td align="center"><b><font size="3">我的购物车--暂存商品</font></b></td>
        </tr>
        </tbody> 
      </table>
      <table width="99%" 
            border=0 cellpadding=2 cellspacing=1 class="table_front">
        <tbody> 
          <tr class="th_front1"> 
            <td width=30 height=21 align="center">序号</td>
            <td align="center">商品名称</td>
            <td width="40" align="center">市场价</td>
            <td width=40 align="center">会员价</td>
            <td width=40 align="center">VIP价</td>
            <td width=100 align="center">购买数量</td>
            <td width=50 align="center">小计</td>
            <td width=50 align="center">立即节省</td>
            <td width=50 align="center">删除商品</td>
        </tr>
        <%
sql="select * from Net008_orderlist_temp where userid='"&session("userid")&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql ,conn,1,2
if rs.recordcount<1 then
response.write"<font size=5 color=ff0000>Sorry!你的暂存架里还没有任何商品!</font>"
response.write "<a href='../index.asp'><img src='images/buy_B_jxxg.gif' width='126' height='34' border='0'></a>"
response.end
end if
const maxperpage=50 '定义每一页显示的数据记录的常量                                   
dim currentpage '定义当前页的变量                                   
rs.pagesize=maxperpage                                   
currentpage=request.querystring("pageid")                                   
if currentpage="" then                                   
currentpage=1                                   
elseif currentpage<1 then                                   
currentpage=1                                   
else                                   
currentpage=clng(currentpage)                                   
	if currentpage > rs.pagecount then                                   
	currentpage=rs.pagecount                                   
	end if                                   
end if                                   
'如果变量currentpage的数据类型不是数值型                                   
'就1赋给变量currentpage                                   
if not isnumeric(currentpage) then                                   
currentpage=1                                   
end if                                   
dim totalput,n '定义变量                                   
totalput=rs.recordcount                                   
if totalput mod maxperpage=0 then                                   
n=totalput\maxperpage                                   
else                                   
n=totalput\maxperpage+1                                   
end if                                   
if n=0 then                                   
n=1                                   
end if                                   
rs.move(currentpage-1)*maxperpage                                   
i=0                                   
do while i< maxperpage and not rs.eof     
%>
          <tr class="th_front2"> 
            <td width=30 height=21 align="center"> 
              <%response.write i+1
%>
          </td>
            <td align="center"> 
              <%
productid=rs("productid")
sql_temp="select * from Net008_productlist where id="&cint(productid)
set rs_temp=server.createobject("adodb.recordset")
rs_temp.open sql_temp,conn,1,2
response.write "<a href='showproduct.asp?id="&rs_temp("id")&"' class=LeftTypeLink target=_blank>"
response.write rs_temp("productname")
response.write "</a>"
%>
          </td>
            <td width="40" align="center"> 
              <%
marketprice=rs_temp("marketprice")
response.write marketprice
%>
          </td>
            <td width="40" align="center"> <font color=ff0000> 
              <%
newprice=rs_temp("newprice")
response.write newprice
%>
            </font> </td>
            <td width="40" align="center"> <font color=ff0000> 
              <%
vipprice=rs_temp("vipprice")
response.write vipprice
%>
            </font> </td>
            <td width="100" align="center"> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <form method="post" action="shopping_modi_number.asp?id=<%=rs("id")%>">
                <tr> 
                  <td align="center"> 
                    <input size=3 value=<%=rs("buynumber")%> name=buynumber>
                    <b> 
                    <input type="submit" name="Submit2" value="修改" class=sinput>
                    </b></td>
                </tr>
              </form>
            </table>
          </td>
            <td width="50" align="center"> 
              <%
buynumber=rs("buynumber")
if session("userlevel")=2 then
	response.write "<font color=0000ff>"&vipprice*buynumber&"</font>"
else
	response.write "<font color=0000ff>"&newprice*buynumber&"</font>"
end if
%>
          </td>
            <td width=50 align="center"> 
              <%
if session("userlevel")=2 then
	diffprice=marketprice-vipprice
else
	diffprice=marketprice-newprice
end if
response.write diffprice*buynumber

//算原价,新鲜价,VIP价总和
sum_marketprice=sum_marketprice+marketprice*buynumber
sum_newprice=sum_newprice+newprice*buynumber
sum_vipprice=sum_vipprice+vipprice*buynumber
%>
          </td>
            <td width="50" align="center"><a href="shopping_del.asp?id=<%=rs("id")%>" class="LeftTypeLink">不买这个</a></td>
        </tr>
        <%
    i=i+1                                  
    rs.movenext                                  
    loop       
%>
        </tbody> 
      </table>
      <table cellspacing=0 cellpadding=0 width=99% align=center border=0>
        <tbody> 
        <tr align=left> 
          <td width="33%" height=24> 商品原价总计:<%=sum_marketprice%>元 </td>
          <td align=middle width="34%" height=24><strong><font color="#FF0000">
            <%if session("userlevel")=2 then%>
            VIP价总计:<%=sum_vipprice%>元
            <%else%>
            会员价总计:<%=sum_newprice%>元
            <%end if%>
            </font></strong></td>
          <td align=right width="33%" height=24>您共节省:<font color=0000ff><%=sum_marketprice-sum_newprice%></font>元</td>
        </tr>
        <tr> 
          <td colspan=3>&nbsp;</td>
        </tr>
        </tbody> 
      </table>
      <table cellspacing=0 cellpadding=0 width=99% align=center border=0>
        <tbody> 
        <tr valign="middle"> 
          <td align=center>&nbsp;</td>
          <td align=center><a href="sort.asp"><img src="images/buy_B_jxxg.gif" width="126" height="34" border="0"></a></td>
          <td align="center"> <a href="reckoning.asp"><img src="images/buy_B_jzh.gif" width="126" height="34" border="0"></a></td>
          <td align="center">&nbsp;</td>
        </tr>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td>&nbsp;</td>
        </tr>
      </table>
      <%end if%>
    </td>
    <td width="1" bgcolor="cccccc"></td>
  </tr>
</table>
<!-- #include file="include/bottom.asp" -->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -