diff options
Diffstat (limited to 'weblog-viewweblog-html.lsp')
-rw-r--r-- | weblog-viewweblog-html.lsp | 86 |
1 files changed, 41 insertions, 45 deletions
diff --git a/weblog-viewweblog-html.lsp b/weblog-viewweblog-html.lsp index c3b64f8..8841bde 100644 --- a/weblog-viewweblog-html.lsp +++ b/weblog-viewweblog-html.lsp @@ -117,8 +117,7 @@ end } </style> -<H1>Search Parameters</H1> -<DL> +<h1>Search Parameters</h1> <% -- Display the form, but skip log, window, and focus fields local log = data.value.log data.value.log = nil @@ -131,7 +130,6 @@ data.value.log = log data.value.window = window data.value.focus = focus %> -</DL> <% local clientinfo = "submit=true&badyesno=false&deniedyesno=false&bypassyesno=false&selected=false&" @@ -144,11 +142,10 @@ end %> <% htmlviewfunctions.displaypagination(pagedata, page_info) %> -<H1><%= html.html_escape(data.label) %></H1> -<DL> -<TABLE id="loglist" class="tablesorter"> -<THEAD> -<TR> +<h1><%= html.html_escape(data.label) %></h1> +<table id="loglist" class="tablesorter"> +<thead> +<tr> <% local checkhead = true for i,watch in ipairs(subdata) do if watch.selected ~= "t" then @@ -156,22 +153,22 @@ for i,watch in ipairs(subdata) do break end end %> - <TH><input type="checkbox" id="chkHead"<% if checkhead then %> checked<% end %>></TH> - <TH>Timestamp</TH> - <TH>Source</TH> - <TH>Client IP</TH> - <TH>User ID</TH> - <TH>Size</TH> - <TH>Sus</TH> - <TH>Den</TH> - <TH>Byp</TH> - <TH>Score</TH> - <TH>Reason</TH> - <TH>URL</TH> - <TH>Bad Words</TH> - </TR> -</THEAD> -<TBODY> + <th><input type="checkbox" id="chkHead"<% if checkhead then %> checked<% end %>></th> + <th>Timestamp</th> + <th>Source</th> + <th>Client IP</th> + <th>User ID</th> + <th>Size</th> + <th>Sus</th> + <th>Den</th> + <th>Byp</th> + <th>Score</th> + <th>Reason</th> + <th>URL</th> + <th>Bad Words</th> + </tr> +</thead> +<tbody> <% for i,watch in ipairs(subdata) do local a,b = math.modf((i/2)) local mark = '' @@ -180,29 +177,29 @@ end %> time.year, time.month, time.day, time.hour, time.min, time.sec = string.match(watch.logdatetime, "(%d+)%-(%d+)-(%d+)%s+(%d+):(%d+):(%d+)") time = os.time(time) %> -<TR<%= mark %>> - <TD><input class="chktbl" type="checkbox" id="<%= html.html_escape(watch.id) %>"<% if watch.selected == "t" then %> checked <% end %>></TD> - <TD <% if data.value.focus.value == watch.logdatetime then %> style="font-weight:bold;" id="focus" <% end %> ><%= html.link{value = "viewweblog?"..clientinfo.. +<tr<%= mark %>> + <td><input class="chktbl" type="checkbox" id="<%= html.html_escape(watch.id) %>"<% if watch.selected == "t" then %> checked <% end %>></td> + <td <% if data.value.focus.value == watch.logdatetime then %> style="font-weight:bold;" id="focus" <% end %> ><%= html.link{value = "viewweblog?"..clientinfo.. "starttime="..os.date("%Y-%m-%d %H:%M:%S", time - 60*(tonumber(data.value.window.value))).. "&endtime="..os.date("%Y-%m-%d %H:%M:%S", time + 60*(tonumber(data.value.window.value))).. "&focus="..watch.logdatetime, - label=watch.logdatetime} %></TD> - <TD> <%= html.html_escape(watch.sourcename) %></TD> - <TD <% if data.value.clientip.value == watch.clientip then %> style="font-weight:bold;" <% end %> ><%= html.html_escape(watch.clientip) %></TD> - <TD <% if data.value.clientuserid.value == watch.clientuserid then %> style="font-weight:bold;" <% end %> ><%= html.html_escape(watch.clientuserid) %></TD> - <TD><%= html.html_escape(watch.bytes) %></TD> - <TD><% if watch.badyesno ~= "0" then %><IMG SRC='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/dodgy.png' width='13' height='13'><% end %></TD> - <TD><% if watch.deniedyesno ~= "0" then %> <IMG SRC='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/denied.png' width='13' height='13'><% end %></TD> - <TD><% if watch.bypassyesno ~= "0" then %> <IMG SRC='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/bypass.png' width='13' height='13'><% end %></TD> - <TD><%= html.html_escape(watch.score) %></TD> - <TD<% if (watch.shortreason and watch.shortreason ~= "" and watch.reason and watch.reason ~= "") then %> title="<%= html.html_escape(watch.reason) %>"<% end %>> + label=watch.logdatetime} %></td> + <td> <%= html.html_escape(watch.sourcename) %></td> + <td <% if data.value.clientip.value == watch.clientip then %> style="font-weight:bold;" <% end %> ><%= html.html_escape(watch.clientip) %></td> + <td <% if data.value.clientuserid.value == watch.clientuserid then %> style="font-weight:bold;" <% end %> ><%= html.html_escape(watch.clientuserid) %></td> + <td><%= html.html_escape(watch.bytes) %></td> + <td><% if watch.badyesno ~= "0" then %><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/dodgy.png' width='13' height='13'><% end %></td> + <td><% if watch.deniedyesno ~= "0" then %> <img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/denied.png' width='13' height='13'><% end %></td> + <td><% if watch.bypassyesno ~= "0" then %> <img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/bypass.png' width='13' height='13'><% end %></td> + <td><%= html.html_escape(watch.score) %></td> + <td<% if (watch.shortreason and watch.shortreason ~= "" and watch.reason and watch.reason ~= "") then %> title="<%= html.html_escape(watch.reason) %>"<% end %>> <% if (watch.shortreason and watch.shortreason ~= "") then %> <%= html.html_escape(watch.shortreason) %> <% elseif (watch.reason and watch.reason ~= "") then %> <%= html.html_escape(watch.reason) %> <% end %> - </TD> - <TD title="<%= html.html_escape(watch.uri) %>"><% highlight_uri=html.html_escape(watch.shorturi or watch.uri) + </td> + <td title="<%= html.html_escape(watch.uri) %>"><% highlight_uri=html.html_escape(watch.shorturi or watch.uri) if watch.wordloc ~= nil then if string.find(watch.wordloc, "|") then badwords = format.string_to_table(watch.wordloc, "|") @@ -213,12 +210,12 @@ end %> highlight_uri = string_highlight(highlight_uri, watch.wordloc, "yellow", "red") end end %> - <%= highlight_uri %></TD> - <TD><%= watch.wordloc %></TD> -</TR> + <%= highlight_uri %></td> + <td><%= watch.wordloc %></td> +</tr> <% end %> -</TBODY> -</TABLE> +</tbody> +</table> <% htmlviewfunctions.displaypagination(pagedata, page_info) %> <% if data.errtxt then %> @@ -241,4 +238,3 @@ for n,v in pairs(data.value) do end htmlviewfunctions.displayform(data, nil, nil, page_info, 2) end %> -</DL> |