From 132a51a124fb1fa5e48f3b0982b9742572bc922c Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Tue, 8 Apr 2008 15:13:54 +0000 Subject: Cleaning up code. git-svn-id: svn://svn.alpinelinux.org/acf/snort/trunk@962 ab2d0c66-481e-0410-8bed-d214d4d58bed --- snort-expert-html.lsp | 79 +++++++++++---------------------------------------- 1 file changed, 17 insertions(+), 62 deletions(-) (limited to 'snort-expert-html.lsp') diff --git a/snort-expert-html.lsp b/snort-expert-html.lsp index 2217089..2e4dc31 100644 --- a/snort-expert-html.lsp +++ b/snort-expert-html.lsp @@ -1,40 +1,19 @@ - + DEBUGGING

DEBUG INFO: CFE

") -io.write(html.cfe_unpack(view)) +io.write(html.cfe_unpack(form)) io.write("
") --]] ?> - 0) then - val.class = "error" - io.write(" class='error'") - end - io.write(">" .. val.label .. "\n") - if (viewonly) then - io.write("\t\t
" .. val.value .. "\n") - else - io.write("\t\t
" .. html.form[val.type](val) .. "\n") - end - if (val.descr) and (#val.descr > 0) then io.write("\t\t

" .. string.gsub(val.descr, "\n", "
") .. "

\n") end - if (#val.errtxt > 0) then io.write("\t\t

" .. string.gsub(val.errtxt, "\n", "
") .. "

\n") end - io.write("\t\t
\n") - end - end -end -?>

SYSTEM INFO

@@ -45,7 +24,7 @@ displayinfo(myform,tags,"viewonly")

File details

@@ -53,7 +32,7 @@ displayinfo(myform,tags,"viewonly")

FILE CONTENT

@@ -65,38 +44,14 @@ displayinfo(myform,tags) ?>
- - -') - io.write('

MANAGEMENT

') - io.write('
') - io.write('
' .. cmdform[tags[1]]["label"] .. '
') - io.write('
') - for k,v in pairs(tags) do - if (cmdform[v]) then - io.write(html.form[cmdform[v].type](cmdform[v])) - end - end - io.write('
') - - if (cmdresult) and (cmdresult.action) and (#cmdresult.action.descr > 0) then - io.write('
' .. cmdresult.label .. '
') - io.write('
' .. cmdresult.action.descr .. '
') - end - io.write('
') -end ?> - DEBUGGING

DEBUG INFO: CFE

") -io.write(html.cfe_unpack(form)) -io.write("
") ---]] +-- Management buttons +local myform = form.management +local tags = { "start", "stop", "restart" } +if (myform) then + io.write("

MANAGEMENT

\n
") + displaymanagement(myform,tags) + io.write("
") +end ?> - + -- cgit v1.2.3