本帖最后由 正版辉太狼 于 2017-9-7 11:48 编辑
是这样的,我有一个网站,有一个产品管理系统。在网站前台我想设置两处产品栏目,即每个栏目只展示产品库的一部分。
如:“家具维修”下展示前5类,“家居服务”下展示后5类。
底部的调用也同样。
请问,这个如何设置?代码要怎么修改?
我尝试着修改过,但是两处均全部展示产品库的所有内容,不能调用一部分,
请问应该怎么解决,请高手回答,不甚感激!
附上源代码:
产品库代码
- <!--#include file="top-product.asp" -->
- <%dim num
- num=cint(request.QueryString("Cla"))%>
- <div id="main_all">
- <div id="hj_lftbar">
- <div id="left">
- <div id="left_in_1">
- <strong>家具维修</strong>
- <div class="leftMenu">
- <div class="menu">
- <%
- set rsbig = server.CreateObject ("adodb.recordset")
- sql="select * from cbclass order by cb_order asc"
- rsbig.open sql,conn,1,1
- if rsbig.eof and rsbig.bof then
- Response.Write ""
- else
- Thj=1
- do while not rsbig.eof
- %>
- <div class="menuParent">
- <div class="ListTitlePanel">
- <div class="ListTitle">
- <strong><%=rsbig("cb_name")%></strong>
- <div class="leftbgbt"> </div>
- </div>
- </div>
- <div class="menuList" <%if num<>rsbig("cb_id") then%>style="display:none"<%end if%>>
- <%set rssmall = server.CreateObject ("adodb.recordset")
- sql="select * from csclass where cb_id="&rsbig("cb_id")&" order by cs_order asc"
- rssmall.open sql,conn,1,1
- if rssmall.eof and rssmall.bof then
- Response.Write ""
- else
- do while not rssmall.eof%>
- <div><a href="product.asp?Cla=<%=rsbig("cb_id")%>&ncla=<%=rssmall("cs_id")%>"><%=rssmall("cs_name")%></a></div>
- <%rssmall.movenext
- loop
- rssmall.close
- set rssmall=nothing
- end if%>
- </div>
- </div>
- <%
- rsbig.movenext
- Thj=Thj+1
- loop
- rsbig.close
- set rsbig=nothing
- end if
- %>
- </div>
- </div>
- <!--#include file="left.asp" -->
- <script type="text/javascript">
- $(document).ready(function() {
- var menuParent = $('.menu > .ListTitlePanel > div');//获取menu下的父层的DIV
- var menuList = $('.menuList');
- $('.menu > .menuParent > .ListTitlePanel > .ListTitle').each(function(i) {//获取列表的大标题并遍历
- $(this).click(function(){
- if($(menuList[i]).css('display') == 'none'){
- $(menuList[i]).slideDown(300);
- }
- else{
- $(menuList[i]).slideUp(300);
- }
- });
- });
- });
- </script>
- </div>
- </div>
- </div>
- <div id="hj_rgtbar">
- <div class="ne_bt">
- <h6>当前位置:<a href="index.asp">首页</a> > <a href="product.asp">家具维修</a><a href="javascript:;"><%=Get_Cname(request("Cla"))%></a><a href="javascript:;"><%= Get_Xname(request("Ncla"))%></a></h6>
- <h2><%if request("Cla")="" then%>家具维修<%else%><%=Get_Cnames(request("Cla"))%><%end if%></h2></div>
- <div style="clear:both"></div>
- <div id="rgt_doc">
- <%call thecp(request("Cla"),request("Ncla"),"pshow.asp")%>
- </div>
- </div>
-
- <div style="clear:both"></div>
- </div>
- <!--#include file="bottom.asp" -->
复制代码
产品页代码- <!--#include file="top-product1.asp" -->
- <div id="main_all">
- <div id="hj_lftbar">
- <div id="left">
- <div id="left_in_1">
- <strong>家具维修</strong>
- <ul><%call cleft_cla("","product.asp")%></ul>
- <!--#include file="left.asp" -->
-
- </div>
- </div>
- </div>
- <div id="hj_rgtbar">
- <div class="ne_bt">
- <h6>当前位置:<a href="index.asp">首页</a> > <a href="product.asp">家具维修</a><a href="javascript:;"><%=Get_Cname(request("Cla"))%></a></h6>
- <h2><%if request("Cla")="" then%>家具维修<%else%><%=Get_Cnames(request("Cla"))%><%end if%></h2></div>
- <div style="clear:both"></div>
- <div id="rgt_doc">
- <%call thecp(request("Cla"),request("Ncla"),"pshow.asp")%>
- </div>
- </div>
-
- <div style="clear:both"></div>
- </div>
- <!--#include file="bottom.asp" -->
复制代码
底部导航代码(部分)
- <div style="clear:both"></div>
- <div class="bottom">
- <div class="bottom_in">
- <div class="bo_left"><div class="Footer">
-
- <dl id="end_1">
- <dt>关于我们</dt>
- <%call ndb_cla(36,"about.asp")%>
- </dl>
- <dl id="end_3">
- <dt>家具维修</dt>
- <%call cdb_cla("","product.asp")%>
- </dl>
-
- <dl id="end_2">
- <dt>家居服务</dt>
- <%call ndb_cla(35,"fwdt.asp")%>
- </dl>
-
- <dl id="end_5">
- <dt>家居百科</dt>
- <%call ndb_cla(31,"jjbk.asp")%>
- </dl>
-
- <dl id="end_6">
- <dt>服务团队</dt>
- <%call ndb_cla(46,"lbjz.asp")%>
- </dl>
-
复制代码 |