subroutine w3Lines.html
***********************************************************************
* w3Lines: Report the status of each FlashCONNECT connection.
***********************************************************************
Include wbp w3Include
EQU START to '<TR><TD VALIGN="BOTTOM"><DIV ALIGN="CENTER"><FONT FACE="Arial, Helvetica, sans-serif" size="2">'
EQU MIDDLE to '</FONT></div></TD><TD><DIV ALIGN="CENTER"><FONT FACE="Arial, Helvetica, sans-serif" size="2">'
EQU LAST to "</FONT></DIV></TD></TR>"
EQU NL to char(10)
increment = 0
date = ""
time = ""
count = ""
open "w3Lines" to f.log else
call w3Log("error", "Cannot open w3Lines")
return
end
execute "sselect w3Lines"
if not(system(11)) then return
text = START:"Line"
text := MIDDLE:"Pool"
text := MIDDLE:"Host"
text := MIDDLE:"Port"
text := MIDDLE:"Status"
text := MIDDLE:"Since"
text := MIDDLE:"Socket"
text := MIDDLE: "Application"
text := MIDDLE:"User"
text := MIDDLE:"Index"
text := MIDDLE:"Up/Down"
text := MIDDLE:"Options"
text := LAST:NL
done = 0
loop
readnext id else done = 1
until done do
read item from f.log, id then
line = id
pool = item<1>
host = item<2>
port = item<3>
status = item<4>
since = item<5>
socket = item<6>
app = item<7>; if app = "" then app = "-"
user = item<8>; if user= "" then user= "-"
indx = item<9>
updown = item<10>
options= item<11>;if options="" then options="-"
temp = START:Line
temp := MIDDLE:Pool
temp := MIDDLE:Host
temp := MIDDLE:Port
temp := MIDDLE:Status
temp := MIDDLE:Since
temp := MIDDLE:Socket
temp := MIDDLE:app
temp := MIDDLE:User
temp := MIDDLE:Indx
temp := MIDDLE:UpDown
temp := MIDDLE:Options
temp := LAST:NL
text := temp
end
repeat
subs1 = "##TITLE##":@vm:"FlashCONNECT Line Status Report"
subs1<-1> = "#HEADLINE#":@VM:"FlashCONNECT Line Status Report"
subs2 = "##PERIOD##":@VM:""
subs2<-1> = "##DATA##":@vm:text
Call w3HtmlInit("w3Admin","")
Call w3HtmlHeader("",subs1)
call w3HtmlInsert("w3Reports.body", subs2)
* Get the path which got us here so we can set it in the template
Action = ""
call w3Action(Action, "")
subs = "#ACTION#":@vm:Action
call w3HtmlFooter("",subs)
return