local form = ...
require("viewfunctions")
?>
--[[ DEBUG INFORMATION
io.write("
DEBUGGING
DEBUG INFO: CFE
")
io.write(html.cfe_unpack(form))
io.write("")
--]]
?>
SYSTEM INFO
local myform = form.status
local tags = { "status", "version", "autostart", }
displayinfo(myform,tags,"viewonly")
?>
PROGRAM SPECIFIC OPTIONS/INFORMATION
Locations
local myform = form.config.locations
io.write("")
if (myform) and (myform.value) then
local val = myform
io.write("\n\t- 0) then
io.write(" class='error'")
end
io.write(">" .. val.label .. "
")
io.write("\n\t\t- ")
for k,v in pairs(myform.value) do
io.write(" " .. tostring(k) .. "")
for kk,vv in pairs(v) do
io.write(tostring("
" .. vv .. "\n"))
end
io.write("
")
end
if (val.descr) and (#val.descr > 0) then io.write("\n\t\t" .. string.gsub(val.descr, "\n", "
") .. "
") end
if (#val.errtxt > 0) then io.write("\n\t\t" .. string.gsub(val.errtxt, "\n", "
") .. "
") end
io.write("\n\t\t ")
end
io.write("
")
?>
local function recurseoutput(table,cnt)
if not (cnt) then cnt=0 end
cnt = cnt + 1
for k,v in pairs(table or {}) do
if (table[k].label) then
if not (tonumber(k)) or (v.value) then
-- if v.label then
io.write("\n\t\t\t " .. tostring(v.label) .. "
")
io.write("\n\t\t\t")
for k1,v1 in pairs(v.option) do
if (v1.label) then
io.write("\n\t\t\t\t\n\t\t\t\t\t".. tostring(v1.label) ..
": | \n\t\t\t\t\t".. tostring(v1.value) .." | \n\t\t\t\t
")
end
end
io.write("\n\t\t\t
")
-- end
else
io.write("\n\t\t\t "..
tostring(table[k].label) .. "
")
recurseoutput(v,cnt)
end
end
end
end
?>
Records
local tags = {"nsourdomain", "nsdomain", "host", "alias", "mx", "ptr", "cname", "soa", "generic", "all" }
local myform = form.config.settings
io.write("")
for k,v in pairs(tags) do
local myform = myform[v]
if (myform) and (myform.value) then
io.write("\n\t- " .. myform.label .. "
")
io.write("\n\t\t- ")
for k,v in pairs(myform.value) do
recurseoutput(v)
end
io.write("\n\t\t
")
end
end
io.write("
")
?>