%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page import="com.Admin.daoimpl.SubTypeDaoImpl" %> <%@ page import="com.Admin.daoimpl.SuperTypeDaoImpl" %> <%@ page import="com.Admin.daoimpl.AdminUserDaoImpl" %> <%@ page import="com.Admin.daoimpl.AdminProdDaoImpl" %> <%@ page import="java.io.File"%> <%@ page import="com.Admin.vo.SubType"%> <%@ page import="com.Admin.vo.SuperType"%> <%@ page import="com.Admin.vo.User"%> <%@ page import="com.Admin.vo.Recommend"%> <%@ page import="com.common.MD5"%> <%@ page import="java.util.ArrayList"%> <%@ page import="net.sf.json.JSONArray"%> <%@ page import="net.sf.json.JSONObject"%> <%@ page import="com.common.IConstant"%> <%@ page import="com.common.Redis"%> <%@ page import="redis.clients.jedis.Jedis"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="cf" uri="/WEB-INF/els.tld" %> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String realPath = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath()+request.getServletPath().substring(0,request.getServletPath().lastIndexOf("/")+1); String context = request.getServletPath().substring(1,request.getServletPath().lastIndexOf("/")); String apppath = getServletContext().getRealPath("/"+context); String tp = request.getParameter("tp"); if(tp!=null){ apppath = getServletContext().getRealPath("/tpl/"+tp); } response.setCharacterEncoding("utf-8"); request.setCharacterEncoding("utf-8"); String t = request.getParameter("t"); String supid = request.getParameter("ar"); String pn = request.getParameter("pn"); int pageno=1; if(pn!=null){ pageno=Integer.valueOf(pn); } String appid = IConstant.getCurrentAppid(apppath); Jedis redis = null; redis = Redis.getReadRedis(); int role = 301; //get index recommend String type="0"; //get news types JSONArray ts = new JSONArray(); ts.add("行业咨询"); ts.add("培训信息"); JSONArray notices = null; int pagenum=0; if(ts!=null&&ts.size()>0){ JSONObject rtn = null; if(supid==null){ supid = ts.getString(0); rtn = new AdminProdDaoImpl().getAllNewsByTypePage( null,pageno); }else{ rtn = new AdminProdDaoImpl().getAllNewsByTypePage( supid,pageno); } //get notices if(rtn!=null) { notices = rtn.getJSONArray("notices"); pagenum = rtn.getInt("pagenum"); } if(notices==null){ notices= new JSONArray(); } if(notices.size()==0){ notices = IConstant.getCacheNotices(redis, "1", t); } } else{ ts = new JSONArray(); notices = new JSONArray(); } if(redis!=null){ redis.close(); } %>
<%=n.getString("introduce") %>
查看更多