pluginManage.jsp 1.07 KB
<%@ page language="java" contentType="text/html; charset=UTF-8" %> 
<%@ page import="weaver.hrm.HrmUserVarify"%>
<%@ page import="weaver.hrm.User"%>
<%@ page import="net.sf.json.JSONArray"%>
<%@ page import="net.sf.json.JSONObject"%>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<%
//用户验证
User user = HrmUserVarify.getUser(request, response);
if (user == null) {
	out.println(new JSONArray().toString());
	return;
}
	
JSONObject pluginObject = new JSONObject();
JSONArray pluginJSArray = new JSONArray();
JSONArray pluginCSSArray = new JSONArray();

rs.execute("select * from hppluginsetting where isuse=1 order by ordernum");
while(rs.next()){
	String filepath = rs.getString("filepath");
	String[] arr = filepath.split(",");
	for(String temp : arr){
		temp = temp.trim();
		if(!"".equals(temp)){
			if(temp.endsWith(".js")){
				pluginJSArray.add(temp);
			}else if(temp.endsWith(".css")){
				pluginCSSArray.add(temp);
			}
		}
	}
}

pluginObject.put("pluginJS", pluginJSArray);
pluginObject.put("pluginCSS", pluginCSSArray);
out.print(pluginObject.toString());
%>