ap.rputs [[
认证服务器管理页面/title>
]]
local globle = require "cgilua.globle"
local msg = ""
if(cgi.action=="创建") then
cgi.action = nil
local auths = globle.get("AUTHSERVICE") or {}
auths[cgi.authname]=cgi.authname;
globle.set("AUTHSERVICE",auths);
msg = "本地认证服务"..cgi.authname.."添加成功"
elseif (cgi.action=="删除") then
local auths = globle.get("AUTHSERVICE") or {}
auths[cgi.authname]=nil
globle.set("AUTHSERVICE",auths)
msg = "本地认证服务"..cgi.authname.."删除成功"
end
ap.rputs [[
]]
ap.rputs( ""..msg.."
")
ap.rputs [[
选择要添加的认证服务器器
- 本地认证服务器
- AD/LDAP认证服务器
- NTLM认证服务器
- Radius认证服务器
已经存在的服务器包括:
]]
local auths = globle.get("AUTHSERVICE") or {}
for k,v in pairs(auths) do
ap.print (string.format ("
%s=%s:%s", k, tostring(v.authname), tostring(v.type) ) )
ap.print ( " 删除" )
ap.print ( " 用户管理" )
end
ap.rputs [[
本地认证服务器
]]