<@ Language="VBScript" >< Response.Buffer=True >< REM ============== Server To Server Environment Syncronization need to be checked REM ============== route via SetPortalEnvironment Subs...True state = no cache / always on and works ok If IsEmpty(Application("Portal#System_Name")) Then SetPortalEnvironment REM ============== route via SetPortalEnvironment Subs... zSiteClient=Session("System_SiteClient") zSiteHome=Session("System_SiteHome") If Session("Main_ChangeLog")<>Application(zSiteClient & "#ChangeLog") Then Session("Main_ChangeLog")=Application(zSiteClient & "#ChangeLog") Session("System_DBConnected")=False End If 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")) 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") Session("Auth_Guest")=True 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 zSiteClient="portal" And Not Session("Sec_PortalAccess") And Not Session("Sec_PortalAdmin") Then StopUser "notauth" If Session("System_SiteDiscovered") Then SetLocation zSiteClient If Not Application(zSiteClient & "#Site_Enabled") Then Response.Redirect "NotAvailable.asp" If Not Application(zSiteClient & "#Class_Enumerated") Then If LCase(zSiteClient)="portal" Then Portal_ReadClass zSiteClient,"" Else Portal_ReadClass zSiteClient,"" End If End If Portal_ReadClass "portal","_DSP" 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 ---------------------------------------------------------- Z1=Request.Form("DSPParamSel") If Len(Trim(Z1))=0 Then Z1=Session("Main_DSPParamLastSel") End If If Len(Z1)=0 Then Z1=GetPCV("_DSP","ParamDefault","Name") Session("Main_DSPParamDefault")=Z1 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 ------------------------------------------------------- If IsEmpty(Session("Main_ScreenWidth")) Then Session("Main_ScreenWidth")="800" If IsEmpty(Session("Main_ScreenHeight")) Then Session("Main_ScreenHeight")="600" ProcessRequests REM ------------------------------------------------------- REM SAVE COPY OF KEY VARIABLES - FOR RETURN OR SUB PROC REM ------------------------------------------------------- Session("Main_ScreenWidth")=zScreenWidth Session("Main_ScreenHeight")=zScreenHeight 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 LCase(zFunc)="none" Or LCase(zFunc)="nofunc" Or zFunc="noclass" Then zFunc="" If LCase(zCmd)="none" Or LCase(zCmd)="nocmd" Then zCmd="" Session("Content_FramesList")="" Session("Display_FormField")=False UI_TopRecords=Application(zSiteClient & "#Site_DspPerPage") If UI_TopRecords<1 Then UI_TopRecords=1 REM ===== Start Page Redirection ===== If Not Session("Main_PageRedirection") Then If GetSCV("_PageRedirect",zPage & "_Enabled",0)=1 Then Session("Main_PageRedirection")=True If Len(GetSCV("_PageRedirect",zPage & "_Url",""))=0 Then zPage=GetSCV("_PageRedirect",zPage & "_Page",zPage) Else Response.Redirect GetSCV("_PageRedirect",zPage & "_Url","http://www.casteksystems.com") End If End If End If REM ===== End Page Redirection ======= 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_runmod=1 Or dsp_runhtml=1 Or dsp_runcontent=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,dsp_id" Else Q="Select * From DSP Where (dsp_enabled=1 And (dsp_runmod=1 Or dsp_runhtml=1 Or dsp_runcontent=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,dsp_id" End If If Application("Portal#Site_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("_SysConfig","ExclusiveDSP","") & ";" zExclusiveDSP=LCase(Replace(zExclusiveDSP," ","")) If Instr(zExclusiveDSP,";" & zPage & ";")>0 Then Q="Select Top " & UI_TopRecords & " * From DSP Where (dsp_enabled=1 And (dsp_runmod=1 Or dsp_runhtml=1 Or dsp_runcontent=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,dsp_id" Else zExclusiveDSP=";" & GetSCV("_SysConfig","NoPublicDSP","") & ";" zExclusiveDSP=LCase(Replace(zExclusiveDSP," ","")) If Instr(zExclusiveDSP,";" & zPage & ";")>0 Then Q="Select Top " & UI_TopRecords & " * From DSP Where (dsp_enabled=1 And (dsp_runmod=1 Or dsp_runhtml=1 Or dsp_runcontent=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,dsp_id" Else Q="Select Top " & UI_TopRecords & " * From DSP Where (dsp_enabled=1 And (dsp_runmod=1 Or dsp_runhtml=1 Or dsp_runcontent=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,dsp_id" End If End If If Application(zSiteClient & "#Site_PageCounter") Then Session("Counter_Pages")=GetSCV("_SysConfig","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("_SysConfig","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_EnablePortalVariables=GetPCV("_Control","EnablePortalVariables","1") UI_EnableSessionVariables=GetPCV("_Control","EnableSessionVariables","0") UI_EnableApplicationVariables=GetPCV("_Control","EnableApplicationVariables","0") UI_EnableServerVariables=GetPCV("_Control","EnableServerVariables","0")>< hPage=GetASCV("_HTML","Redirect_" & zPage,"") If Len(hPage)=0 Then hPage="Page_" & zPage hDate=Now()><=GETASCV2(hPage,"_Site","Title","HOME")>" />" />" />< Response.Write GetASCV2(hPage,"_HTML","Head","") zPageRefresh=GetASCV("_PageRefresh",zPage,"0") zPageSwitch=GetASCV("_PageRefresh",zPage & "_Switch","main.asp?_page=" & Session("Main_PrevModule")) If zPageRefresh<>"0" Then Response.Write vbCRLF & "" Else zPageRefresh=GetSCV("_PageRefresh",zPage,"0") zPageSwitch=GetSCV("_PageRefresh",zPage & "_Switch","main.asp?_page=" & Session("Main_PrevModule")) If zPageRefresh<>"0" Then Response.Write vbCRLF & "" End If End If Response.Write vbCRLF & vbCRLF & GetPCV("_SysUI","Styles","")> < ClearStopError REM ======================================================= REM DISPATCH TO LAYOUT REM ======================================================= REM ------------------------------------------------------- REM SETTING UP DEFAULT USER INTERFACE VIA BEGINUI SUB REM ------------------------------------------------------- BeginUI REM ======================================================= REM START OF DISPATCHER SECTION REM =======================================================>< zSecRef=GetASCV("_Layout","page_" & zPage,"") If Len(zSecRef)>0 Then zSecRef="_" & zSecRef UI_Section="Top" MN.Filter="dsp_seq=" & GetPCV("_DSP","Sections_Top",0) If Not MN.EOF Then Response.Write "" Do While Not MN.EOF DisplaySection MN.MoveNext Loop Response.Write "
" End If>< Response.Write "">< UI_Section="Header" MN.Filter="dsp_seq=" & GetPCV("_DSP","Sections_Header",0) If Not MN.EOF Then Response.Write "" End If zSpc=GetASCV("_Site","HeaderSpacing","0") If zSpc<>"0" Then Response.Write "" & UI_CR1>
" Do While Not MN.EOF DisplaySection MN.MoveNext Loop Response.Write "
" & " 
< Response.Write "" >< UI_Section="Left" MN.Filter="dsp_seq=" & GetPCV("_DSP","Sections_Left",0) If Not MN.EOF Then Response.Write "" End If>< UI_Section="Footer" MN.Filter="dsp_seq=" & GetPCV("_DSP","Sections_Footer",0) If Not MN.EOF Then Response.Write "" End If>
" Do While Not MN.EOF DisplaySection MN.MoveNext Loop Response.Write "
>< UI_Section="Upper" MN.Filter="dsp_seq=" & GetPCV("_DSP","Sections_Upper",0) If Not MN.EOF Then Response.Write "" End If>< UI_Section="Center" MN.Filter="dsp_seq=" & GetPCV("_DSP","Sections_Center",0) If Not MN.EOF Then Response.Write "" End If>< UI_Section="Middle" MN.Filter="dsp_seq=" & GetPCV("_DSP","Sections_Middle",0) If Not MN.EOF Then Response.Write "" End If>< UI_Section="Right" MN.Filter="dsp_seq=" & GetPCV("_DSP","Sections_Right",0) If Not MN.EOF Then Response.Write "" End If>< UI_Section="Lower" MN.Filter="dsp_seq=" & GetPCV("_DSP","Sections_Lower",0) If Not MN.EOF Then Response.Write "" End If>
" Do While Not MN.EOF DisplaySection MN.MoveNext Loop Response.Write "
" Do While Not MN.EOF DisplaySection MN.MoveNext Loop Response.Write "
" Do While Not MN.EOF Response.Write "" MN.MoveNext Loop Response.Write "
" DisplaySection Response.Write "
" Do While Not MN.EOF DisplaySection MN.MoveNext Loop Response.Write "
" Do While Not MN.EOF DisplaySection MN.MoveNext Loop Response.Write "
" Do While Not MN.EOF DisplaySection MN.MoveNext Loop Response.Write "
< UI_Section="Bottom" MN.Filter="dsp_seq=" & GetPCV("_DSP","Sections_Bottom",0) If Not MN.EOF Then Response.Write "" Do While Not MN.EOF DisplaySection MN.MoveNext Loop Response.Write "
" End If>< REM ========================= REM END OF DISPATCHER SECTION REM ========================= REM ======================= REM CLIENT/SERVER VARIABLES REM ======================= Response.Write UI_CR1 & "" & UI_CR1 zzMainVarsList=Split(Session("Main_ListOfVars"),";") For X=0 To UBound(zzMainVarsList)-1 Response.Write "" & vbCRLF Next Response.Write UI_CR1 & "" & UI_CR1 REM ======================== REM SYSTEM DEBUGGING ROUTINE REM ======================== If Application("SystemUFB_CF") Then Application.Lock ValidateUFB False Application("SystemUFB_CF")=False Application.UnLock End if ShowDebug 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")>0 Then>0 Then>< Session("Main_PageRedirection")=False Session("System_FormInlineMessage")="" Session("System_RedirectAddress")="" Session("System_FormReturnMessage")="" Session("System_CriticalError")=False Session("System_RetryCount")=0 Session("System_SiteDiscovered")=False REM ======================================================= REM END HTML - CLOSING TAGS REM ======================================================= Session("Main_PrevPage")=Session("Main_Page") Session("Main_SystemChange")=False scrTotalTime=Int(1000*(Timer-zStartTimer)) REM Reset One Pass Variables Session("Display_FilterExtra")="" >