<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.goldhuman.auth.AuthFilter"%>
<%@ page import="com.goldhuman.service.interfaces.LogInfo"%>
<%@ page import="com.goldhuman.service.interfaces.SimpleRoleBean"%>
<%@ page import="com.goldhuman.service.interfaces.GMService"%>
<%@ page import="com.goldhuman.service.GMServiceImpl"%>
<%@page import="org.apache.commons.logging.LogFactory"%>
<%@page import="java.io.*"%>
<%@page import="java.util.*"%>
<%

request.setCharacterEncoding("UTF-8");

String userid = request.getParameter ("userid");
String roleid = request.getParameter("roleid");
if (roleid != null && roleid.trim().length() > 0) {
			try {
				int rid = Integer.parseInt(roleid);
				userid = (rid & 0xFFFFFFF0) + "";
			} catch (Exception e) { 
				out.println("Введите число!&nbsp;<span class='ver_10_red'>"+ e.getMessage() + "</span>");
			}
		}

		LogInfo info = null;
		int uid = -1;
		GMService gs = new GMServiceImpl();
		if (userid != null && userid.trim().length() > 0) {
			try {
				uid = Integer.parseInt(userid);
			} catch (Exception e) {
				out.println("<span class='ver_10_black'>Введите число!</span>&nbsp;<span class='ver_10_red'>"+ e.getMessage() + "</span>");
			}
			info = new LogInfo(uid, "", "Role List");
			Vector v = gs.getRolelist(uid, info);
			if (v != null) {
				for (int i = 0; i < v.size(); i++) {
					SimpleRoleBean bean = (SimpleRoleBean) v.get(i);    
%>
<%=bean.roleid%><><%=bean.rolename%><><%=bean.level%>
<%
}
} 
}%>     


