OSDN Git Service

Initial commit
[ultramonkey-l7/l7gui.git] / src / WebContent / user_delete_fail.jsp
1 <%@ page
2         import="org.ultramonkey.l7.model.*,org.ultramonkey.l7.controller.*,org.ultramonkey.l7.view.*"
3         language="java" contentType="text/html; charset=UTF-8"
4         pageEncoding="UTF-8"%>
5
6 <%
7          /*
8          * check session
9          */
10         L7guiServletBase base = new L7guiServletBase();
11         if (session.isNew() || base.checkSession(session) == false) {
12                 MessageView error = new MessageView(41419,
13                 LogCategorySet.GUI_USER_AUTHENTICATION,
14                 Message.INVALID_SESSSION);
15                 session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
16                 response.sendRedirect(RedirectPages.LOGIN);
17                 return;
18         }
19
20         /*
21          * get result message
22          */
23
24         MessageView message = (MessageView) session
25                         .getAttribute(SessionKeys.RESULT_MESSAGE);
26
27         String errorMessage = "";
28         int errorNumber = 0;
29         String category = "";
30
31         if (message != null) {
32                 errorMessage = message.getMessage();
33                 errorNumber = message.getErrno();
34                 category = message.getCategory();
35                 session.setAttribute(SessionKeys.RESULT_MESSAGE, null);
36         }
37
38         /*
39          * get cluster status
40          */
41         L7guiFramework framework = new L7guiFramework();
42         ClusterData cd = framework.getClusterData();
43         if (cd == null) {
44                 MessageView error = new MessageView(41420,
45                 LogCategorySet.GUI_IO_COMMAND,
46                 Message.CLUSTER_DATA_ERROR);
47                 session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
48                 response.sendRedirect(RedirectPages.LOGIN);
49                 return;
50         }
51
52         /*
53          * fix style seat
54          */
55         String cssSeat = "l7gui_single_style.css";
56         if (cd.self_status == ClusterStatus.ACTIVE) {
57                 cssSeat = "l7gui_act_style.css";
58         } else if (cd.self_status == ClusterStatus.STANDBY) {
59                 cssSeat = "l7gui_sby_style.css";
60         }
61 %>
62
63
64
65 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
66 <html>
67 <head>
68         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
69         <meta http-equiv="Pragma" content="no-cache">
70         <meta http-equiv="Cache-Control" content="no-cache">
71         <meta http-equiv="Expires" content="0"> 
72         <meta http-equiv="Content-Script-Type" content="text/javascript" />
73         <meta http-equiv="Content-Style-Type" content="text/css" />
74         <noscript>
75         <meta http-equiv="refresh"
76                 content="<%= RedirectPages.NOSCRIPT_TIME %>; url=<%= RedirectPages.LOGIN %>" />
77         </noscript>
78         <link rel="stylesheet" type="text/css" href="<%=cssSeat %>" />
79         <link rel="shortcut icon" href="images/favicon.ico" />
80         <title>Failed : Delete User</title>
81 </head>
82
83 <body class="normal">
84
85 <jsp:include page="menu.jsp" flush="false" />
86
87 <div id="content">
88 <h1 class="title">Failed :  Delete User</h1>
89
90 <%
91         if (errorMessage != null) {
92                 out.println("<h2>Error Reason :</h2>");
93                 out.println("<p class=\"error\"> [" + category + " - " + errorNumber + "] </p>");
94                 out.println("<p class=\"error\">" + errorMessage + "</p>");
95         }
96 %>
97 </div>
98 </body>
99 </html>