%@ Language=VBscript %> <% Dim dbDef Set dbDef = Server.CreateObject("ADODB.Connection") dbDef.Open SQLConnectString() Dim rsDef Set rsDef = Server.CreateObject("ADODB.Recordset") 'SET SYSTEM TYPE VARIABLE HERE ' 1 = Program; 2 = Locations; 3 = Audiences Session("SystemType") = 1 sURL = Request.ServerVariables("URL") sStartPage = Left(sURL, InStrRev(sURL, "/")-1) 'this page must be set as the StartPageURL in Admin Area rsDef.Open "Exec uspGetSystemByStartPage '" & sStartPage & "', " & Session("SystemType"), dbDef, 0, 1 if not rsDef.EOF then Session("SystemID") = rsDef("SystemID") else Session("SystemID") = 0 end if rsDef.Close set rsDef = nothing dbDef.Close set dbDef = nothing %>