local form = ... ?>
--[[ DEBUG INFORMATION
io.write("
DEBUGGING
DEBUG INFO: CFE
")
io.write(html.cfe_unpack(form))
io.write("")
--]]
?>
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 0) then
val.class = "error"
io.write(" class='error'")
end
io.write(">" .. 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 > 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 = { "interfacesfile" }
displayinfo(myform,tags,"viewonly")
?>
Configured interfaces
local myform = form.iface
for k,v in pairs(myform) do
local myform=v
if (myform.name.value ~= "") then
io.write("- " .. (myform.name.value or '') .. "
- ")
io.write("
")
-- io.write(" " .. (myform.name.value or '') .. " |
")
local tags = {"method", "address", "netmask", "gateway", "provider", "hostname", "pre-up", "up", "down", "post-down", "comment", }
for k1,v1 in pairs(tags) do
if (myform[v1]['value'] ~= "") then
io.write("" .. myform[v1]['label'] .. " | ")
io.write("" .. string.gsub(myform[v1]['value'], "\n", " ") .. " |
")
end
end
io.write("
")
end
end
io.write(" ")
?>
--[[ DEBUG INFORMATION
io.write("DEBUGGING
DEBUG INFO: CFE
")
io.write(html.cfe_unpack(form))
io.write("")
--]]
?>