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

Jsp/Servlet

开发平台:

Java

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <!--#include file="manage/inc/config.asp"--> 
  3. <!--#include file="inc/conn.asp"--> 
  4. <%
  5. dim i
  6. set rs=server.CreateObject("adodb.recordset")
  7. %>
  8. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  12. <title>我家网络书店</title>
  13. <link href="style.css" rel="stylesheet" type="text/css">
  14. </head>
  15. <body>
  16. <!--#include file="head.htm"-->
  17. <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  18.   <tr>
  19.     <td width="219" align="left" valign="top"><!--#include file="left.asp"--></td>
  20.     <td width="561" align="left" valign="top">      <table width="100%" border="0" cellspacing="0" cellpadding="0">
  21.         <tr>
  22.           <td height="44" align="center"><form name="form1" method="get" action="rsearch.asp">
  23.               <br>
  24.         图书名称:
  25.         <input name=name class="inputstyle">
  26.         <select name=code>
  27.                 <option value="" selected>所有图书</option>
  28.                 <%
  29. rs.open "select * from category",conn,1,1
  30. do while not rs.eof
  31. %>
  32.                 <option value="<%=rs("categoryid")%>" ><%=rs("category")%></option>
  33.                 <%
  34. rs.movenext
  35. loop
  36. rs.close
  37. %>
  38.               </select>
  39.         <input name="Submit" type="submit" class="inputstyle" value="快速搜索">
  40.         <input type="button" name="Submit2" value="高级搜索" onClick="location='search.asp'">
  41.         <img src="images/line.gif" width="568" height="9">
  42.           </form></td>
  43.         </tr>
  44.         <tr>
  45.           <td align="left" valign="top"><img src="images/xssj.gif" width="221" height="28"></td>
  46.         </tr>
  47.         <tr>
  48.           <td align="center" valign="top"><table width="568"  border="0" cellpadding="0" cellspacing="0">
  49. <%
  50.   rs.open "select top 6 id,detail,discount,vipprice,author,desc,price1,price2,name,pic,mark from product order by id desc",conn,1,1
  51.   if rs.eof and rs.bof then
  52.   response.write "  对不起,暂时还没有商品!"
  53.   end if
  54.   i=0
  55.   do while not rs.eof
  56. %>
  57.   
  58.   
  59.               <tr>
  60.                 <td width="17%" height="130" align="center" valign="middle" class="shadow"><a href="vpro.asp?id=<%=trim(rs("id"))%>" target="_blank"><img src="<%=trim(rs("pic"))%>" width="85" height="125" border="0"></a></td>
  61.                 <td width="33%" align="left" valign="top"><table width="100%"  border="0" cellspacing="1" cellpadding="0">
  62.                     <tr>
  63.                       <td colspan="2"><img src="images/w.gif" width="18" height="18"><span class="booktitle"><%=strvalue(trim(rs("name")),24)%></span></td>
  64.                     </tr>
  65.                     <tr>
  66.                       <td height="40" colspan="2" class="bookinfo"><%=trim(rs("desc"))%><br>
  67.                       <br></td>
  68.                     </tr>
  69.                     <tr>
  70.                       <td>定价:<span class="price1"><%=rs("price1") %></span>元</td>
  71.                       <td>作者:<%=rs("author") %></td>
  72.                     </tr>
  73.                     <tr>
  74.                       <td>优惠价:<span class="price2"><%=rs("price2") %></span>元</td>
  75.                       <td>VIP价:<span class="viprice"><%=rs("vipprice") %></span></td>
  76.                     </tr>
  77.                     <tr>
  78.                       <td colspan="2" align="center"><a href="icar.asp?id=<%=rs("id")%>&action=add" target="pcart"><img src="images/car.gif" width="23" height="20" border="0">放入购物车</a> </td>
  79.                     </tr>
  80.                 </table></td>
  81. <%
  82. rs.movenext
  83. if rs.eof then
  84. response.write "<td width='17%'></td><td></td>"
  85. else
  86. %>
  87.                 <td width="17%" height="130" align="center" valign="middle" class="shadow"><a href="vpro.asp?id=<%=trim(rs("id"))%>" target="_blank"><img src="<%=trim(rs("pic"))%>" width="85" height="125" border="0"></a></td>
  88.                 <td width="33%" align="left" valign="top"><table width="100%"  border="0" cellspacing="1" cellpadding="0">
  89.                     <tr>
  90.                       <td colspan="2"><img src="images/w.gif" width="18" height="18"><span class="booktitle"><%=strvalue(trim(rs("name")),24)%></span></td>
  91.                     </tr>
  92.                     <tr>
  93.                       <td height="40" colspan="2" class="bookinfo"><%=trim(rs("desc"))%><br>
  94.                       <br></td>
  95.                     </tr>
  96.                     <tr>
  97.                       <td>定价:<span class="price1"><%=rs("price1") %></span>元</td>
  98.                       <td>作者:<%=rs("author") %></td>
  99.                     </tr>
  100.                     <tr>
  101.                       <td>优惠价:<span class="price2"><%=rs("price2") %></span>元</td>
  102.                       <td>VIP价:<span class="viprice"><%=rs("vipprice") %></span>元</td>
  103.                     </tr>
  104.                     <tr>
  105.                       <td colspan="2" align="center"><a href="icar.asp?id=<%=rs("id")%>&action=add" target="pcart"><img src="images/car.gif" width="23" height="20" border="0">放入购物车</a> </td>
  106.                     </tr>
  107.                 </table></td>
  108. <%
  109. end if
  110. %>
  111.               </tr>
  112.                 <tr>
  113.                 <td colspan="4" align="center"><img src="images/line.gif" width="568" height="9"></td>
  114.               </tr>
  115. <%
  116. i=i+1
  117.   if i>=5 then exit do
  118.   if not rs.eof then   rs.movenext
  119.   loop
  120.   rs.close
  121. %>   
  122.   
  123.   
  124.               <tr align="right">
  125.                 <td colspan="4"><table width="100" border="0" cellspacing="0" cellpadding="2">
  126.                     <tr>
  127.                       <td align="left"><a href="new.asp"><img src="images/more_2.gif" width="42" height="15" border="0"></a></td>
  128.                       <td width="10">&nbsp;</td>
  129.                     </tr>
  130.                 </table></td>
  131.               </tr>
  132.               <tr>
  133.                 <td colspan="4" align="center"><img src="images/line.gif" width="568" height="9"></td>
  134.               </tr>
  135.           </table></td>
  136.         </tr>
  137.         <tr>
  138.           <td align="left" valign="top"><img src="images/tzts.gif" width="221" height="27"></td>
  139.         </tr>
  140.         <tr>
  141.           <td><table width="568"  border="0" cellpadding="0" cellspacing="0">
  142.             <%
  143.   rs.open "select top 6 id,detail,desc,discount,vipprice,author,price1,price2,name,pic,mark from product where recommend=1 order by adddate desc",conn,1,1
  144.   if rs.eof and rs.bof then
  145.   response.write "  对不起,暂时还没有商品!"
  146.   'response.End
  147.   end if
  148.   i=0
  149.   do while not rs.eof
  150. %>
  151.             <tr>
  152.               <td width="17%" height="130" align="center" valign="middle" class="shadow"><a href="vpro.asp?id=<%=trim(rs("id"))%>" target="_blank"><img src="<%=trim(rs("pic"))%>" width="85" height="125" border="0"></a></td>
  153.               <td width="33%" align="left" valign="top"><table width="100%"  border="0" cellspacing="1" cellpadding="0">
  154.                   <tr>
  155.                     <td colspan="2"><img src="images/w.gif" width="18" height="18"><span class="booktitle"><%=strvalue(trim(rs("name")),24)%></span></td>
  156.                   </tr>
  157.                   <tr>
  158.                     <td height="40" colspan="2" class="bookinfo"><%=trim(rs("desc"))%><br>
  159.                       <br></td>
  160.                   </tr>
  161.                   <tr>
  162.                     <td>定价:<span class="price1"><%=rs("price1") %></span>元</td>
  163.                     <td>作者:<%=rs("author") %></td>
  164.                   </tr>
  165.                   <tr>
  166.                     <td>优惠价:<span class="price2"><%=rs("price2") %></span>元</td>
  167.                     <td>VIP价:<span class="viprice"><%=rs("vipprice") %></span>元</td>
  168.                   </tr>
  169.                   <tr>
  170.                     <td colspan="2" align="center"><a href="icar.asp?id=<%=rs("id")%>&action=add" target="pcart"><img src="images/car.gif" width="23" height="20" border="0">放入购物车</a> </td>
  171.                   </tr>
  172.               </table></td>
  173.               <%
  174. rs.movenext
  175. if rs.eof then
  176. response.write "<td width='17%'></td><td></td>"
  177. else
  178. %>
  179.               <td width="17%" height="130" align="center" valign="middle" class="shadow"><a href="vpro.asp?id=<%=trim(rs("id"))%>" target="_blank"><img src="<%=trim(rs("pic"))%>" width="85" height="125" border="0"></a></td>
  180.               <td width="33%" align="left" valign="top"><table width="100%"  border="0" cellspacing="1" cellpadding="0">
  181.                   <tr>
  182.                     <td colspan="2"><img src="images/w.gif" width="18" height="18"><span class="booktitle"><%=strvalue(trim(rs("name")),24)%></span></td>
  183.                   </tr>
  184.                   <tr>
  185.                     <td height="40" colspan="2" class="bookinfo"><%=trim(rs("desc"))%><br>
  186.                       <br></td>
  187.                   </tr>
  188.                   <tr>
  189.                     <td>定价:<span class="price1"><%=rs("price1") %></span>元</td>
  190.                     <td>作者:<%=rs("author") %></td>
  191.                   </tr>
  192.                   <tr>
  193.                     <td>优惠价:<span class="price2"><%=rs("price2") %></span>元</td>
  194.                     <td>VIP价:<span class="viprice"><%=rs("vipprice") %></span>元</td>
  195.                   </tr>
  196.                   <tr>
  197.                     <td colspan="2" align="center"><a href="icar.asp?id=<%=rs("id")%>&action=add" target="pcart"><img src="images/car.gif" width="23" height="20" border="0">放入购物车</a> </td>
  198.                   </tr>
  199.               </table></td>
  200. <%
  201. end if
  202. %>
  203.             </tr>
  204.             <tr>
  205.               <td colspan="4" align="center"><img src="images/line.gif" width="568" height="9"></td>
  206.             </tr>
  207.             <%
  208. i=i+1
  209.   if i>=5 then exit do
  210. if not rs.eof then   rs.movenext
  211.   loop
  212.   rs.close
  213.   set rs=nothing
  214. %>
  215.             <tr align="right">
  216.               <td colspan="4"><table width="100" border="0" cellspacing="0" cellpadding="2">
  217.                   <tr>
  218.                     <td align="left"><a href="commend.asp"><img src="images/more_2.gif" width="42" height="15" border="0"></a></td>
  219.                     <td width="10">&nbsp;</td>
  220.                   </tr>
  221.               </table></td>
  222.             </tr>
  223.             <tr>
  224.               <td colspan="4" align="center"><img src="images/line.gif" width="568" height="9"></td>
  225.             </tr>
  226.           </table></td>
  227.         </tr>
  228.     </table></td>
  229.   </tr>
  230. </table>
  231. <!--#include file="foot.htm"-->
  232. </body>
  233. </html>