local form = ...
local data = form.option
?>
function displayinfo(myform,tags,viewonly)
for k,v in pairs(tags) do
if (myform[v]) and (myform[v]["value"]) then
local val = myform[v]
io.write("\t
" .. val.label .. "\n")
if (viewonly) then
io.write("\t\t" .. val.value .. "\n")
else
io.write("\t\t" .. html.form[val.type](val) .. "\n")
end
if (val.descr) and (#val.descr > 0) then io.write("\t\t" .. string.gsub(val.descr, "\n", "
") .. "
\n") end
if (val.errtxt) then io.write("\t\t" .. string.gsub(val.errtxt, "\n", "
") .. "
\n") end
io.write("\t\t\n")
end
end
end
?>
SYSTEM INFO
local myform = form.info
local tags = { "status", "version", "autostart", }
displayinfo(myform,tags,"viewonly")
?>
Change/Generate settings
Global
- Edit global settings
- Global Config Pre/Post Code
Subnet declarations
- Edit subnet
- Add new subnet
Generate config
- Generate Configuration File
-
if form.genmsg ~= nil then io.write( "
" .. form.genmsg .. "
" ) end ?>
-- MANAGEMENT BUTTONS
local cmdform = form.management
local cmdresult = form.cmdmanagement
local tags = { "start", "stop", "restart" }
if (cmdform) and (cmdform[tags[1]]) then
io.write('')
end ?>