pluginManage.jsp
1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<%@ 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());
%>