| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 412 人关注过本帖
标题:asp购物订单打印突然不出来了
只看楼主 加入收藏
yangchange
Rank: 2
等 级:论坛游民
帖 子:22
专家分:20
注 册:2010-11-26
结帖率:100%
收藏
 问题点数:0 回复次数:0 
asp购物订单打印突然不出来了
<%
dim biaoti
biaoti=request("biaoti")  
clsaaid=request("clsaaid")

'if biaoti="" or Instr(biaoti,"=")>0 or Instr(biaoti,"%")>0 or  Instr(biaoti,"?")>0 or Instr(biaoti,"'")>0 or Instr(biaoti,",")>0  or Instr(biaoti,chr(9))>0 or Instr(biaoti,"?")>0 or Instr(biaoti,"$")>0 then
 '  response.Write("url非法!<br>如果在访问中遇到问题请与管理员联系")
  ' response.end
'end if
%>
<!--  :::结束:::代码复制区域:::::::::::::::::::::::::::::::::::::::::::::::::::::::::调用数据连接文件, 接收参考并加以处理   -->
<html>
<head>
<title>宜昌双龙玩具商行|宜昌玩具批发|宜昌双龙玩具|宜昌玩具</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
-->
</style><link href="style.css" rel="stylesheet" type="text/css">
</head>
<SCRIPT type=text/JavaScript>

function ShowType(type,num)
{
    if(document.getElementById("tr_" + type).style.display == "none")
    {
        document.getElementById("tr_" + type).style.display = "";
        document.getElementById("tr2_" + type).style.display = "";
    }
    else
    {
        document.getElementById("tr_" + type).style.display = "none";
        document.getElementById("tr2_" + type).style.display = "";
        
    }

}
</SCRIPT>
<body>
<!--#include file="top.asp" -->
<table width="970" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><table width="188" height="42" border="0" cellpadding="0" cellspacing="0" background="images/index_16.jpg">
      <tr>
        <td width="38">&nbsp;</td>
        <td width="150"><a href="cpzs.asp" class="daohang">产品列表</a></td>
      </tr>
    </table>
      <table width="188" height="304" border="0" cellpadding="0" cellspacing="0" background="images/index_20.jpg" >
        <tr>
          <td valign="top"><table width="85%"  border="0" align="center" cellpadding="5" cellspacing="0">
            <tr>
              <td><div align="left">
                  <%  
                      set rs_sort=server.CreateObject("adodb.recordset")
                      sql_sort="select * from product_class where Classtype=0 order by Classsort asc"
                      rs_sort.Open sql_sort,conn,1,3
                       ' do while not rs_sort.eof
              i=1
         while not rs_sort.eof and i<=rs_sort.pageSize
                    %>
                  <table width="100%" border="0" id="tr2_<%= i%>" style="display:block">
                    <tr>
                      <td><span class="cplist"><strong>【</strong></span><strong><a href="#>&classtype=0" class="cplist" onClick="javascript:ShowType(<%= i%>,<%= rs_sort.RecordCount%>);" >
                        <% response.write(rs_sort("classname")) %>
                        </a> <span class="cplist">】</span></strong><br>
                      </td>
                    </tr>
                  </table>
                <table width="100%" border="0" id="tr_<%= i%>" style="display:none;">
                    <%
               classtype=""
               classtype=rs_sort("id")
               sql_sort_small="select * from product_class where classtype="&classtype&" order by Classsort asc"
               set rs_sort_small=server.CreateObject("adodb.recordset")
                      rs_sort_small.Open sql_sort_small,conn,1,3
                      do while not rs_sort_small.eof
                             %>
                    <tr>
                      <td><strong><span class="cplist">>></strong> <a href="cpzs.asp?biaoti=<%=rs_sort_small("Classname")%>&clsaaid=<%=rs_sort_small("id")%>" class="cplist" >
                        <% response.write(rs_sort_small("classname")) %>
                        </a><br>
                      </td>
                    </tr>
                    <%
                                rs_sort_small.movenext
                       loop
                                rs_sort_small.close
                                set rs_sort_small=nothing
                                %>
                  </table>
                <%
                          rs_sort.movenext
                               i=i+1
                               wend
                        rs_sort.close
                    set rs_sort=nothing        
                                %>
              </div></td>
            </tr>
          </table></td>
        </tr>
      </table>
      <table width="188" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="images/index_29.jpg" width="188" height="14" alt=""></td>
        </tr>
      </table></td>
    <td width="757" valign="top">
    <table width="747" height="23" border="0" cellpadding="0" cellspacing="0" background="images/index_21.jpg">
      <tr>
        <td width="9">&nbsp;</td>
        <td width="72" class="cplist">购物清单</td>
        <td width="666" class="red2">Shopping List</td>
      </tr>
    </table>
      <table width="100" height="15" border="0" align="center" cellpadding="0" cellspacing="0"  valign="top">
        <tr>
          <td></td>
        </tr>
      </table>
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" valign="top">
        <tr>
          <th scope="col">
          <table width="100%" border="0" cellpadding="0" cellspacing="0"  valign="top">
           <%
           if session("fid") = "" then
           session("fid") = 1
           else
           session("fid") = session("fid") + 1
           end if
           proid = request("proid")
           if proid = "" then
               response.Write("<script>alert('数据丢失!');window.history.go(-1);</script>")
               response.End()
           else
               Sql = "select * from card where nsid = '"&session("nsid")&"' and proid = "&proid
               set rs = conn.execute(Sql)
               if not rs.eof then'如果找到则数量+1
                   num = rs("num") + 1
                   zprice = num*rs("price")
                   Sql = "update card set num = "&num&",zprice = "&zprice&" where nsid = '"&session("nsid")&"' and proid = "&proid
                   conn.execute(Sql)
               else
                       Sql = "select * from product where id = "&proid
                    set rsm = conn.execute(Sql)
                   Sql = "insert into card (nsid,proid,num,title,price,zprice,tupian,danwei,bianhao) values ('"&session("nsid")&"',"&proid&",1,'"&rsm("title")&"',"&rsm("price")&","&rsm("price")&",'"&rsm("Defaultpic")&"','"&rsm("danwei")&"','"&rsm("bianhao")&"')"
                   conn.execute(Sql)
                   response.Write(sql7)
                   end if
        if session("fid") = 1 then
                Sql = "select * from product where id = "&proid
                set rs = conn.execute(Sql)
                if rs.eof then
           %>
              <tr>
                <td align="left" valign="top"> 没有记录 </td>
              </tr>
             <%else%>
              <tr>
                <td>
                    <table width="720" border="1" bordercolor="#ccc" cellpadding="0" cellspacing="0" class="shopList">
                      <tr>                        
                        <th>序号</th>
                        <th>商品名称</th>
                        <th>购买数量</th>
                        <th>图片</th>
                        <th>单位</th>
                        <th>编号</th>
                        <th>商品单价</th>
                        <th>总价</th>
                      </tr>
                <%
                    Sql = "select * from product where id = "&proid
                    set rs = conn.execute(Sql)
                    i = 1
                    do while not rs.eof
                %>
                      <tr>
                        <td align="center"><%=i%></td>
                        <td align="center"><%=rs("title")%></td>
                        <td align="center">1</td>
                        <td align="center"><img src="<%=rs("Defaultpic")%>" width="40" height="40"></td>
                        <td align="center"><%=rs("danwei")%></td>
                        <td align="center"><%=rs("bianhao")%></td>
                        <td align="center"><%=rs("price")%></td>
                        <td align="center"><%=rs("price")%></td>
                      </tr>
                <%
                    rs.movenext
                    i = i+1
                    loop
                    rs.close
                    set rs = nothing
                %>
                    </table>
                </td>
              </tr>
              <%
              end if
              else
              %>
               <tr>
                <td>
                    <table width="720" border="1" bordercolor="#ccc" cellpadding="0" cellspacing="0" class="shopList">
                      <tr>                        
                        <th>序号</th>
                        <th>商品名称</th>
                        <th>购买数量</th>
                        <th>图片</th>
                        <th>单位</th>
                        <th>编号</th>
                        <th>商品单价</th>
                        <th>总价</th>
                      </tr>
                <%
                     Sql = "select * from card where nsid = '"&session("nsid")&"'"
                      set rs = conn.execute(Sql)
                    i = 1
                    do while not rs.eof
                %>
                      <tr>
                        <td align="center"><%=i%></td>
                        <td align="center"><%=rs("title")%></td>
                        <td align="center"><%=rs("num")%></td>
                        <td align="center"><img src="<%=rs("tupian")%>" width="40" height="40"></td>
                        <td align="center"><%=rs("danwei")%></td>
                        <td align="center"><%=rs("bianhao")%></td>
                        <td align="center"><%=rs("price")%></td>
                        <td align="center"><%=rs("zprice")%></td>
                      </tr>
                <%
                    rs.movenext
                    i = i+1
                    loop
                    rs.close
                    set rs = nothing
                %>
              <%
              end if
        end if
         %>
            </table>
             <form action="print.asp" method="post">
                    <table width="720" height="40" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                            <td width="450">&nbsp;</td>
                            <input type="hidden" name="proid" value="<%=request("proid")%>">
                          <td align="center"><a href="print.asp" title="打印订单"><input type="image" src="images/print.jpg" /></a></td>
                          <td align="center"><a href="cpzs.asp" title="继续购物"><img src="images/shop.jpg"/></a></td>
                        </tr>
                      </table>
                      </form>
           </table>
              </th>
        </tr>
      </table>
      <table width="100" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td></td>
        </tr>
      </table></td>
  </tr>
</table>


上面是我购物清单的代码,购买了后产品不到购物车里面 效果就如http://58.30.228.66/cpzs.asp点开产品购买后 里面要么有一个产品,要么继续购物就是空白,打印出来的也是空白  请各位高手帮着解决下 我实在是没找出来
搜索更多相关主题的帖子: 管理员 
2011-05-19 10:47
快速回复:asp购物订单打印突然不出来了
数据加载中...
 
   



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

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