• <%@ page contentType="text/html; charset=GBK" %> <%@ page import="java.util.List,com.ehwa.sql.result.DataSet,com.ehwa.util.StringHelper,com.ehwa.object.ObjectManager"%> <%@ page import="com.ehwa.resource.ResourceConfig"%> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%> <%@ include file="/common/config/province.jsp" %>
  • <%@ page language="java" import="java.util.*" pageEncoding="GBK"%> <%@page import="com.ehwa.catalog.CatalogManager"%> <%@page import="com.ehwa.sql.result.DataSet"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <% final int nkCatalogId = 6879;//内刊栏目ID CatalogManager cm = new CatalogManager(); DataSet nkCatalog = null; List nkList = cm.list("select * from catalog where parent_id="+nkCatalogId+" and state!=0 order by id desc"); %>
    <% nkCatalog = (DataSet)nkList.get(0); %>
    <%=nkCatalog.getString("name") %>
    本期专题:
    "><%=nkCatalog.getString("description") %>
     
  • 公司新闻  媒体报道

    <%@ page language="java" contentType="text/html; charset=GBK"%> <%@page import="com.ehwa.article.ArticleManager"%> <%@page import="java.util.List"%> <%@page import="com.ehwa.sql.result.DataSet"%> <%@page import="com.ehwa.util.DataSetHelper"%> <%@page import="com.ehwa.resource.ResourceConfig"%> <%@page import="com.ehwa.util.StringHelper"%> <%! private String getDataSQL(int catalogId) { StringBuffer buffer = new StringBuffer(); //选取某个栏目已经发布的文章信息 buffer.append("select a.id,a.title,a.show_title,a.brief,a.pubdate,a.type,a.is_picture,a.link_picture,a.link_url,a.link_document,r.link,a.stress_title,a.stress_brief,a.title_font from article a,sys_resource r where a.id=r.object_id and r.type=1"); buffer.append(" and r.category=" + catalogId); buffer.append(" and r.pubstate=" + ResourceConfig.PUBSTATE_PUBLISH); buffer.append(" and a.garbage=0"); buffer.append(" order by r.is_top desc,r.orderline desc"); return buffer.toString(); } private String getDataSQL(int[] catalogIds){ StringBuffer buffer = new StringBuffer(); //选取某个栏目已经发布的文章信息 buffer.append("select a.id,a.title,a.show_title,a.brief,a.pubdate,a.type,a.is_picture,a.link_picture,a.link_url,a.link_document,r.link,a.stress_title,a.stress_brief,a.title_font from article a,sys_resource r where a.id=r.object_id and r.type=1"); buffer.append(" and r.category in("+catalogIds[0]); for(int i = 1 ; i < catalogIds.length ; i++){ buffer.append(","+catalogIds[i]); } buffer.append(")"); buffer.append(" and r.pubstate=" + ResourceConfig.PUBSTATE_PUBLISH); buffer.append(" and a.garbage=0"); buffer.append(" order by r.is_top desc,a.is_picture desc,r.orderline desc"); return buffer.toString(); } private String getDataSQLisPic(int catalogId) { StringBuffer buffer = new StringBuffer(); //选取某个栏目已经发布的文章信息 buffer.append("select a.id,a.title,a.show_title,a.brief,a.pubdate,a.type,a.is_picture,a.link_picture,a.link_url,a.link_document,r.link,a.stress_title,a.stress_brief,a.title_font from article a,sys_resource r where a.id=r.object_id and r.type=1"); buffer.append(" and r.category=" + catalogId); buffer.append(" and r.pubstate=" + ResourceConfig.PUBSTATE_PUBLISH); buffer.append(" and a.garbage=0"); buffer.append(" and is_picture=1"); buffer.append(" order by r.is_top desc,r.orderline desc"); return buffer.toString(); } %> <% final int catalogNews = 6882; final int catalogReport = 6883; final int[] catalogIds = {6882,6883}; ArticleManager am = new ArticleManager(); List articleNews = am.list(getDataSQL(catalogIds),5); List articlePic = am.list(getDataSQLisPic(catalogNews),1); String picPath = ""; if(articlePic!=null&&articlePic.size()>0){ picPath = ((DataSet)articlePic.get(0)).getString("link_picture"); } %>
  • <%@ page contentType="text/html; charset=GBK" %> <%@ page import="com.ehwa.util.RequestHelper, java.util.List, com.ehwa.util.DataSetHelper, com.ehwa.util.StringHelper"%> <%@ page import="com.ehwa.object.ObjectManager"%> <%! private String getDataSQL(int catalogId) { StringBuffer buffer = new StringBuffer(); //选取某类别有效的友情链接 buffer.append("select id,name,url,picture from link where state=1"); buffer.append(" and catalog_id = " + catalogId); buffer.append(" order by orderline,createtime desc"); return buffer.toString(); } %>