diff options
author | Mika Havela <mika.havela@gmail.com> | 2008-04-08 15:13:05 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2008-04-08 15:13:05 +0000 |
commit | dff2e5d4e7b7ef808d146ea64653701021a27ab2 (patch) | |
tree | 59cb11f9be55cef79359965ee3946433f48e6339 /openntpd-status-html.lsp | |
parent | efe2a271ebf5894f581ddb151fb446e830782870 (diff) | |
download | acf-openntpd-dff2e5d4e7b7ef808d146ea64653701021a27ab2.tar.bz2 acf-openntpd-dff2e5d4e7b7ef808d146ea64653701021a27ab2.tar.xz |
Cleaning up code.
git-svn-id: svn://svn.alpinelinux.org/acf/openntpd/trunk@959 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'openntpd-status-html.lsp')
-rw-r--r-- | openntpd-status-html.lsp | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/openntpd-status-html.lsp b/openntpd-status-html.lsp index 8ca80d8..7c10d67 100644 --- a/openntpd-status-html.lsp +++ b/openntpd-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>") @@ -7,38 +9,14 @@ 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> +<DL> <? local myform = form.status local tags = { "status", "version", "autostart", } displayinfo(myform,tags,"viewonly") ?> +</DL> <H2>PROGRAM SPECIFIC OPTIONS/INFORMATION</H2> <? |