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
?>
USER ACCOUNTS
Create new account
local myform = form.status
local tags = { "cmdnew", }
displayinfo(myform,tags)
?>
Existing account
--function displayinfo(myform,tags,viewonly)
local myform = form.status.users
io.write("")
if (type(myform) == "table") then
for k,v in pairs(myform) do
local myform = myform[k]
io.write("\t- 0) then
myform.class = "error"
io.write(" class='error'")
end
io.write(">
" .. myform.label .. " \n")
io.write("\t\t- \n\t\t
")
io.write("\n\t\t\t\n\t\t\t\tAccount name: | \n\t\t\t\t" .. myform.value .. " | \n\t\t\t
")
io.write("\n\t\t\t\n\t\t\t\tDescription: | \n\t\t\t\t" .. (myform.descr or "") .. " | \n\t\t\t
")
io.write("\n\t\t\t\n\t\t\t\tRoles: | \n\t\t\t\t")
io.write(tostring(myform.roles))
io.write(" | \n\t\t\t
")
io.write("\n\t\t\t\n\t\t\t\tOptions: | \n\t\t\t\t[Edit this account] | \n\t\t\t
")
io.write("\n\t\t
\n")
if (#myform.errtxt > 0) then io.write("\t\t" .. string.gsub(myform.errtxt, "\n", "
") .. "
\n") end
io.write("\t\t \n")
end
end
io.write("
")
?>
--[[ DEBUG INFORMATION
io.write("DEBUGGING
DEBUG INFO: CFE
")
io.write(html.cfe_unpack(form))
io.write("")
--]]
?>