diff options
Diffstat (limited to 'weblog-viewblocklog-html.lsp')
-rw-r--r-- | weblog-viewblocklog-html.lsp | 126 |
1 files changed, 0 insertions, 126 deletions
diff --git a/weblog-viewblocklog-html.lsp b/weblog-viewblocklog-html.lsp deleted file mode 100644 index a9398cd..0000000 --- a/weblog-viewblocklog-html.lsp +++ /dev/null @@ -1,126 +0,0 @@ -<% local data, viewlibrary, page_info, session = ... %> - -<% if data.value.focus.value ~= "" then %> -<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"></script> -<script type="text/javascript"> - $(function(){ - if ($("#focus").length) { - var top = $("#focus").offset().top; - $("html,body").scrollTop(top); - } - }); -</script> -<% end %> - -<style type="text/css"> - #content table { border-collapse: collapse; width: 100%; } - #content table td { border-bottom: none; white-space: nowrap; padding-right:20px; } - #content table tr.mark { background: #E9E9E9; } - #content table tr.markfocus { background: #E9E966; } - #content table tr.focus { background: #E9E900; } - #content table tr.bypass { background: #eaa; } - #content table td.reason { color: #000; padding-left: 20px; border-bottom:1px solid #999; } -</style> - -<H1>Search Parameters</H1> -<DL> -<% if data.errtxt then %><p class="error"><%= html.html_escape(data.errtxt) %></p><% end %> -<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action) %>" method="POST"> -<DT>Start Time</DT> -<DD><input class="text" type="text" name="starttime" value="<%= html.html_escape(data.value.starttime.value) %>" > -<p><%= html.html_escape(data.value.starttime.value) %></p> -<% if data.value.starttime.errtxt then %><p class="error"><%= html.html_escape(data.value.starttime.errtxt) %></p><% end %> -</DD> -<DT>User ID</DT> -<DD><input class="text" type="text" name="clientuserid" value="<%= html.html_escape(data.value.clientuserid.value) %>" > -<p><%= html.html_escape(data.value.clientuserid.value) %></p> -<% if data.value.clientuserid.errtxt then %><p class="error"><%= html.html_escape(data.value.clientuserid.errtxt) %></p><% end %> -</DD> -<DT>Client IP</DT> -<DD><input class="text" type="text" name="clientip" value="<%= html.html_escape(data.value.clientip.value) %>" > -<p><%= html.html_escape(data.value.clientip.value) %></p> -<% if data.value.clientip.errtxt then %><p class="error"><%= html.html_escape(data.value.clientip.errtxt) %></p><% end %> -</DD> -<DT>End Time</DT> -<DD><input class="text" type="text" name="endtime" value="<%= html.html_escape(data.value.endtime.value) %>" > -<p><%= html.html_escape(data.value.endtime.value) %></p> -<% if data.value.endtime.errtxt then %><p class="error"><%= html.html_escape(data.value.endtime.errtxt) %></p><% end %> -</DD> -<DT></DT><DD><input class="submit" type="submit" name="Update" value="Update"></DD> -</FORM> -</DL> - -<% -local clientinfo = "" -if data.value.clientuserid.value ~= "" then - clientinfo = clientinfo .. "clientuserid="..data.value.clientuserid.value.."&" -end -if data.value.clientip.value ~= "" then - clientinfo = clientinfo .. "clientip="..data.value.clientip.value.."&" -end -%> - -<H1><%= html.html_escape(data.label) %></H1> -<DL><TABLE> - <TR class="header"> - <TD class="header">Timestamp</TD> - <TD class="header">Client IP</TD> - <TD class="header">User ID</TD> - <TD class="header">Size</TD> - <TD WIDTH="90%" class="header">URL</TD> - </TR> - -<% for i,watch in ipairs(data.value.log.value) do %> - <% local a,b = math.modf((i/2)) - local mark = '' - if (b == 0) then mark=mark..'class="mark"' end - if string.find(watch.uri, "GBYPASS=") then mark='class="bypass"' end - %> - - <% local time = {} - 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 <% 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 <% 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 title="<%= html.html_escape(watch.uri) %>" > - <%= html.link{value = watch.uri, label=watch.shorturi or watch.uri} %></TD> - </TR> - <TR <%= mark %>> - <TD class='reason' <% if (watch.shortreason and watch.shortreason ~= "") or (watch.reason and watch.reason ~= "") then %> - title="<%= html.html_escape(watch.reason) %>"<% end %> colspan=5> - <% if watch.score and watch.score ~= "0" then %><%= html.html_escape(watch.score) %> - <% 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></TR> -<% end %> -</TABLE> - -<% if data.errtxt then %> -<p class="error"><%= html.html_escape(data.errtxt) %></p> -<% end %> -<% if #data.value.log.value == 0 then %> -<p>No results, try adjusting search parameters</p> -<% end %> - -<% if page_info.action == "viewweblog" then %> -<form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/downloadweblog") %>" method="POST"> -<input type="hidden" name="starttime" value="<%= html.html_escape(data.value.starttime.value) %>" > -<input type="hidden" name="clientuserid" value="<%= html.html_escape(data.value.clientuserid.value) %>" > -<input type="hidden" name="clientip" value="<%= html.html_escape(data.value.clientip.value) %>" > -<input type="hidden" name="endtime" value="<%= html.html_escape(data.value.endtime.value) %>" > -<DT>Download log</DT><DD><input class="submit" type="submit" name="Download" value="Download"></DD> -</FORM> -<% end %> - -</DL> |