subroutine w3Sessions.html
***********************************************************************
* w3Sessions: Report each FlashCONNECT session.
* Shows the port, starting date and time,
* session duration, program run, and the FlashCONNECT user
***********************************************************************
* [01] 29Sep97 jr Remove w3HtmlComplete
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 = ""
call w3Sessions.calc(port, date, time, duration, program, user, remote, profile)
convert @VM to NL in program
text = START:"Port":MIDDLE:"Date":MIDDLE:"Time":MIDDLE
text := "Duration":MIDDLE:"w3ProfileId":MIDDLE:"Client Address":MIDDLE
text := "Programs":MIDDLE:"User":LAST:NL
subs1 = "##TITLE##":@vm:"FlashCONNECT Sessions Report"
subs1<-1> = "#HEADLINE#":@VM:"FlashCONNECT Sessions Report"
lines = dcount(port, @AM)
for i = 1 to lines
datex = oconv(date<i>, "d2/")
timex = oconv(time<i>, "mts")
userx = user<i>
if userx = "" then userx = "-"
text := START:port<i>:MIDDLE:datex:MIDDLE:timex:MIDDLE
text := oconv(duration<i>,"mts"):MIDDLE:profile<i>:MIDDLE
text := remote<i>:MIDDLE
text := program<i>:MIDDLE:userx:LAST:NL
next i
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