Searchproduct.asp 596 B

12345678910111213141516171819
  1. <!--#include file="Conn.asp"-->
  2. <%Checklogin("信息管理")%>
  3. <%
  4. str=TextEnCode(Request.QueryString("str"))
  5. Set Rs=Server.CreateObject("Adodb.Recordset")
  6. sql="select id,ProductImg,ProductName,unit from Products where productName like '%"&str&"%'"
  7. Rs.open sql,conn,1,3
  8. Do while Not Rs.bof and Not Rs.eof
  9. %>
  10. <li data-id="<%=Rs("id")%>" data-unit="<%=Rs("unit")%>"><div class="list-content"><div class="pic"><img src="<%=Rs("ProductImg")%>" ></div><div class="name"><%=Rs("ProductName")%></div></div></li>
  11. <%
  12. Rs.moveNext
  13. loop
  14. Rs.close
  15. Set Rs=Nothing
  16. conn.close
  17. Set conn=Nothing
  18. %>