实现在科汛CMS会员中心调用指定栏目文章方法【已解决】

有一个客户要在会中心调用相关代理会员组的文章 并调用指定的栏目文章 经研究分享如下:

如果有科汛问题不懂,或要进行二次开发的朋友可以加我Q 95018369

在user/index.asp
最底下加以下代码 

 Private Function ArticleNews(ClassID)
    dim rs:set rs=server.CreateObject("adodb.recordset")
    RS.open "select top 5 ID,Title,AddDate from KS_Article where Tid='"& ClassID &"' order by id desc",conn,1,1
    With response
      .write "<ul>"
      do while not rs.eof
        .write "<li>"
        .write "<span class=""data"">"& LFCls.Get_Date_Field(rs("AddDate"),"YYYY-MM-DD") &"</span>"
        .write "<img src=""http://www.loongdi.com/UploadFiles/newsx.gif"" width=""4"" height=""5"" />"
        .write "<a href=""/thread-"& rs("ID") &"-1.html"" target=""_blank"" title="""& rs("Title") &""">"
        .write left(rs("Title"),40)
        .write "</a>"
        .write "</li>" & vbcrlf
      rs.movenext
      loop
      .write "</ul>"
    End With
    rs.close
    set rs=nothing
  End Function


同时在126行 加

下面调用栏目ID  下在红色为栏目ID
 <style>

             .hylb{ font-size:14px; background:#f0f2f5; padding:2px 10px; height:25px; line-height:25px; font-weight:bold; color:#f00;}
             .ldlb_left{ float:left; border:#f0f2f5 1px solid; margin-right:5px;  margin-bottom:12px;  width:49%; overflow:hidden}
              .ldlb_rig{ float:left; border:#f0f2f5 1px solid;  margin-bottom:12px; margin-left:5px; width:49%; overflow:hidden}
              .ldlb_cont{ padding:10px;  height:256px; padding-right:8px; }
              .ldlb_cont li{ line-height:26px;}
              .ldlb_cont li span{ float:right;}
             </style>
<!--设置不同的会员组显示不同的通知 -->   
    <!--总代会员 -->
              
<%if KSUser.GroupID=3 then%>    
 <div  class="ldlb_left">
<div class="hylb">
<span style=" font-size:12px; font-weight:normal; float:right"><a href="/list-2058.html" target="_blank">更多...</a></span>总代通知</div>
<div style="clear:both"></div>
<div  class="ldlb_cont"><%ArticleNews("20149942715233")%></div> 
 </div> 

 <div  class="ldlb_rig">
<div class="hylb">
<span style=" font-size:12px; font-weight:normal; float:right"><a href="/list-2032.html" target="_blank">更多...</a></span>资料下载</div>
<div style="clear:both"></div>
<div  class="ldlb_cont"><%ArticleNews("20148104672515")%></div> 
 </div> 

<%end if%> 
<!--直营会员 -->
<%if KSUser.GroupID=2 then%>    

 
 <div  class="ldlb_left">
<div class="hylb">
<span style=" font-size:12px; font-weight:normal; float:right"><a href="/list-2057.html" target="_blank">更多...</a></span>直营通知</div>
<div style="clear:both"></div>
<div  class="ldlb_cont"><%ArticleNews("20151705366857")%></div> 
 </div> 


 <div  class="ldlb_rig">
<div class="hylb">
<span style=" font-size:12px; font-weight:normal; float:right"><a href="/list-2032.html" target="_blank">更多...</a></span>资料下载</div>
<div style="clear:both"></div>
<div  class="ldlb_cont"><%ArticleNews("20148104672515")%></div> 
 </div> 

<%end if%> 


<!--管理员 -->

<%if KSUser.GroupID=1 then%>
 <div  class="ldlb_left">
<div class="hylb">
<span style=" font-size:12px; font-weight:normal; float:right"><a href="/list-2058.html" target="_blank">更多...</a></span>总代通知</div>
<div style="clear:both"></div>
<div  class="ldlb_cont"> <%ArticleNews("20149942715233")%></div></div> 
 </div> 

 <div  class="ldlb_rig">
<div class="hylb">
<span style=" font-size:12px; font-weight:normal; float:right"><a href="/list-2057.html" target="_blank">更多...</a></span>直营通知</div>
<div style="clear:both"></div>
<div  class="ldlb_cont"><%ArticleNews("20151705366857")%></div> 
 </div> 


 <div  class="ldlb_left">
<div class="hylb">
<span style=" font-size:12px; font-weight:normal; float:right"><a href="/list-2032.html" target="_blank">更多...</a></span>资料下载</div>
<div style="clear:both"></div>
<div  class="ldlb_cont"><%ArticleNews("20148104672515")%></div> 
 </div> 
 

<%end if%> 

 </div> 
 <!--设置不同的会员组显示不同的通知结束 --> 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值