<%caImpl.addChannelStatistic(siteId,ocId,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************************/ private 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+"'";} /*****[dongxf][20110114][add]****/ String channelIds= " and CHAN_LEVEL <> 0 "; channelIds+=" and CHANNEL_ID <> 433 ";//人才战略-在线应聘 channelIds+=" and CHANNEL_ID <> 437 ";//客户服务-会员注册 channelIds+=" and CHANNEL_ID <> 448 ";//资料下载-正式客户 channelIds+=" and CHANNEL_ID <> 449 ";//资料下载-正式客户 channelIds+=" and CHANNEL_ID <> 443 ";//资料下载-正式客户-技术资料 channelIds+=" and CHANNEL_ID <> 444 ";//资料下载-正式客户-培训资料 channelIds+=" and CHANNEL_ID <> 445 ";//资料下载-正式客户-行业标准 channelIds+=" and CHANNEL_ID <> 446 ";//资料下载-正式客户-期刊下载 channelIds+=" and CHANNEL_ID <> 447 ";//资料下载-正式客户-调查资料 channelIds+=" and CHANNEL_ID <> 450 ";//资料下载-潜在客户-技术资料 channelIds+=" and CHANNEL_ID <> 451 ";//资料下载-潜在客户-培训资料 channelIds+=" and CHANNEL_ID <> 452 ";//资料下载-潜在客户-行业标准 channelIds+=" and CHANNEL_ID <> 453 ";//资料下载-潜在客户-期刊下载 channelIds+=" and CHANNEL_ID <> 454 ";//资料下载-潜在客户-调查资料 /*****[dongxf][20110114][add]****/ java.util.List _curOneChanParentList = leftChanCimfi.getChannelsListByWhere(1,100,sql+channelIds," 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 = "";} String cur_title=_oneChanVo.getChanTitle(); if(cur_title!=null&&cur_title.length()>13){ cur_title=cur_title.substring(0,13); } chanTitleStr = ""+cur_title+""; if("1".equals(String.valueOf(_oneChanVo.getChanType()))){ //栏目外部链接类型 chanTitleStr = ""+cur_title+""; } 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+""; } } } } return str; } /************将当前栏目所有的栏目树放入String[]**************/ } %> <% /* @说明@ 类chanNameArr : 处理三级,四级栏目类,五级未测试 方法getChanNameArr : 返回处理过的栏目列表 参数1:"ocId" --当前栏目Id 参数2:"on" --当前栏目的a样式名称 ========方法getChanNameArr返回的栏目列表类似===========

栏目名称

相对根目录的一级栏目

栏目名称

相对根目录的二级栏目

栏目名称

相对根目录的三级栏目

栏目名称

相对根目录的四级栏目 ======================================================= */ chanNameArr _chanNameCls = new chanNameArr(); String[] str = _chanNameCls.getChanNameArr(ocId,"on_h1"); out.println(""); %>
<% String path_se = request.getContextPath(); String basePath_se = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path_se+"/"; %>

产品解决方案搜索

联系我们

400免费客户服务电话
400-180-2998
集团公司总部电话
0535-5520001
地址:山东省烟台市机场路2号
邮编:264000

公司资质

国家认定企业技术中心

发布日期 2011-09-25 来源:
<% if(cmsInformationImpl.getArticleField("ARTI_ACCESSORY_IDS", articleInformationVO.getArticleId().toString()) != null && !cmsInformationImpl.getArticleField("ARTI_ACCESSORY_IDS", articleInformationVO.getArticleId().toString()).equals("")) { %>
附件下载:
<% } %>
工作机会 | 网站地图 | 法律声明
Copyright ©2011 东方电子集团有限公司 All Rights Reserved