diff options
author | Mika Havela <mika.havela@gmail.com> | 2008-02-16 11:13:56 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2008-02-16 11:13:56 +0000 |
commit | 335d503c6f8c54ab66a02fc8454525b628bb9255 (patch) | |
tree | 5b61fd65e6103065849e8b65f7a2d5df23604981 /tinydns-status-html.lsp | |
parent | 9be3927959b864d02284faea9dc383c2a6279eb3 (diff) | |
download | acf-tinydns-335d503c6f8c54ab66a02fc8454525b628bb9255.tar.bz2 acf-tinydns-335d503c6f8c54ab66a02fc8454525b628bb9255.tar.xz |
Added a sampleconfig that shows some output. Still a long way to go
git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@728 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'tinydns-status-html.lsp')
-rw-r--r-- | tinydns-status-html.lsp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/tinydns-status-html.lsp b/tinydns-status-html.lsp index b8ac060..27fe91a 100644 --- a/tinydns-status-html.lsp +++ b/tinydns-status-html.lsp @@ -39,6 +39,70 @@ local tags = { "status", "version", } displayinfo(myform,tags,"viewonly") ?> +<H2>PROGRAM SPECIFIC OPTIONS/INFORMATION</H2> +<? +local v = "locations" +--displayinfo(myform,tags) +io.write("<DL>") +--for k,v in pairs(tags) do +if (myform[v]) and (myform[v]["value"]) then + local val = myform[v] + io.write("\t<DT") + if (#val.errtxt > 0) then + val.class = "error" + io.write(" class='error'") + end + io.write(">" .. val.label .. "</DT>\n") + + + io.write("\t\t<DD>\n") + for k,v in pairs(myform[v]["value"]) do + io.write("<IMG SRC='/static/tango/16x16/places/start-here.png' width='16' height='16' alt> <B>" .. tostring(k) .. "</B>") + for kk,vv in pairs(v) do + io.write(tostring("<BR>" ..vv.option[3]).. "\n") + end + io.write("<BR>") + end + + if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end + if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end + io.write("\t\t</DD>\n") +end +--end +io.write("</DL>") +?> + +<? +local v = "types" +--displayinfo(myform,tags) +io.write("<DL>") +--for k,v in pairs(tags) do +if (myform[v]) and (myform[v]["value"]) then + local val = myform[v] + io.write("\t<DT") + if (#val.errtxt > 0) then + val.class = "error" + io.write(" class='error'") + end + io.write(">" .. val.label .. "</DT>\n") + + + io.write("\t\t<DD>\n") + for k,v in pairs(myform[v]["value"]) do + io.write("<IMG SRC='/static/tango/16x16/places/start-here.png' width='16' height='16' alt> <B>" .. tostring(k) .. "</B>") + for kk,vv in pairs(v) do + io.write(tostring("<BR>" ..vv.option[3]).. "\n") + end + io.write("<BR>") + end + + if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end + if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end + io.write("\t\t</DD>\n") +end +--end +io.write("</DL>") +?> <? --[[ DEBUG INFORMATION io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") |