<%caImpl.addChannelStatistic(siteId,ocId,IP); caImpl.addSiteStatisticBySession(siteId,IP); %>

Область конфиденциальной политики

<%@ page import="com.whir.cms.infomanager.CmsInfoManagerFrontImpl" %> <%@ page import="com.whir.cms.infomanager.vo.ChannelInformationVO" %> <%! class chanNameArr{ private CmsInfoManagerFrontImpl leftChanCimfi = null; public chanNameArr(){ leftChanCimfi = new CmsInfoManagerFrontImpl(); } /*********************取当前栏目的一级栏目CHAN_PARENT************************/ public String OneChanParent(String ocId,String who){ String str = null; ChannelInformationVO _curChanVo = leftChanCimfi.getChannelById(ocId); if(_curChanVo != null){ String _curOneChanParent = _curChanVo.getChanParent(); if("ParentChan".equals(who)){ //取ChanParent if(_curOneChanParent != null && !"".equals(_curOneChanParent) && _curOneChanParent.length() >= 4){ str = _curOneChanParent.substring(0,4); } }else if("curParentChan".equals(who)){ str = _curOneChanParent; } } return str; } /*********************取当前栏目的一级栏目CHAN_PARENT************************/ /************将当前栏目所有的栏目树放入String[]**************/ public String[] getChanNameArr(String ocId,String curAStyle){ String dbType = com.whir.cms.common.util.db.Proxool.dbType; String[] str = null; String OneChanParentStr = OneChanParent(ocId,"ParentChan"); //ocId的ParentChan if(OneChanParentStr != null && !"".equals(OneChanParentStr)){ String chanTitleStr = ""; //栏目标题 String isShow = "none"; //是否显示隐藏 String chanParentByList = ""; //循环栏目列表时的栏目CHAN_PARENT String chanLevelByList = ""; //循环栏目列表时的栏目级别 String chanParent = OneChanParent(ocId,"curParentChan"); //当前栏目ocId的栏目CHAN_PARENT String curChanStype = ""; String sql = " substr(CHAN_PARENT,1,4)= '"+OneChanParentStr+"'"; //查询条件 if(!"oracle".equals(dbType)){sql = " left(CHAN_PARENT,4)='"+OneChanParentStr+"'";} java.util.List _curOneChanParentList = leftChanCimfi.getChannelsListByWhere(1,100,sql+" and CHAN_LEVEL <> 0"," chan_parent asc"); if(_curOneChanParentList != null){ int _tmp_int = _curOneChanParentList.size(); str = new String[_tmp_int]; for(int m=0; m < _tmp_int; m++){ ChannelInformationVO _oneChanVo = (ChannelInformationVO)_curOneChanParentList.get(m); if(_oneChanVo != null){ chanLevelByList = String.valueOf(_oneChanVo.getChanLevel()); chanParentByList = OneChanParent(String.valueOf(_oneChanVo.getChannelId()),"curParentChan"); if(chanParent.equals(chanParentByList)){ //当前栏目时的状态 curChanStype = curAStyle; }else{curChanStype = "";} chanTitleStr = ""+_oneChanVo.getChanTitle()+""; if("1".equals(String.valueOf(_oneChanVo.getChanType()))){ //栏目外部链接类型 chanTitleStr = ""+_oneChanVo.getChanTitle()+""; } if(Integer.parseInt(chanLevelByList) <= 1){ //默认一级栏目在任何情况下都显示 isShow = "block"; }else{ if(chanParent.indexOf(chanParentByList)!=-1){ //循环栏目为当前栏目的上级或上上级栏目 isShow = "block"; }else{ if(chanParent.length() >= 5){ if((chanParent.substring(0,chanParent.length()-5)).equals(chanParentByList.substring(0,chanParentByList.length()-5))){ //显示当前栏目的同级同栏目 isShow = "block"; }else if((chanParent).equals(chanParentByList.substring(0,chanParentByList.length()-5))){ //当前栏目为循环栏目的上级栏目 isShow = "block"; }else if(chanParent.length() > chanParentByList.length() && (chanParent.substring(0,9)).equals(chanParentByList.substring(0,9))){ //当前栏目为循环栏目的上上级栏目,且不取上上级栏目下的同级栏目 isShow = "block"; }else{ isShow = "none"; } }else{isShow = "none";} } } str[m] = ""+chanTitleStr+""; System.out.println(str[m]); } } } } return str; } /************将当前栏目所有的栏目树放入String[]**************/ } %> <% //这段代码在左部没有子栏目时,将只有个div空标签 chanNameArr _chanNameCls = new chanNameArr(); String[] str = _chanNameCls.getChanNameArr(ocId,"on_h1"); out.println(""); %>