local form = ... ?>
---[[ DEBUG INFORMATION
io.write("
DEBUGGING
DEBUG INFO: CFE
")
io.write(html.cfe_unpack(form))
io.write("")
--]]
?>
function displayinfo(myform,tags,viewonly)
io.write("")
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
io.write("
")
end
?>
SYSTEM INFO
local myform = form.status
local tags = { "status", "version", }
displayinfo(myform,tags,"viewonly")
?>
PROGRAM SPECIFIC OPTIONS/INFORMATION
local myform = form.status.locations
--displayinfo(myform,tags)
io.write("")
--for k,v in pairs(tags) do
if (myform) and (myform.value) then
local val = myform
io.write("\t- 0) then
-- val.class = "error"
io.write(" class='error'")
end
io.write(">" .. val.label .. "
\n")
io.write("\t\t- \n")
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("\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
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 (type(v) == "string") then
io.write("
"..
tostring(v) .. "
")
else
io.write(" "..
tostring(k) .. "
")
recurseoutput(v,cnt)
end
end
end
?>
local myform = form.status.domains
if (myform) and (myform.value) then
io.write("\t" .. myform.label .. "\n")
io.write("\t\t\n")
for k,v in pairs(myform.value) do
recurseoutput(v)
end
--[[
local function recursedir(path, filearray)
local k,v
for k,v in pairs(posix.dir(path) or {}) do
-- Ignore files that begins with a '.'
if not string.match(v, "^%.") then
local f = path .. "/" .. v
-- If subfolder exists, list files in this subfolder
if (posix.stat(f).type == "directory") then
recursedir(f, filearray)
else
table.insert(filearray, f)
end
end
end
end
--]]
--[[
local output = k
io.write("".. k .. "
")
if (#v == 0) then
for k1,v1 in pairs(v) do
output = k1 .. "." .. output
io.write("".. output .. "
")
if (#v1 == 0) then
for k2,v2 in pairs(v1) do
output = k2 .. "." .. output
io.write("".. output .. "
")
if (#v2 == 0) then
for k3,v3 in pairs(v2) do
output = k3 .. "." .. output
io.write("".. output .. "
")
if (#v3 == 0) then
for k4,v4 in pairs(v3) do
output = k4 .. "." .. output
io.write("".. output .. "
")
if (#v4 == 0) then
for k5,v5 in pairs(v4) do
output = k5 .. "." .. output
io.write("".. output .. "
")
if (#v5 == 0) then
for k6,v6 in pairs(v5) do
output = k6 .. "." .. output
io.write("".. output .. "
")
end
else
computer(output,7)
end
end
else
computer(output,6)
end
end
else
computer(output,5)
end
end
else
computer(output,5)
end
end
else
computer(output,5)
end
end
else
computer(output,4)
end
end
--]]
end
io.write("")
--]==]
?>
--[[ DEBUG INFORMATION
io.write("DEBUGGING
DEBUG INFO: CFE
")
io.write(html.cfe_unpack(form))
io.write("")
--]]
?>