blob: faf6c6ad3aba7a0c41487c626f903c6c34a1f216 (
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
|
<?
local form = ...
local data = form.option
?>
<h1>Home</h1>
<h2>DHCPd - Status</h2>
<? io.write(form.info.version.value) ?> is: <b><? io.write( form.info.status.value ) ?></b><br><br>
<h2>DHCPd - Daemon Control</h2>
<table>
<form action="" method="POST">
<tr>
<td><input type=submit name="srvcmd" value="start" style="width:100px"></td>
<td><input type=submit name="srvcmd" value="stop" style="width:100px"></td>
<td><input type=submit name="srvcmd" value="restart" style="width:100px"></td>
</tr>
</form>
</table>
<pre style="color: #ff2020"><? io.write( form.info.srvctrl.value ) ?></pre><br>
<h2>DHCPd - Generate Configuration File</h2>
<table>
<form action="<? io.write(data.script .. data.prefix .. data.controller .. "/home") ?>" method="POST">
<tr><td><input type=submit name="cmd" value="generate" style="width:100px"></td></tr>
</form>
</table>
<? if form.genmsg ~= nil then io.write( "<pre style=\"color: #ff2020\">" .. form.genmsg .. "</pre>" ) end ?><br>
<h2>DHCPd - Global Settings</h2>
<table>
<form action="<? io.write(data.script .. data.prefix .. data.controller .. "/settings") ?>" method="POST">
<tr><td><input type=submit name="cmd" value="edit" style="width:100px"></td></tr>
</form>
</table><br>
<h2>DHCPd - Edit Subnet</h2>
<table>
<form action="<? io.write(data.script .. data.prefix .. data.controller .. "/editnet") ?>" method="POST">
<tr><td>Network to modify<td>
<td><select name="network" size="1">
<option value="choose">-- Choose Network --</option>
<?
for k,v in ipairs(form.info.subnets) do
io.write("<option>" .. v .. "</option>")
end
?>
</select></td>
<td><input type=submit name="cmd" value="edit" style="width:100px"></td>
</form>
</table><br>
<h2>DHCPd - Add New Subnet</h2>
<table>
<form action="<? io.write(data.script .. data.prefix .. data.controller .. "/createnet") ?>" method="POST">
<tr>
<td><input type=submit name="cmd" value="new" style="width:100px"></td>
</tr>
</form>
</table>
<br>
<h2>DHCPd - View Files</h2>
<table>
<form action="<? io.write(data.script .. data.prefix .. data.controller .. "/view") ?>" method="POST">
<tr><td><input type=submit name="conf" value="dhcpd.conf" style="width:200px"></td></tr>
<tr><td><input type=submit name="leases" value="dhcpd.leases" style="width:200px"></td></tr>
</form>
</table><br>
|