summaryrefslogtreecommitdiffstats
path: root/dnscache-expert-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-06-26 19:16:25 +0000
committerTed Trask <ttrask01@yahoo.com>2008-06-26 19:16:25 +0000
commit337584d2a16c3a22551ab31c6eff7beb1c942815 (patch)
treeaf0e254f7f4ba070f087fa722b9c513152f9e55c /dnscache-expert-html.lsp
parent30aaf3f8be724ddbf38dfe5c67b0123cd07d7e1d (diff)
downloadacf-dnscache-337584d2a16c3a22551ab31c6eff7beb1c942815.tar.bz2
acf-dnscache-337584d2a16c3a22551ab31c6eff7beb1c942815.tar.xz
Rewrite of DNScache.
git-svn-id: svn://svn.alpinelinux.org/acf/dnscache/trunk@1262 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'dnscache-expert-html.lsp')
-rw-r--r--dnscache-expert-html.lsp72
1 files changed, 32 insertions, 40 deletions
diff --git a/dnscache-expert-html.lsp b/dnscache-expert-html.lsp
index 4f77e5e..c4ad955 100644
--- a/dnscache-expert-html.lsp
+++ b/dnscache-expert-html.lsp
@@ -1,6 +1,5 @@
-<? local form = ...
-require("viewfunctions")
-?>
+<? local form, viewlibrary = ... ?>
+<? require("viewfunctions") ?>
<?
--[[ DEBUG INFORMATION
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
@@ -9,50 +8,43 @@ io.write("</span>")
--]]
?>
-<H1>SYSTEM INFO</H1>
-<DL>
-<?
-local myform = form.status
-local tags = { "status", "version", "autostart", }
-displayinfo(myform,tags,"viewonly")
-?>
-</DL>
+<? ---[[ ?>
+<? if viewlibrary and viewlibrary.dispatch_component then
+ viewlibrary.dispatch_component("status")
+end ?>
+<? --]] ?>
-<form name="myform" action="" method="POST">
-<h1>CONFIGURATION</h1>
-<H2>Expert config</H2>
-<h3>File details</h3>
+<H1>Configuration</H1>
+<H2>Expert Configuration</H2>
+<H3>File Details</H3>
<DL>
<?
-local myform = form.file
-local tags = { "filename", "filesize", "mtime", "sumerrors", }
-displayinfo(myform,tags,"viewonly")
+displayitem(form.value.filename)
+displayitem(form.value.filesize)
+displayitem(form.value.mtime)
?>
</DL>
-<H3>FILE CONTENT</H3>
-<?
-local myform = form.file
-io.write(html.form[myform.filecontent.type](myform.filecontent))
-?>
+<H3>File Content</H3>
+<? if form.descr then ?><P CLASS='descr'><?= string.gsub(form.descr, "\n", "<BR>") ?></P><? end ?>
+<? if form.errtxt then ?><P CLASS='error'><?= string.gsub(form.errtxt, "\n", "<BR>") ?></P><? end ?>
+<form action="" method="POST">
+<textarea name="filecontent">
+<?= form.value.filecontent.value ?>
+</textarea>
+<? if form.value.filecontent.errtxt then ?><P CLASS='error'><?= string.gsub(form.value.filecontent.errtxt, "\n", "<BR>") ?></P><? end ?>
-<H2>SAVE AND APPLY ABOVE SETTINGS</H2>
-<DL>
-<?
-local tags = { "cmdsave", }
-displayinfo(myform,tags)
-?>
-</DL>
+<DL><DT></DT><DD><input class="submit" type="submit" name="<?= form.option ?>" value="Save"></DD></DL>
+</form>
+
+<? if viewlibrary and viewlibrary.dispatch_component then
+ viewlibrary.dispatch_component("startstop")
+end ?>
<?
--- Management buttons
-local myform = form.management
-local tags = { "start", "stop", "restart" }
-if (myform) then
- io.write("<H1>MANAGEMENT</H1>\n<DL>")
- displaymanagement(myform,tags)
- io.write("</DL>")
-end
+--[[ 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>")
+--]]
?>
-</form>
-