summaryrefslogtreecommitdiffstats
path: root/tinydns-startstop-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-06-18 20:07:55 +0000
committerTed Trask <ttrask01@yahoo.com>2008-06-18 20:07:55 +0000
commit151f597ce365349add8c21fff63902be0084645f (patch)
treefdfa505adeaea2d4bb0e8c604a0439b211016111 /tinydns-startstop-html.lsp
parentf0dcd211ed5fca855655d8b60b588b1d193e92fd (diff)
downloadacf-tinydns-151f597ce365349add8c21fff63902be0084645f.tar.bz2
acf-tinydns-151f597ce365349add8c21fff63902be0084645f.tar.xz
Rewrite of tinydns to simplify code and use new cfe model.
Added js to filter records. git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@1219 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'tinydns-startstop-html.lsp')
-rw-r--r--tinydns-startstop-html.lsp26
1 files changed, 26 insertions, 0 deletions
diff --git a/tinydns-startstop-html.lsp b/tinydns-startstop-html.lsp
new file mode 100644
index 0000000..f3f7013
--- /dev/null
+++ b/tinydns-startstop-html.lsp
@@ -0,0 +1,26 @@
+<? local data = ... ?>
+<? --[[
+io.write(html.cfe_unpack(data))
+--]] ?>
+
+<H1>MANAGEMENT</H1>
+<DL>
+<form action="startstop" method="POST">
+<DT>Program control-panel</DT>
+<DD>
+<input class="submit" type="submit" name="action" value="Start" <? if data.value.status.value== "Enabled" then io.write("disabled") end ?>>
+<input class="submit" type="submit" name="action" value="Stop" <? if data.value.status.value== "Disabled" then io.write("disabled") end ?>>
+<input class="submit" type="submit" name="action" value="Restart" <? if data.value.status.value== "Disabled" then io.write("disabled") end ?>>
+</DD>
+</form>
+
+<? if data.value.result then ?>
+<DT>Previous action result</DT>
+<DD>
+<? if data.value.result.descr then ?>
+<P CLASS='descr'><?= string.gsub(data.value.result.descr, "\n", "<BR>") ?></P>
+<? end if data.value.result.errtxt then ?>
+<P CLASS='error'><?= string.gsub(data.value.result.errtxt, "\n", "<BR>") ?></P>
+<? end end ?>
+</DD>
+</DL>