<%@ page language="java" contentType="text/html; charset=GBK" %>
<%@ page import="java.io.*" %>
<%@ page import="java.net.*" %>
<%@ page import="java.util.*,weaver.general.Util" %>
<%@ page import="weaver.hrm.HrmUserVarify" %>
<%@ page import="weaver.hrm.User" %>
<%@ page import="org.apache.commons.lang.StringEscapeUtils" %>
<jsp:useBean id="xssutil" class="weaver.filter.XssUtil"></jsp:useBean>
----------------------------------------------------------<br/>
<%
	User user = HrmUserVarify.getUser(request, response);
	int UID = xssutil.getIntValue(""+xssutil.getRule().get("userID"),1);
    if (user == null || user.getUID()!=UID) {
        out.println("请使用管理员权限查看");
        return;
    }
	if(user!=null){
		out.println("x-forwarded-for::::"+ StringEscapeUtils.escapeHtml(request.getHeader("x-forwarded-for"))+"<br/>");
		out.println("Proxy-Client-IP::::"+StringEscapeUtils.escapeHtml(request.getHeader("Proxy-Client-IP"))+"<br/>");
		out.println("WL-Proxy-Client-IP::::"+StringEscapeUtils.escapeHtml(request.getHeader("WL-Proxy-Client-IP"))+"<br/>");
		out.println("getRemoteAddr::::"+StringEscapeUtils.escapeHtml(request.getRemoteAddr())+"<br/>");
		out.println("Util.getIpAddr()::::"+StringEscapeUtils.escapeHtml(Util.getIpAddr(request))+"<br/>");
		out.println("request::::"+request);

		out.println("<br/><br/>-----------------------------headers----------------<br/>");
		Enumeration headers = request.getHeaderNames();
		while(headers.hasMoreElements()){
			String header = ""+headers.nextElement();
			out.println("*********"+StringEscapeUtils.escapeHtml(header)+"---->"+StringEscapeUtils.escapeHtml(request.getHeader(header))+"<br/>");
			Enumeration headerValues = request.getHeaders(header);
			while(headerValues.hasMoreElements()){
				String headerValue = ""+headerValues.nextElement();
				out.println("*********"+StringEscapeUtils.escapeHtml(header)+"---->"+StringEscapeUtils.escapeHtml(headerValue)+"<br/>");
			}
		}
}else{
	out.println("no right!");
}
%>
<br/>
-------------------------------------------------------------