<@ Language="VBScript" >< Response.Buffer=True >< 'On Error Resume Next If IsEmpty(Application("Portal#System_Name")) Then SetPortalEnvironment If IsEmpty(Session("Main_AppChangeLog")) Then Session("Main_AppChangeLog")=Application("Portal#ChangeLog") If IsEmpty(Session("Main_HttpHost1")) Then Session("Main_HttpHost1")="" If Session("Main_HttpHost1")<>LCase(Request.ServerVariables("Http_Host")) Then Session("System_DBConnected")=False Session("Main_HttpHost1")=LCase(Request.ServerVariables("Http_Host")) zSiteClient=Session("System_SiteClient") If IsEmpty(Session("Main_SiteChangeLog")) Then Session("Main_SiteChangeLog")=Application(zSiteClient & "#ChangeLog") REM Session("System_DBConnected")=False If Not Session("System_DBConnected") Then Portal_GetSite Set Conn = Session("System_DBConnection") REM ------------------------------------------------------- REM USER ACCOUNT CHECK AND RIGHTS ASSIGNMENT REM ------------------------------------------------------- If Len(Session("Sec_UserName"))=0 Then AuthUser Application(zSiteClient & "#Site_PublicAcc"),Application(zSiteClient & "#Site_PublicPW") If Len(Session("Sec_UserName"))=0 Then StopUser "account" End If Else Session("Auth_PasswordEncoded")=False AuthUser Session("Sec_UserName"),Session("Sec_Password") End If If Len(Session("Sec_UserName"))=0 Then StopUser "account" End If If Application(zSiteClient & "#Site_PublicAcc")=Session("Sec_UserName") Then Session("Auth_PublicAcc")=True Else Session("Auth_PublicAcc")=False If Not Application(zSiteClient & "#Class_Enumerated") Then If LCase(zSiteClient)="portal" Then Portal_ReadClass zSiteClient,"" Else Portal_ReadClass zSiteClient,"" End If End If If (Session("Main_AppChangeLog")<>Application("Portal#ChangeLog")) Or (Session("Main_SiteChangeLog")<>Application(zSiteClient & "#ChangeLog")) Then Session("System_DBConnected")=False Portal_ReadModules Session("Main_AppChangeLog")=Application("Portal#ChangeLog") Session("Main_SiteChangeLog")=Application(zSiteClient & "#ChangeLog") End If REM ======================================================= REM DISPATCHER & MODULES DETECTION / PROCESSING REM ======================================================= REM ----------------- VARS LIST ------------------------------ REM zCmd: Commands - Process by modules, To Do A Specific Task REM zPage: Requested Module ID, Used To Dispatch To Layout REM zKey*: Used By Modules, Index Or Key Or Field, Data REM UI_Command: Copy Of zCmd Used By User Interface Functions REM ---------------------------------------------------------- Session("Main_SiteName")=GetASCV("_Site","Name","") Session("Main_SiteContact")=GetASCV("_Site","Contact","") Session("Main_OnLineStore")=GetSCV("_Products","OnLineStore","0") Session("Main_SalesAccount")=GetSCV("_Products","SalesAccount","") If Len(Session("Main_SalesAccount"))=0 Then Session("Main_OnLineStore")="0" End If Session("Main_PrevModule")=Session("Main_Page") Session("Main_PrevCommand")=Session("Main_Command") Session("Main_PrevKey")=Session("Main_Key") REM ------------------------------------------------------- REM GET / POST DETECTION - GLOBAL VARIABLES ASSIGNMENT REM ------------------------------------------------------- Q=Request.QueryString("_page") Q=Request.Form("_page") If Len(Q)>0 Then zRequests=FixString(Request.Form("_Requests")) zRequests=CInt(zRequests) zRefresh=(Session("Main_Requests")-zRequests)<>1 zCmd=LCase(FixString(Request.Form("_Cmd"))) If IsEmpty(Session("Main_PrevModule")) Then Session("Main_PrevModule")="home" REM zCmd="collapsemenu" End If UI_Command=zCmd N="" M="State_" ZZ=0 For Each Item in Request.Form N=Left(Item,Len(M)) If M=N Then Session(Item)=Request.Form(Item) Next zPage=Request.Form("_Page") zFunc=Request.Form("_Func") zKey=Request.Form("_Key") zKey1=Request.Form("_Key1") zKey2=Request.Form("_Key2") zKey3=Request.Form("_Key3") zKey4=Request.Form("_Key4") zKey5=Request.Form("_Key5") zReferer=Session("Main_Referer") zCallBack=Request.Form("_CallBack") zSubSec=Request.Form("_SubSec") If Len(zSubSec)>0 Then N="State_" & zSubSec Z=Session(N) If Z="block" Then Session(N)="none" Else Session(N)="block" End If End If Else zRequests=0 zRefresh=False zCmd=Request.QueryString("_Cmd") If IsEmpty(zCmd) Then zCmd="" zCmd=LCase(zCmd) Session("Main_PrevModule")="home" UI_Command=zCmd zSubSec="" zPage=Request.QueryString("_Page") If IsEmpty(zPage) Then zPage="" zFunc=Request.QueryString("_Func") If IsEmpty(zFunc) Then zFunc="" zKey=Request.QueryString("_Key") If IsEmpty(zKey) Then zKey="" zKey1=Request.QueryString("_Key1") If IsEmpty(zKey1) Then zKey1="" zKey2=Request.QueryString("_Key2") If IsEmpty(zKey2) Then zKey2="" zKey3=Request.QueryString("_Key3") If IsEmpty(zKey3) Then zKey3="" zKey4=Request.QueryString("_Key4") If IsEmpty(zKey4) Then zKey4="" zKey5=Request.QueryString("_Key5") If IsEmpty(zKey5) Then zKey5="" zReferer=Request.QueryString("Referer") If Len(zReferer)>0 Then Session("Main_Referer")=zReferer End If zPage=LCase(zPage) If Len(zPage)=0 Then zPage=Session("Main_PrevModule") Session("Main_PrevModule")=zPage REM ------------------------------------------------------- REM SAVE COPY OF KEY VARIABLES - FOR RETURN OR SUB PROC REM ------------------------------------------------------- Session("Main_Page")=zPage Session("Main_Func")=zFunc Session("Main_Function")=zFunc Session("Main_Cmd")=zCmd Session("Main_Command")=zCmd Session("Main_Key")=zKey Session("Main_Key1")=zKey1 Session("Main_Key2")=zKey2 Session("Main_Key3")=zKey3 Session("Main_Key4")=zKey4 Session("Main_Key5")=zKey5 If Len(zKey1)>0 Then Session("Main_PrevMenu")=zKey1 If LCase(zFunc)="none" Or LCase(zFunc)="nofunc" Or zFunc="noclass" Then zFunc="" If LCase(zCmd)="none" Or LCase(zCmd)="nocmd" Then zCmd="" Session("Display_FormField")=False UI_TopRecords=Application(zSiteClient & "#Site_DspPerPage") If UI_TopRecords<1 Then UI_TopRecords=1 REM ------------------------------------------------------- REM CONNECT TO MUSICDB AND RETRIEVE SECTIONS INSTRUCTION REM ------------------------------------------------------- If (LCase(zSiteClient)="portal" Or Session("Sec_Administrator")) And Not Session("Auth_PublicAcc") Then If Not PortalMaster Then If GetPCV("_Control","Administration","0")<>"1" Or Not Application(zSiteClient & "#Site_Administration") Then Response.Redirect "NoAdmin.asp" End If End If zExclusiveDSP=";" & GetPCV("_Control","ExclusiveDSP","") & ";" zExclusiveDSP=LCase(Replace(zExclusiveDSP," ","")) If Instr(zExclusiveDSP,";" & zPage & ";")>0 Then Q="Select * From DSP Where dsp_enabled=1 And dsp_admin=1 And ( CharIndex(';" & zPage & ";',dsp_noaccess)=0 " _ & " And ( CharIndex(';" & zPage & ";',dsp_access)>0 ) And ( dsp_client='" & zSiteClient & "' " _ & " Or ( CharIndex(';" & zSiteClient & ";',dsp_adminaccess)>0 Or CharIndex(';all;',dsp_adminaccess)>0 ) ) " _ & " ) Order by dsp_seq,dsp_index" Else Q="Select * From DSP Where dsp_enabled=1 And dsp_admin=1 And ( CharIndex(';" & zPage & ";',dsp_noaccess)=0 " _ & " And ( CharIndex(';" & zPage & ";',dsp_access)>0 " _ & " Or CharIndex(';all;',dsp_access)>0 ) " _ & " And ( dsp_client='" & zSiteClient & "' " _ & " Or ( CharIndex(';" & zSiteClient & ";',dsp_adminaccess)>0 " _ & " Or ( CharIndex(';all;',dsp_adminaccess)>0 And CharIndex('" & zSiteClient & "',dsp_noadminaccess)=0 ) ) ) " _ & " ) Order by dsp_seq,dsp_index" End If If Application("Portal#Sites_PageCounter") Then Session("Counter_Pages")=GetPCV("_Control","CounterPages","") Session("Counter_PageEnabled")=Len(Session("Counter_Pages"))>0 If Session("Counter_PageEnabled") Then If Instr(Session("Counter_Pages"),";" & LCase(zPage) & ";")>0 Or Instr(Session("Counter_Pages"),";all;")>0 Then UpdateCounter "Page",zPage,0,"" End If End If End If Else zExclusiveDSP=";" & GetSCV("_System","ExclusiveDSP","") & ";" zExclusiveDSP=LCase(Replace(zExclusiveDSP," ","")) If Instr(zExclusiveDSP,";" & zPage & ";")>0 Then Q="Select Top " & UI_TopRecords & " * From DSP Where dsp_enabled=1 And CharIndex(';" & zPage & ";',dsp_noaccess)=0 " _ & " And CharIndex(';" & zPage & ";',dsp_access)>0 " _ & " And ( dsp_client='" & zSiteClient & "' Or dsp_public=1 ) " _ & " Order by dsp_seq,dsp_index" Else zExclusiveDSP=";" & GetSCV("_System","NoPublicDSP","") & ";" zExclusiveDSP=LCase(Replace(zExclusiveDSP," ","")) If Instr(zExclusiveDSP,";" & zPage & ";")>0 Then Q="Select Top " & UI_TopRecords & " * From DSP Where dsp_enabled=1 And CharIndex(';" & zPage & ";',dsp_noaccess)=0 " _ & " And ( CharIndex(';" & zPage & ";',dsp_access)>0 " _ & " Or CharIndex(';all;',dsp_access)>0 ) " _ & " And ( dsp_client='" & zSiteClient & "') " _ & " Order by dsp_seq,dsp_index" Else Q="Select Top " & UI_TopRecords & " * From DSP Where dsp_enabled=1 And CharIndex(';" & zPage & ";',dsp_noaccess)=0 " _ & " And ( CharIndex(';" & zPage & ";',dsp_access)>0 " _ & " Or CharIndex(';all;',dsp_access)>0 ) " _ & " And ( dsp_client='" & zSiteClient & "' " _ & " Or ( dsp_public=1 And ( CharIndex(';" & zSiteClient & ";',dsp_publicaccess)>0 " _ & " Or ( CharIndex(';all;',dsp_publicaccess)>0 And CharIndex('" & zSiteClient & "',dsp_nopublicaccess)=0 ) ) ) " _ & " ) Order by dsp_seq,dsp_index" End If End If If Session("Site_PageCounter") Then Session("Counter_Pages")=GetSCV("_System","CounterPages","") Session("Counter_PageEnabled")=Len(Session("Counter_Pages"))>0 If Session("Counter_PageEnabled") Then If Instr(Session("Counter_Pages"),";" & LCase(zPage) & ";")>0 Or Instr(Session("Counter_Pages"),";all;")>0 Then UpdateCounter "Page",zPage,GetSCV("_System","CounterVersion","0"),"" End If End If End If End If 'Response.Write "

" & Q & "

" Set MN=Conn.Execute(Q) CheckError REM ======================================================= REM HTML HEADING FOLLOWS REM ======================================================= UI_ShowSectionMarkers=GetSCV("_System","ShowSectionMarkers","0") UI_ShowModuleMarkers=GetSCV("_System","ShowModuleMarkers","0") UI_EnablePortalVariables=GetPCV("_Control","EnablePortalVariables","1") UI_EnableSessionVariables=GetPCV("_Control","EnableSessionVariables","0") UI_EnableApplicationVariables=GetPCV("_Control","EnableApplicationVariables","0") UI_EnableServerVariables=GetPCV("_Control","EnableServerVariables","0")>< hPage="Page_" & zPage hDate=Date() 1><=GETASCV2(hPage,"_Site","Title","HOME")>" />" />" />< zPageRefresh=GetASCV("_PageRefresh",zPage,"0") zPageSwitch=GetASCV("_PageRefresh",zPage & "_Switch","") If zPageRefresh<>"0" Then Response.Write "" End If>< SetDefaultSchemes ClearStopError REM ======================================================= REM DISPATCH TO LAYOUT REM ======================================================= REM ------------------------------------------------------- REM SETTING UP DEFAULT USER INTERFACE VIA BEGINUI SUB REM ------------------------------------------------------- Z=GetPortalStyle(GetASCV("_Site","Style","green")) SetBoxSpacing 0 SetBoxPadding 0 SetUI Z,"","","","","" BeginUI SiteDoc "Layout:Site Setup" Response.Write "" SetGlobalOptions True,True CheckError REM ======================================================= REM START OF DISPATCHER SECTION REM ======================================================= SetUIBase "inner" BeginDispatch "Top" REM ------------------------------------------------------- REM DISPLAY SITE TOP REM ------------------------------------------------------- MN.Filter="dsp_seq=0" Do While Not MN.EOF DisplaySection MN.MoveNext Loop SetUIBase "body" BeginDispatch "Global" REM Global Containers MN.Filter="dsp_seq=99" REM ------------------------------------------------------- REM DISPLAY GLOBAL CONTAINERS REM ------------------------------------------------------- Do While Not MN.EOF DisplaySection MN.MoveNext Loop SetUIBase "inner" SiteDoc "Layout:Heading, Left, _Main, Center, Middle, Sub, Right, Footer" Response.Write "" REM Reference DisplaySection Subroutine - command below (sub) closes/cleanup global boxes/containers CloseGlobalContainers SetUIBase "body" Z=GetPortalStyle(GetASCV("_Site","Style","green")) SetBoxSpacing 0 SetBoxPadding 0 SetUI Z,"","","","","" BeginDispatch "Bottom" REM -------------- REM BOTTOM SECTION REM -------------- MN.Filter="dsp_seq=9" Do While Not MN.EOF DisplaySection MN.MoveNext Loop Response.Write "
" MN.Filter="dsp_seq=1" REM ------------------------------------------------------- REM DISPLAY HEADINGS REM ------------------------------------------------------- BeginDispatch "Heading" Do While Not MN.EOF DisplaySection MN.MoveNext Loop SiteDoc "Heading-Main Sections Spacing" If GetASCV("_Site","HeaderSpacing","0")<>"0" Then Response.Write "" End If REM ------------------------------------------------------- REM START CONTENT ROW REM ------------------------------------------------------- SiteDoc "Sections Dispatcher - For Heading Thru Footer" Response.Write "" Response.Write "" BeginDispatch "Footer" REM ------------------------------------------------------- REM FOOTER SECTION REM ------------------------------------------------------- MN.Filter="dsp_seq=8" REM Display Footers Do While Not MN.EOF DisplaySection MN.MoveNext Loop REM - CONTENT CONTAINER Response.Write "
" DisplaySpacing GetASCV("_Site","HeaderSpacing","0") Response.Write "
" If GetASCV("_Site","InnerSpacing","0")<>"0" Then SiteDoc "Left Padding" Response.Write "" End If REM ------------------------------------------------------- REM LEFT SECTION REM ------------------------------------------------------- BeginDispatch "Left" zDisp=False MN.Filter="dsp_seq=2" If Not MN.EOF Then zDisp=True Response.Write vbCRLF & "" End If REM ================ Pad Between Left And Main ================= SiteDoc "Left/Main Padding" Response.Write "" SiteDoc "Layout:_Main, Center, Middle, Sub Sections" Response.Write "" SiteDoc "Pad Between Main And Right Sections" REM ================ Pad Between Main Sections And Right Section ================= Response.Write "" BeginDispatch "Right" REM ------------------------------------------------------- REM RIGHT SECTION REM ------------------------------------------------------- zDisp=False MN.Filter="dsp_seq=7" If Not MN.EOF Then zDisp=True Response.Write "" End If SiteDoc "Right Edge Spacing" If GetASCV("_Site","InnerSpacing","0")<>"0" Then Response.Write "" End If SiteDoc "Layout:Close Left/Main/Right Sections" Response.Write "
" Response.Write "" Response.Write "
" Response.Write "
" Response.Write "" Response.Write vbCRLF End If Do While Not MN.EOF DisplaySection MN.MoveNext Loop If zDisp Then Response.Write "
" Response.Write "" Response.Write "
" Response.Write "
" BeginDispatch "Center" REM ----------- REM CENTER REM ----------- zDisp=False MN.Filter="dsp_seq=3" Do While Not MN.EOF DisplaySection MN.MoveNext Loop SiteDoc "Layout:End Main Sections" Response.Write "
" Response.Write "" Response.Write "
" Response.Write "
" Response.Write "" End If Do While Not MN.EOF DisplaySection MN.MoveNext Loop If zDisp Then Response.Write "
" Response.Write "" Response.Write "
" Response.Write "
" SetUIBase "inner" REM ---------- REM AD SECTION REM ---------- MN.Filter="dsp_seq=10" If Not MN.EOF Then BeginDispatch "Advertisement" Response.Write "" End If Do While Not MN.EOF DisplaySection MN.MoveNext Loop Response.Write "
" Rem End Global Row Response.Write "" Response.Write "" ShowDebug Response.Write "" EndUI REM ======================================================= REM END OF DISPATCHER SECTION REM ======================================================= REM ======================================================= REM CLIENT SIDE MESSAGE DISPLAY / DEBUGGING ROUTINE REM ======================================================= Session("System_FormEditRestrict")=False If Session("System_CriticalError") Then zInfo="vbCritical" Else zInfo="vbInformation" End If zAddr=Session("System_RedirectAddress") zMsg=Session("System_FormReturnMessage") zMsg=Replace(zMsg,Chr(1),"...")>0 Then>0 Then>< Session("System_SiteClient")=zSiteClient Session("System_FormInlineMessage")="" Session("System_RedirectAddress")="" Session("System_FormReturnMessage")="" Session("System_CriticalError")=False Session("System_RetryCount")=0 REM Hit Counter Section If IsEmpty(Session("System_SessionActive")) Then Session("System_SessionActive")=False If Session("System_SessionActive")=False Then Session("System_SessionActive")=True UpdateHitCounter End If REM ======================================================= REM END HTML - CLOSING TAGS REM ======================================================= Session("Main_PrevPage")=Session("Main_Page") Session("Main_SystemChange")=False scrTotalTime=Int(1000*(Timer-zStartTimer))>