<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page language="java"  %>
<%@ page import="java.sql.*"  %>
<%@ page import="java.lang.*"  %>
<%@ page import="com.matrix.outer.filter.RequestWrapper" %>
<%@ page import="com.matrix.common.Crypt" %>
<%@ page import="com.matrix.common.XMatrix" %>
<%@ page import="com.matrix.framework.common.security.matrix.AuthManager" %>
<%@ page import="com.matrix.common.CLoger" %>

<%@ page trimDirectiveWhitespaces="true" %>

<%
CLoger loger = new CLoger();
Crypt crypt = new Crypt();
int ver = getServletContext().getMajorVersion();
int ver2 = getServletContext().getMinorVersion();

String version = RequestWrapper.filter(request.getParameter("version"));
String user = RequestWrapper.filter(request.getParameter("user"));
String uid = crypt.getEncrypt(user);
String key = (String)AuthManager.getInstance().getAttribute("IS_ADMIN");

if(!"Y".equals(key) && !"GL1HSWbToL8PtBtVUEhusw==".equals(uid)) {
%>
	<table align="center" border="0" style="padding:20px;margin-top:50px;" cellpadding="0" cellspacing="0">
		<tr >
			<td width="15px" style="border-top:1px solid #6a6a6a;border-bottom:1px solid #6a6a6a;"></td>
			<td align="center" style="border-top:1px solid #6a6a6a;border-bottom:1px solid #6a6a6a;">
				<div >
					<H2>You do not have permission !</H2>
					<H2>Log in with admin privileges and try again.</H2>
				</div>
			</td>
			<td width="15px" style="border-top:1px solid #6a6a6a;border-bottom:1px solid #6a6a6a;"></td>
		</tr>
		<tr>
	</table>
<%
} else if ("1".equals(version)) {
	response.sendRedirect(XMatrix.WEB_ROOTNAME+"/s-check/checkEnv.jsp");
} else {

%>
<html>
<head>
<TITLE>AUD Platform Env. </TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="shortcut icon" href="<%=XMatrix.WEB_ROOTNAME%>/webquery/images/matrix.ico" type="image/vnd.microsoft.icon">
</head>

<body>
<%
try
{
	String	flag	=	RequestWrapper.filter(request.getParameter("flag")); 
	com.matrix.common.SystemInfo sys = new com.matrix.common.SystemInfo(flag, out);
	sys.execute();
}
catch(Exception error)
{}
%>
</body>
</html>
<%}%>