-
Notifications
You must be signed in to change notification settings - Fork 0
/
chooseprofile.jsp
45 lines (44 loc) · 1.91 KB
/
chooseprofile.jsp
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
39
40
41
42
43
44
45
<%@include file="util.jsp"%>
<%@include file="logincheck.jsp" %>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:if test="${not empty param.group}">
<%
request.getSession().setAttribute("group", request.getParameter("group"));
response.sendRedirect("showprofile.jsp?name=" + request.getParameter("group"));
%>
</c:if>
<c:if test="${empty param.group}">
<%
Store store = getStore(application);
Map<String, Properties> fileMap = store.loadAllProfiles();
%>
<table width="100%" cellpadding="0" cellspacing="0">
<tr bgcolor="#efefef">
<td colspan="4"><img src="images/1trans.gif"/></td>
</tr>
<tr bgcolor="#dfdfdf">
<td class="default"> <b>kortnamn</b></td>
<td class="default"><b>namn</b></td>
<td class="default"><b>status</b></td>
<td class="default"><b>last changed</b></td>
</tr>
<tr bgcolor="#7f7f7f">
<td colspan="4"><img src="images/1trans.gif"/></td>
</tr>
<% for (Properties properties: fileMap.values()) { %>
<tr>
<td class="default"> <% out.println("<a href=\"chooseprofile.jsp?group=" + properties.getProperty("name") + "\">" + properties.getProperty("name") + "</a>"); %></td>
<td class="default"><% out.println(properties.getProperty("longname")); %></td>
<td class="default"><% out.println(properties.getProperty("status")); %></td>
<td class="default">
<%
long l_time = store.getProfileFile(properties.getProperty("name")).lastModified();
java.text.DateFormat df = new java.text.SimpleDateFormat("yy.MM.dd HH:mm:ss");
out.println(df.format(new java.util.Date(l_time)));
%></td>
</tr>
<% } %>
</table>
</c:if>