subroutine w3Rotator.html
***********************************************************************
* w3Rotator: Report each FlashCONNECT rotation.
* Shows the port, date and time,
* value returned, users IP address, and w3ProfileId.
***********************************************************************
Include wbp w3Include
EQU START to '<TR><TD VALIGN="TOP"><DIV ALIGN="CENTER"><FONT FACE="Arial, Helvetica, sans-serif" size="2">'
EQU MIDDLE to '</FONT></div></TD><TD VALIGN="TOP"><DIV ALIGN="CENTER"><FONT FACE="Arial, Helvetica, sans-serif" size="2">'
EQU MIDDLE2 to '</FONT></div></TD><TD VALIGN="TOP"><DIV ALIGN="LEFT"><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 w3Rotator.calc(port, date, time, value, remote, profile)
text = START:"Date": MIDDLE:"Time": MIDDLE:"Port": MIDDLE
text := "Client Address":MIDDLE: "w3ProfileId": MIDDLE
text := "Value Used": LAST:NL
subs1 = "##TITLE##":@vm:"FlashCONNECT Rotating Content Report"
subs1<-1> = "#HEADLINE#":@VM:"FlashCONNECT Rotating Content 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 := remote<i>:MIDDLE :profile<i>: MIDDLE2: value<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