local form = ... ?>
--[[ DEBUG INFORMATION
io.write("
DEBUGGING
DEBUG INFO: CFE
")
io.write(html.cfe_unpack(form))
io.write("")
--]]
?>
function informationform(myform,tags)
for k,v in pairs(tags) do
if (myform[v]) then
local val = myform[v]
io.write("\t 0) then io.write(" class='error'") end
io.write(">" .. val.label .. "\n")
io.write("\t\t" .. val.value .. "\n")
if (val.descr) and (#val.descr > 0) then io.write("\t\t" .. string.gsub(val.descr, "\n", "
") .. "
\n") end
if (#val.errtxt > 0) 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.status
local tags = { "status", "version", "autostart", }
informationform(myform,tags)
?>
PROGRAM SPECIFIC OPTIONS/INFORMATION
Phase1 and Phase2 information
local myform = form.status.show_isakmp.option
for k,v in pairs(myform) do
if (type(v) == "table") and (v.Destination) and (v.Destination.value) and (#v.Destination.value > 0) then
io.write("
".. v['Destination']['value'] .. " ")
io.write("\n")
io.write("
")
local tags = {"Created","Source", "St", "S", "E",}
for k1,v1 in pairs(tags) do
io.write("" ..
(v[v1]['label'] or "") .. " | "..(v[v1]['value'] or ""))
if (v[v1]['descr']) and (#v[v1]['descr'] > 0) then io.write(" (".. v[v1]['descr'] .. ")") end
io.write(" |
")
end
io.write("
")
for k1,v1 in pairs(v['Phase2']['option']) do
io.write("" .. (v1['value'] or "") .. " ")
io.write(" |
")
end
io.write("
")
end
end
?>
Policy information
local myform = form.status.ip_xfrm_policy
io.write("- "..myform.label .."
\n")
io.write(""..myform.value .."
\n")
?>
--[[ DEBUG INFORMATION
io.write("DEBUGGING
DEBUG INFO: CFE
")
io.write(html.cfe_unpack(form))
io.write("")
--]]
?>