diff options
Diffstat (limited to 'shorewall-config-html.lsp')
-rw-r--r-- | shorewall-config-html.lsp | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/shorewall-config-html.lsp b/shorewall-config-html.lsp index ab830f0..5704df8 100644 --- a/shorewall-config-html.lsp +++ b/shorewall-config-html.lsp @@ -1,4 +1,4 @@ -<? local form,viewlibrary = ... +<% local form,viewlibrary = ... require("viewfunctions") --[[ DEBUG INFORMATION io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") @@ -28,162 +28,162 @@ local descr = { ['width'] = { "100", "70", "70", "70", "100", } }, } -?> +%> -<? if viewlibrary and viewlibrary.dispatch_component then +<% if viewlibrary and viewlibrary.dispatch_component then viewlibrary.dispatch_component("statusbasic") -end ?> +end %> -<? local myform = form.config ?> +<% local myform = form.config %> <h1>GUIDED CONFIGURATION</h1> <H3>Defince zones</H3> -<? local myform = "zones" ?> +<% local myform = "zones" %> <TABLE> <TR> -<? for i=1,#descr[myform]['labels'] do ?> - <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<? io.write(descr[myform]['width'][i] or "*") ?>"><? io.write(descr[myform]['labels'][i] or "") ?></TD> -<? end ?> +<% for i=1,#descr[myform]['labels'] do %> + <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<% io.write(descr[myform]['width'][i] or "*") %>"><% io.write(descr[myform]['labels'][i] or "") %></TD> +<% end %> <TD class="header" WIDTH="60"><IMG SRC='/skins/static/tango/16x16/actions/list-add.png' width='16' height='16' title="Add item below this record"></TD> </TR> -<? +<% for i=1, #form.config[myform]['option'] do -?> +%> <TR> - <? for ii=1,#descr[myform]['labels'] do ?> - <TD style="padding-right:10px"><? io.write(form.config[myform]['option'][i][ii] or "") ?></TD> - <? end ?> + <% for ii=1,#descr[myform]['labels'] do %> + <TD style="padding-right:10px"><% io.write(form.config[myform]['option'][i][ii] or "") %></TD> + <% end %> <TD style="padding-right:0px;text-align:left;"> <IMG SRC='/skins/static/tango/16x16/actions/list-add.png' width='16' height='16' title="Add item below this record"> <IMG SRC='/skins/static/tango/16x16/actions/list-remove.png' width='16' height='16' title="Remove this record"> <IMG SRC='/skins/static/tango/16x16/actions/document-properties.png' width='16' height='16' title="Edit this record"> </TD> </TR> -<? +<% end -?> +%> </TABLE> <H3>Interfaces</H3> -<? local myform = "interfaces" ?> +<% local myform = "interfaces" %> <TABLE> <TR> -<? for i=1,#descr[myform]['labels'] do ?> - <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<? io.write(descr[myform]['width'][i] or "*") ?>"><? io.write(descr[myform]['labels'][i] or "") ?></TD> -<? end ?> +<% for i=1,#descr[myform]['labels'] do %> + <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<% io.write(descr[myform]['width'][i] or "*") %>"><% io.write(descr[myform]['labels'][i] or "") %></TD> +<% end %> <TD class="header" WIDTH="60"><IMG SRC='/skins/static/tango/16x16/actions/list-add.png' width='16' height='16' title="Add item below this record"></TD> </TR> -<? +<% for i=1, #form.config[myform]['option'] do -?> +%> <TR> - <? for ii=1,#descr[myform]['labels'] do ?> - <TD style="padding-right:10px;"><? io.write(form.config[myform]['option'][i][ii] or "") ?></TD> - <? end ?> + <% for ii=1,#descr[myform]['labels'] do %> + <TD style="padding-right:10px;"><% io.write(form.config[myform]['option'][i][ii] or "") %></TD> + <% end %> <TD style="padding-right:0px;"> <IMG SRC='/skins/static/tango/16x16/actions/list-add.png' width='16' height='16' title="Add item below this record"> <IMG SRC='/skins/static/tango/16x16/actions/list-remove.png' width='16' height='16' title="Remove this record"> <IMG SRC='/skins/static/tango/16x16/actions/document-properties.png' width='16' height='16' title="Edit this record"> </TD> </TR> -<? +<% end -?> +%> </TABLE> <h3>Default policy</h3> -<? local myform = "policy" ?> +<% local myform = "policy" %> <TABLE> <TR> -<? for i=1,#descr[myform]['labels'] do ?> - <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<? io.write(descr[myform]['width'][i] or "*") ?>"><? io.write(descr[myform]['labels'][i] or "") ?></TD> -<? end ?> +<% for i=1,#descr[myform]['labels'] do %> + <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<% io.write(descr[myform]['width'][i] or "*") %>"><% io.write(descr[myform]['labels'][i] or "") %></TD> +<% end %> <TD class="header" WIDTH="60"><IMG SRC='/skins/static/tango/16x16/actions/list-add.png' width='16' height='16' title="Add item below this record"></TD> </TR> -<? +<% for i=1, #form.config[myform]['option'] do -?> +%> <TR> - <? for ii=1,#descr[myform]['labels'] do ?> - <TD style="padding-right:10px;"><? io.write(form.config[myform]['option'][i][ii] or "") ?></TD> - <? end ?> + <% for ii=1,#descr[myform]['labels'] do %> + <TD style="padding-right:10px;"><% io.write(form.config[myform]['option'][i][ii] or "") %></TD> + <% end %> <TD style="padding-right:0px;text-align:left;"> <IMG SRC='/skins/static/tango/16x16/actions/list-add.png' width='16' height='16' title="Add item below this record"> <IMG SRC='/skins/static/tango/16x16/actions/list-remove.png' width='16' height='16' title="Remove this record"> <IMG SRC='/skins/static/tango/16x16/actions/document-properties.png' width='16' height='16' title="Edit this record"> </TD> </TR> -<? +<% end -?> +%> </TABLE> <h3>Rules</h3> -<? local myform = "rules" +<% local myform = "rules" local val = {1,2,3,4,5,6,7,8,10,} -?> +%> <TABLE> <TR> -<? for k,i in pairs(val) do ?> - <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<? io.write(descr[myform]['width'][i] or "*") ?>"><? io.write(descr[myform]['labels'][i] or "") ?></TD> -<? end ?> +<% for k,i in pairs(val) do %> + <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<% io.write(descr[myform]['width'][i] or "*") %>"><% io.write(descr[myform]['labels'][i] or "") %></TD> +<% end %> <TD class="header" WIDTH="60"><IMG SRC='/skins/static/tango/16x16/actions/list-add.png' width='16' height='16' title="Add item below this record"></TD> </TR> -<? +<% for i=1, #form.config[myform]['option'] do -?> +%> <TR> - <? for ii,vv in pairs(val) do ?> - <TD style="padding-right:10px;"><? io.write(form.config[myform]['option'][i][ii] or "") ?></TD> - <? end ?> + <% for ii,vv in pairs(val) do %> + <TD style="padding-right:10px;"><% io.write(form.config[myform]['option'][i][ii] or "") %></TD> + <% end %> <TD style="padding-right:0px;text-align:left;"> <IMG SRC='/skins/static/tango/16x16/actions/list-add.png' width='16' height='16' title="Add item below this record"> <IMG SRC='/skins/static/tango/16x16/actions/list-remove.png' width='16' height='16' title="Remove this record"> <IMG SRC='/skins/static/tango/16x16/actions/document-properties.png' width='16' height='16' title="Edit this record"> </TD> </TR> -<? +<% end -?> +%> </TABLE> <H3>Masq</H3> -<? local myform = "masq" ?> +<% local myform = "masq" %> <TABLE> <TR> -<? for i=1,#descr[myform]['labels'] do ?> - <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<? io.write(descr[myform]['width'][i] or "*") ?>"><? io.write(descr[myform]['labels'][i] or "") ?></TD> -<? end ?> +<% for i=1,#descr[myform]['labels'] do %> + <TD style="padding-right:10px;text-align:left;" class="header" WIDTH="<% io.write(descr[myform]['width'][i] or "*") %>"><% io.write(descr[myform]['labels'][i] or "") %></TD> +<% end %> <TD class="header" WIDTH="60"><IMG SRC='/skins/static/tango/16x16/actions/list-add.png' width='16' height='16' title="Add item below this record"></TD> </TR> -<? +<% for i=1, #form.config[myform]['option'] do -?> +%> <TR> - <? for ii=1,#descr[myform]['labels'] do ?> - <TD style="padding-right:10px;"><? io.write(form.config[myform]['option'][i][ii] or "") ?></TD> - <? end ?> + <% for ii=1,#descr[myform]['labels'] do %> + <TD style="padding-right:10px;"><% io.write(form.config[myform]['option'][i][ii] or "") %></TD> + <% end %> <TD style="padding-right:0px;text-align:left;"> <IMG SRC='/skins/static/tango/16x16/actions/list-add.png' width='16' height='16' title="Add item below this record"> <IMG SRC='/skins/static/tango/16x16/actions/list-remove.png' width='16' height='16' title="Remove this record"> <IMG SRC='/skins/static/tango/16x16/actions/document-properties.png' width='16' height='16' title="Edit this record"> </TD> </TR> -<? +<% end -?> +%> </TABLE> |