class.asp
上传用户:syzzy1975
上传日期:2022-07-17
资源大小:670k
文件大小:2k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <%
  3. %><!--#include file="manage/inc/config.asp"--> 
  4. <!--#include file="inc/conn.asp"--> 
  5. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  6. <html>
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  9. <title>406网络书店</title>
  10. <link href="style.css" rel="stylesheet" type="text/css">
  11. <style type="text/css">
  12. <!--
  13. .title {font-size:14px;color:#415373;font-weight:bold;}
  14. -->
  15. </style>
  16. </head>
  17. <body>
  18. <!--#include file="head.htm"-->
  19. <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  20.   <tr>
  21.     <td width="219" align="left" valign="top"><!--#include file="left.asp"--></td>
  22.     <td width="561" align="left" valign="top">
  23.       <br>      <table width="100%" border="0" cellpadding="2" cellspacing="2">
  24.   <%        
  25.   set rs=server.CreateObject("adodb.recordset")
  26.   rs.open "select category,categoryid from category",conn,1,1
  27.   if rs.eof then response.write "对不起!还没有添加任何的分类!"
  28.   do while not rs.eof
  29. %>
  30.     <tr>
  31.           <td>
  32.             <table border="0" cellspacing="0" cellpadding="2">
  33.               <tr>
  34.                 <td><img src="images/w.gif"></td>
  35.                 <td><span class="title"><%=rs("category")%></span></td>
  36.               </tr>
  37.             </table></td>
  38.         </tr>
  39.         <tr>
  40.           <td style="PADDING-LEFT: 30px;">
  41.     <%
  42.    dim rsSub
  43. set rsSub=server.CreateObject("adodb.recordset")
  44. rsSub.open "select sorts,sortsid from sorts where categoryid="&rs("categoryid")&" order by sortsorder",conn,1,1
  45. if rsSub.recordcount=0 then response.Write "对不起!此大类没有添加小类!"
  46. do while not rsSub.eof
  47. response.Write "<a href=sub.asp?aid="&rs("categoryid")&"&nid="&rsSub("sortsid")&">"&trim(rsSub("sorts"))&"</a>  "
  48. 'response.write "<A href=class.asp?aid="&rs("categoryid")&"&nid="&rsSub("sortsid")&">"&trim(rsSub("sorts"))&"</A> | " 
  49.              rsSub.movenext
  50.  loop
  51.  rsSub.close
  52.  set rsSub=nothing
  53. %>  
  54.       </td>
  55.         </tr>
  56.   <%
  57.              rs.movenext
  58.  loop
  59.  rs.close
  60.  set rs=nothing
  61. %>
  62.         <tr>
  63.           <td>&nbsp;</td>
  64.         </tr>
  65.       </table>      <br>      </td>
  66.   </tr>
  67. </table>
  68. <!--#include file="foot.htm"-->
  69. </body>
  70. </html>