summaryrefslogtreecommitdiffstats
path: root/dansguardian-editcategories-html.lsp
blob: ab814faaf725e9d6dcfd8d030d7d48ea240d4582 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<? local form = ...
require("viewfunctions")
?>
<?
--[[ 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>")
--]]
?>

<H1>INFO</H1>
<DL>
<? 
local myform = form.info 
local tags = { "configfile","mtime","category", "name", "activestatus",  }
displayinfo(myform,tags,"viewonly")
?>
</DL>

<H1>CONFIGURE</H1>
<H2>General</H2>
<DL>
<? 
local myform = form.info 
local tags = { "activate" }
displayinfo(myform,tags)
?>
</DL>

<H2>Details</H2>
<? 
local myform = form.info
io.write('<input type="hidden" value="' .. myform.filename.value .. '" name="name">')
io.write(html.form[myform.filecontent.type](myform.filecontent))
?>

<H2>Save</H2>
<DL>
<? 
local myform = form.info 
local tags = { "cmdsave" }
displayinfo(myform,tags)
?>
</DL>

<H1>Delete</H1>
<p>You can delete this object. This will result in erazing instead of deactivating it.</p>
<p>When deleting a object, you will not be able to get it back! If you are unsure, it's better to only deactivate this object instead of deleting it.</p>
<DL>
<? 
local myform = form.info 
local tags = { "cmddelete" }
displayinfo(myform,tags)
?>
</DL>

<? --[[ ?>
<form name="myform" action="" method="POST">
<h1>CONFIGURATION</h1>
<H2>Expert config</H2>
<h3>File details</h3>
<DL>
<? 
local myform = form.file 
local tags = { "filename", "filesize", "mtime", "sumerrors", }
displayinfo(myform,tags,"viewonly")
?>
</DL>

<H3>FILE CONTENT</H3>
<? 
local myform = form.file
io.write('<input type="hidden" value="' .. myform.filename.value .. '" name="name">')
io.write(html.form[myform.filecontent.type](myform.filecontent))
?>

<H2>SAVE AND APPLY ABOVE SETTINGS</H2>
<DL>
<? 
local tags = { "cmddelete", "cmdsave", }
displayinfo(myform,tags)
?>
</DL>

<?
-- 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
?>
</form>
<? --]] ?>