<%@ page import="com.whir.cms.infomanager.CmsArticleImpl"%> <%@ page import="java.util.List"%> <%@ page import="java.util.Map"%> <%@ page import="com.whir.cms.prjs.TempUser.vo.FyahxxnrVO"%> <%@ page import="com.whir.cms.prjs.TempUser.FrontTemp"%> <%@ page import="com.whir.cms.prjs.TempUser.vo.ShopChannelVO"%> <% FrontTemp temp=new FrontTemp(); String cur_chanPar=temp.getParent(ocId); String cur_foler_name=temp.getFolder(ocId); String username=null; String applyunit=null; String id=null; Date time=null; String applytime=null; String status=null; String content=request.getParameter("content"); String searchType = (String)request.getParameter("searchType"); //searchType System.out.println("typeeeeeeeeeeeeeeeeeeeeeeeeee="+searchType); System.out.println("contenttttttttttttttttttttttt="+content); String where="";//查询数据库的sql String where2="";//分页中的连接url String title=""; String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; int a; int ipage=16; //分頁單位 int allpage; //總頁數 int pages; //接受的頁碼變數 int cpage=1; //當前頁 int spage; //開始頁 int allCol=0; //取總文章數 where2=""; where=where+" and arti_deleteflag = 0 "; where=where+" and chan.CHAN_PARENT like '"+cur_chanPar+"%'"; where=where+" and arti.article_state_id in ( select arti_state_id from cms_arti_state where site_id="+siteId; where=where+" and arti_state_publish = 1 )"; CmsArticleCommentImpl af1=new CmsArticleCommentImpl(); allCol = af1.countNum(where); //獲得總頁面數 allpage = (int)Math.ceil((allCol + ipage-1) / ipage); //判斷參數pages是否空 if (request.getParameter("pages")==null) { pages=1; } else { pages = new Integer(request.getParameter("pages")).intValue(); System.out.println(pages); } //判斷當前頁 if(pages > allpage || pages == 0) {cpage = 1;} else { cpage = pages; } where=where+" order by ARTI_EDIT_TIME desc"; List list=af1.queryArtiByNum(ipage,cpage,where); int c=list.size(); if(allpage==0){ allpage=1; } %> DFE-News & Events
<%caImpl.addChannelStatistic(siteId,ocId,IP); caImpl.addSiteStatisticBySession(siteId,IP); %>

News & Events

<%@ 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(""); %>
 
    <% if((null==list)||(0==list.size())){ %> <%} %> <% HighsearchVO highsearch=new HighsearchVO(); String artititle=""; String articledate=""; String articleid=""; String chanfolder=""; String chantitle=""; int index = 0; for(int aaa=0;(list!=null)&&(aaa500){ present=present.substring(0,500); } if(artititle!=null&&artititle.length()>65){ artititle=artititle.substring(0,65)+"..."; } index ++; String listClass="bg_td1"; if(index%2 != 0){listClass="bg_td_01";} //article_id,channel_id,articleTitle,chan_folder %>
  • <%=artititle%><%=articledate.substring(0,16)%>
  • <%}%>
First    <%if(cpage>1){%>Prev<%}else{%>Prev<%}%>    <%if (cpageNext<%}else{%>Next<%}%>    Last