%@ Language=VBScript %><% option explicit %>
<% Response.Buffer = FALSE %>
<% Response.ContentType = "image/svg+xml" %>
<%
DIM ScreenWidth, ScreenHeight
DIM CS_1 'Connection String
DIM RS_0, Q_0, SID 'RecordSet, Query - for sessionID
DIM ImageWidth, ImageHeight
DIM DisplayWidth, DisplayHeight
DIM Scale, Scale1
CS_1 = "DSN=f_humble"
SID = Request.Cookies("Humble")("SID")
IF SID > 0 THEN
Q_0 = "SELECT * FROM Audience WHERE SID=" & SID
' Response.Write Q_0 & " "
SET RS_0 = Server.CreateObject("ADODB.Recordset")
RS_0.Open Q_0, CS_1, adOpenKeySet, adLockPessimistic, adCmdText
IF RS_0.EOF THEN
Response.Redirect("http:../help/session.htm")
END IF
ScreenWidth = RS_0.Fields("ScreenWidth")
ScreenHeight = RS_0.Fields("ScreenHeight")
ELSE
ScreenWidth = Request.Cookies("Humble")("ScreenWidth")
ScreenHeight = Request.Cookies("Humble")("ScreenHeight")
END IF
ImageWidth = 437
ImageHeight = 578
' set it up for a graph bounding box of ? horizontal by ? vertical
Scale = 1.0
Scale1 = 1.0
IF ImageWidth > ScreenWidth THEN
Scale = ScreenWidth / ImageWidth
END IF
IF ImageHeight > ScreenHeight THEN
Scale1 = ScreenHeight / ImageHeight
END IF
IF Scale1 < Scale THEN
Scale = Scale1
END IF
IF ImageWidth / ImageHeight < ScreenWidth / ScreenHeight THEN
DisplayHeight = ScreenHeight
DisplayWidth = ROUND( ScreenHeight * Scale * ImageWidth / ImageHeight)
ELSE
DisplayWidth = ScreenWidth
DisplayHeight = ROUND( ScreenWidth * Scale * ImageHeight / ImageWidth)
END IF
%>