@Path("/admin/profiles.json")
	@Produces(MediaType.APPLICATION_JSON)
	@GET
	public String getProfiles(
			@Context HttpServletRequest request,
			@Context HttpServletResponse response,
			@QueryParam("json") String json ) {
		
		if( !checkHostInfo(request.getRemoteHost(),
				AdminProperties.getHttp_allowed()) ) {
			if(!checkHostInfo(request.getRemoteAddr(),
					AdminProperties.getHttp_allowed()) )
				return "Not authorized to use this Service[ "+
					request.getRemoteAddr() +"]";
		}
		 
		DBProc dbProc = new DBProc();
		String retval = new String();
		
		if( json == null || json.length() < 5) {
			retval = dbProc.getProfiles(null);
		}
		else {
			String key = new String();
			try {
				JSONObject jo  = new JSONObject(json);
				JSONArray keys = jo.getJSONArray("key");
				
				if( keys != null ) {
					StringBuffer sb = new StringBuffer();
					sb.append("'").append(keys.getString(0)).append("'");
					
					for(int i=1;i<keys.length();i++)
						sb.append(",'").append(keys.getString(1)).append("'");
					
					key = sb.toString();
				}
				retval = dbProc.getProfiles(key);
			}
			catch(Exception e) {
				e.printStackTrace();
				
				try {
					JSONObject jo     = new JSONObject();
					JSONArray  data   = new JSONArray();
					JSONObject status = new JSONObject();
					
					status.put("code"   , new Integer(404));
					status.put("success", false);
					status.put("message","JSON parse error");
					
					jo.put("data"  , data);
					jo.put("status", status);
					
					retval = jo.toString();
				}
				catch( Exception exception ) {;}
			}
		}		 
		return retval;
	}