bookorder.asp

来自「创建和运行动态、交互的Web服务器应用程序」· ASP 代码 · 共 163 行

ASP
163
字号
<!--#include file="conn.asp"-->
<!--#include file="webtop.asp"-->
<html>
<head>
<title><%=webname%>--图书排行</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦!:)';return true">

<table width="776" border="0" align="center" cellpadding="2" cellspacing="2">
 <tr>
    <td width="155" valign="top">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
           <td><!--#include file="userinfo.asp"--></td>
        </tr>
        <tr>
           <td height=5>
        </tr>
        <tr> 
           <td><!--#include file="search_wid.asp"--></td>
        </tr>
        <tr>
           <td height=5>
        </tr>
        <tr>
         <td width="155" valign="top">
            <table width="100%" border="0" align="left"  cellpadding="0" cellspacing="0">
                 <tr><td> 
                     <table width='155' border='0' cellspacing='0' cellpadding='0' bgcolor='#999666'>
                      <td width='6'><img src='imgside/ss_050910_lll_07.gif' width='6' height='18' alt=''></td>
                      <td align=center><font color='#ffffff' size=2>图书分类</font></td>
                      <td width='6'><img src='imgside/ss_050910_lll_08.gif' width='6' height='18' alt=''></td>
                     </table>
                  </tr>
        
        <tr> 
          <td width='100%' background=imgside/bg_cartinfo4.gif valign="top">
		          <%set rs=server.CreateObject("adodb.recordset")
				rs.open "select anclassid,anclass,changyong from shop_anclass where changyong=1 order by anclassidorder",conn,1,1
				
                                do while not rs.eof
				         response.write "<table width=100% border=0 cellspacing=0 cellpadding=0>"
                                         response.write "<tr><td colspan=3><div align=center>"
				         response.write "【"&trim(rs("anclass"))&"】"
				         response.write "</div></td></tr>"
                                    set rs2=server.CreateObject("adodb.recordset")
                                        rs2.open "select nclassid,nclass,changyong,anclassid from shop_nclass where changyong=1 and anclassid="&rs("anclassid")&" order by nclassidorder",conn,1,1
                                        do while not rs2.eof
                                                 Dim num1 '//判断数字奇偶
                                                     num1 = Num1+1
                                                 If num1 Mod 2 = 0 Then
                                                     response.write "<td width=80><div align=left><a href=class.asp?aid="&rs2("anclassid")&"&nid="&rs2("nclassid")&">"&trim(rs2("nclass"))&"</a></div></td></tr>"
                                                 else
                                                     response.write "<tr><td width=70><div align=right><a href=class.asp?aid="&rs2("anclassid")&"&nid="&rs2("nclassid")&">"&trim(rs2("nclass"))&"</a></div></td>"
                                                     response.write "<td width=12><div align=center><FONT color=#ff6600>|</FONT></div></td>"
                                                 end if
                                         rs2.movenext
                                         loop
                                         rs2.close
                                         set rs2=nothing
                                         response.write "<tr><td height=3>"
                                         response.write "</table>"
                                         
                            rs.movenext
                            loop
                            rs.close
                            set rs=nothing%>
        <tr><td height=3><img src=imgside/pic_cartinfobottom4.gif width=155 height=3></td></tr>
          </tr>
        </table>  
      </tr>
    </table>
  
  <td width=10>
  <td valign="top">
    <table width="100%" border="0" cellspacing="1" cellspadding="1">
       <tr>
          <td width="134"><a href="bookorder.asp?action=sql_pk"><img src="images/pai.gif" border="0"></a></td>
          <td width="650"><a href="bookorder.asp?action=vfp_pk"><img src="images/renqi.gif" border="0"></a></td>
       </tr>
       <tr>
          <td colspan="2" height="2"  background="images/pl_line_bg.gif"></td>
       </tr>

 <%
   action=request.QueryString("action")
          select case action
                 case "sql_pk"
  dim i_x,rs_x,flag
      i_x=0
  set rs_x=server.CreateObject("adodb.recordset")
      rs_x.open "select top 30 * from shop_books where nclassid=14 order by sumxs desc",conn,1,1
   if rs_x.eof and rs_x.bof then
      response.write "目前还没有任何图书"
      response.End()
   end if %>

    <table width="100%" height="118" border="0" bgcolor=lavender cellpadding="-2" cellspacing="-2">
       <tr>
          <td height="118" valign="top">
          <table width="100%" border="1"  bordercolordark="#ffffff" bordercolorlight="#ffffff" cellpadding="-21" cellspacing="0">
     
    <% flag=1
       do while not rs_x.eof
          i_x=i_x+1%>    
    <tr>
       <td width="5%" height="20" align="right"><% =flag %>&nbsp;</td>
       <%response.write"<td>&nbsp;<a href=book.asp?id="&rs_x("bookid")&" title=此图书已被浏览"&rs_x("liulancount")&"次>"&rs_x("bookname")&"</a>"%>
       <td>&nbsp;会员价:<font color=red><%=rs_x("huiyuanjia")%></font>&nbsp;元</td>
       <td width="60"><div align="center"><%response.write "<a href=# onClick=""javascript:window.open('add_bk.asp?bookid="&rs_x("bookid")&"&purchase=1','','width=730,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;""><img src=images/ind_gw.gif width=43 height=12 border=0 align='middle'></a>"%></div></td>
       <td width="60"><div align="center"><a href="shoucang.asp?action=add&id=<%=rs_x("bookid")%>" target=_blank><img src="images/ind_sc.gif" width="43" height="12" border="0" align="middle"></a></td></tr>
    <%   flag=flag+1
         if i_x>=30 then exit do
         rs_x.movenext
         loop
         rs_x.close
   set rs_x=nothing%>
      </tr>
   </table>

                <%case "vfp_pk"
  dim i_r,rs_r
      i_r=0
   set rs_r=server.CreateObject("adodb.recordset")
       rs_r.open "select top 30 * from shop_books where nclassid=13 order by sumxs desc",conn,1,1
    if rs_r.eof and rs_r.bof then
       response.write "目前还没有任何图书"
       response.End()
    end if %>
   <table width="100%" height="118" border="0" bgcolor="#ebebeb" cellpadding="-2" cellspacing="-2">
    <tr>
       <td height="118" valign="top">
       <table width="100%" border="1" bordercolor="#ccffcc" bordercolordark="#ffffff" bordercolorlight="#ffffff" cellpadding="-21" cellspacing="0">

    <% flag=1
        do while not rs_r.eof
                 i_r=i_r+1%>
    <tr>
    <td width="5%" height="20" align="right"><% =flag %>&nbsp;</td>
    <%response.write"<td>&nbsp;<a href=book.asp?id="&rs_r("bookid")&" title=此图书已被浏览"&rs_r("liulancount")&"次>"&rs_r("bookname")&"</a>"%>
    <td>&nbsp;会员价:<font color=red><%=rs_r("huiyuanjia")%></font>&nbsp;元</td>
    <td width="60"><div align="center"><%response.write "<a href=# onClick=""javascript:window.open('add_bk.asp?bookid="&rs_r("bookid")&"&purchase=1','','width=730,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;""><img src=images/ind_gw.gif width=43 height=12 border=0 align='middle'></a>"%></div></td>
    <td width="60"><div align="center"><a href="shoucang.asp?action=add&id=<%=rs_r("bookid")%>" target=_blank><img src="images/ind_sc.gif" width="43" height="12" border="0" align="middle"></a></td></tr>
    <%   flag=flag+1
         if i_r>=30 then exit do 
         rs_r.movenext
         loop 
         rs_r.close
     set rs_r=nothing%>
      </tr>
    </table>
              <%end select%>
   </tr>
  </table>
 </tr>
</table>
<!--#include file="service.asp"-->
<!--#include file="copyright.asp"-->
</body>
</html>

⌨️ 快捷键说明

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