diff options
Diffstat (limited to 'tinydns-config-html.lsp')
-rwxr-xr-x | tinydns-config-html.lsp | 51 |
1 files changed, 3 insertions, 48 deletions
diff --git a/tinydns-config-html.lsp b/tinydns-config-html.lsp index b708d93..839570e 100755 --- a/tinydns-config-html.lsp +++ b/tinydns-config-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> <? @@ -111,25 +88,3 @@ displayinfo(myform,tags) ?> </form> - -<? --[[ ?> -<H1>DEGUGGING</H1> -<? -local myform = form.debug -local tags = {} -for k,v in pairs(myform) do - table.insert(tags,k) -end -displayinfo(myform,tags) -?> -<? --]] ?> - - -<? ---[[ 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>") ---]] -?> - |