summaryrefslogtreecommitdiffstats
path: root/tinydns-status-html.lsp
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-04-08 12:35:04 +0000
committerMika Havela <mika.havela@gmail.com>2008-04-08 12:35:04 +0000
commit63e8c6b82c980876ddc522174970e5b1b9014b06 (patch)
tree73b04306be53adcf115d4de3cec64fe69815ea3a /tinydns-status-html.lsp
parentea416afe39d2b4d796ccbfe0a7819968ef2d6f63 (diff)
downloadacf-tinydns-0.1.1.tar.bz2
acf-tinydns-0.1.1.tar.xz
Cleaning up the code.v0.1.1
git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@954 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'tinydns-status-html.lsp')
-rw-r--r--tinydns-status-html.lsp48
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>")
---]]
-?>
-