diff options
Diffstat (limited to 'tinydns-status-html.lsp')
-rw-r--r-- | tinydns-status-html.lsp | 48 |
1 files changed, 3 insertions, 45 deletions
diff --git a/tinydns-status-html.lsp b/tinydns-status-html.lsp index 06b5339..17a1b60 100644 --- a/tinydns-status-html.lsp +++ b/tinydns-status-html.lsp @@ -1,4 +1,6 @@ -<? local form = ... ?> +<? local form = ... +require("viewfunctions") +?> <? --[[ DEBUG INFORMATION io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") @@ -6,31 +8,6 @@ io.write(html.cfe_unpack(form)) io.write("</span>") --]] ?> -<? -function displayinfo(myform,tags,viewonly) - 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") - if (viewonly) then - io.write("\t\t<DD>" .. val.value .. "\n") - else - io.write("\t\t<DD>" .. html.form[val.type](val) .. "\n") - 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>") -end -?> <H1>SYSTEM INFO</H1> <? @@ -42,16 +19,8 @@ displayinfo(myform,tags,"viewonly") <H2>PROGRAM SPECIFIC OPTIONS/INFORMATION</H2> <H3>Locations</H3> <? --- DEBUGGING ---local myform = form.config ---local tags = { "debug", } ---displayinfo(myform,tags) - - local myform = form.config.locations ---displayinfo(myform,tags) io.write("<DL>") ---for k,v in pairs(tags) do if (myform) and (myform.value) then local val = myform io.write("\n\t<DT") @@ -60,7 +29,6 @@ if (myform) and (myform.value) then end io.write(">" .. val.label .. "</DT>") - io.write("\n\t\t<DD>") for k,v in pairs(myform.value) do io.write("<IMG SRC='/static/tango/16x16/places/start-here.png' width='16' height='16' alt> <B>" .. tostring(k) .. "</B>") @@ -77,7 +45,6 @@ end io.write("</DL>") ?> - <? local function recurseoutput(table,cnt) if not (cnt) then cnt=0 end @@ -127,12 +94,3 @@ for k,v in pairs(tags) do end io.write("</DL>") ?> - -<? ---[[ DEBUG INFORMATION -io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") -io.write(html.cfe_unpack(form)) -io.write("</span>") ---]] -?> - |