<% local msg = {} if _SESSION["logined"] ~= nil then local domain = _POST["domain"] local page = _POST["page"] local groupname = _POST["group"] local username = _POST["username"] or "" local column = _POST["column"] or 0 local sortflag = _POST["sortflag"] or 0 local liststr = "" if groupname ~= nil then local group = c_GetGroup(domain, groupname) if group ~= nil then local userlist = group.userlist if userlist ~= nil then local accessway = c_AccessDataWay(domain) if accessway == 2 or accessway == 3 then local names = "" for _,temp in pairs(userlist) do if names == "" then names = "'"..temp["username"].."'" else names = names..",'"..temp["username"].."'" end end liststr = "1\n"..c_GetUserListByNames(domain, names) else for _,temp in pairs(userlist) do liststr = liststr..temp["username"].."\n" end end end end elseif page ~= nil then local totalrecords,totalpages = c_GetUserPageCount(domain) liststr = totalpages.."\n"..GetUserListPage(domain, page, column, sortflag, username) else liststr = GetUserList(domain) end rawset(msg, "code", 0) rawset(msg, "data", liststr) print(json.encode(msg)) else rawset(msg, "code", -1) rawset(msg, "error", "not logged in") print(json.encode(msg)) end %>