<% local data, viewlibrary, page_info, session = ... %> <% require("viewfunctions")%> <% -- Insert a string into another string function string_insert(value, insert, place) if place == nil then place = string.len(value)+1 end return string.sub(value, 1,place-1) .. tostring(insert) .. string.sub(value, place, string.len(value)) end --Highlight occurences of a word in a string function string_highlight(txtvalue, searchval, fcolour, bcolour) if txtvalue ~=nil and searchval ~= nil then sStart = string.find(string.lower(txtvalue),string.lower(searchval)) if sStart ~= nil then sEnd = sStart + string.len(searchval) txtvalue = string.insert(txtvalue,"", sEnd) txtvalue = string.insert(txtvalue,"", sStart) end end return txtvalue end %> <% if data.value.focus.value ~= "" then %> <% end %> <% local subdata, pagedata = paginate(data.value.log.value, page_info.clientdata, 200) %>

Search Parameters

<% if data.errtxt then %>

<%= html.html_escape(data.errtxt) %>

<% end %>
" method="POST">
Active Weblog
Start Time

<%= html.html_escape(data.value.starttime.value) %>

<% if data.value.starttime.errtxt then %>

<%= html.html_escape(data.value.starttime.errtxt) %>

<% end %>
User ID

<%= html.html_escape(data.value.clientuserid.value) %>

<% if data.value.clientuserid.errtxt then %>

<%= html.html_escape(data.value.clientuserid.errtxt) %>

<% end %>
Client IP

<%= html.html_escape(data.value.clientip.value) %>

<% if data.value.clientip.errtxt then %>

<%= html.html_escape(data.value.clientip.errtxt) %>

<% end %>
End Time

<%= html.html_escape(data.value.endtime.value) %>

<% if data.value.endtime.errtxt then %>

<%= html.html_escape(data.value.endtime.errtxt) %>

<% end %>
URI Contains

Retrieve records where the URI contains this word

<%= html.html_escape(data.value.urisearch.value) %>

<% if data.value.urisearch.errtxt then %>

<%= html.html_escape(data.value.urisearch.errtxt) %>

<% end %>
Minimum Score

Minimum score to search on

<% if data.value.score.errtxt then %>

<%= html.html_escape(data.value.score.errtxt) %>

<% end %>
Sort By
Show Suspect Records
checked <% end %>>

Show only URIs containing flagged words

<% if data.value.badyesno.errtxt then %>

<%= html.html_escape(data.value.badyesno.errtxt) %>

<% end %>
Show Denied URIs
checked<% end %>> <% if data.value.deniedyesno.errtxt then %>

<%= html.html_escape(data.value.deniedyesno.errtxt) %>

<% end %>

Show only Denied URIs

Show Bypass Attempts
checked <% end %>> <% if data.value.bypassyesno.errtxt then %>

<%= html.html_escape(data.value.bypassyesno.errtxt) %>

<% end %>

Show only Bypass attempts

Show Selected Records
checked <% end %>> <% if data.value.selected.errtxt then %>

<%= html.html_escape(data.value.selected.errtxt) %>

<% end %>

Show only records that have been selected

<% 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 %> <% displaypagination(pagedata, page_info) %>

<%= html.html_escape(data.label) %>

" name="markselected" onsubmit="return false" method="POST"> <% for i,watch in ipairs(subdata) do local a,b = math.modf((i/2)) local mark = '' if (b == 0) and watch.selected ~= "t" then mark=' class="mark"' end if watch.selected == "t" then mark=' class="selected"' 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) %> > <% end %>
Timestamp Client IP User ID Size Sus Den Byp Score Reason URL Bad Words
checked <% end %>> <%= html.html_escape(watch.id) %> 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} %> style="font-weight:bold;" <% end %> ><%= html.html_escape(watch.clientip) %> style="font-weight:bold;" <% end %> ><%= html.html_escape(watch.clientuserid) %> <%= html.html_escape(watch.bytes) %> <% if watch.badyesno == "1" then %><% end %> <% if watch.deniedyesno ~= "0" then %> <% end %> <% if watch.bypassyesno ~= "0" then %> <% end %> <%= html.html_escape(watch.score) %> <%= html.html_escape(watch.reason) %> <% highlight_uri=html.html_escape(watch.uri) if watch.wordloc ~= nil then if string.find(watch.wordloc, "|") then badwords = format.string_to_table(watch.wordloc, "|") for key,wrd in ipairs(badwords) do highlight_uri = string_highlight(highlight_uri, wrd, "yellow", "red") end else highlight_uri = string_highlight(highlight_uri, watch.wordloc, "yellow", "red") end end %> <%= highlight_uri %> <%= watch.wordloc %>
<% displaypagination(pagedata, page_info) %> <% if data.errtxt then %>

<%= html.html_escape(data.errtxt) %>

<% end %> <% if #data.value.log.value == 0 then %>

No results, try adjusting search parameters

<% end %>
Download Options
<% if page_info.action == "viewweblog" then %>
" method="POST">
<% end %>