subroutine w3Redirect.html
***********************************************************************
* w3Sessions: Report each FlashCONNECT redirection.
* Shows the port, date and time, source page, target page,
* users IP address, and w3ProfileId.
***********************************************************************
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 w3Redirect.calc(port, date, time, source, dest, remote, profile)
text = START:"Date": MIDDLE:"Time": MIDDLE:"Port": MIDDLE
text := "Source":MIDDLE: "Destination":MIDDLE: "Client Address":MIDDLE
text := "w3ProfileId":LAST:NL
subs1 = "##TITLE##":@vm:"FlashCONNECT Redirect Report"
subs1<-1> = "#HEADLINE#":@VM:"FlashCONNECT Redirect Report"
lines = dcount(port, @AM)
for i = 1 to lines
datex = oconv(date<i>, "d2/")
timex = oconv(time<i>, "mts")
text := START:datex:MIDDLE:timex:MIDDLE:port<i>: MIDDLE
text := source<i>:MIDDLE: dest<i>:MIDDLE: remote<i>:MIDDLE
text := profile<i>: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