<%@ CodePage=1251 %> <% 'Include Common Files @1-6A7F3264 %> <% 'End Include Common Files 'Initialize Page @1-1112D66C ' Variables Dim PathToRoot, ScriptPath Dim FileName Dim Redirect Dim Tpl, HTMLTemplate Dim TemplateFileName Dim ComponentName Dim PathToCurrentPage ' Events Dim CCSEvents Dim CCSEventResult ' Connections Dim DBInternetDB ' Page controls Dim Header Dim products_search Dim FullPriceList Dim AdvSearch Dim categories Dim weekly Dim reading Dim notable Dim recommend Dim Footer Redirect = "" TemplateFileName = "enDefault.html" Set CCSEvents = CreateObject("Scripting.Dictionary") PathToCurrentPage = "./" FileName = "enDefault.asp" PathToRoot = "./" ScriptPath = Left(Request.ServerVariables("PATH_TRANSLATED"), Len(Request.ServerVariables("PATH_TRANSLATED")) - Len(FileName)) 'End Initialize Page 'Initialize Objects @1-95190C70 Set DBInternetDB = New clsDBInternetDB DBInternetDB.Open ' Controls Set Header = New clsenHeader Header.initIncludes("") Header.BindEvents Header.Initialize Set products_search = new clsRecordproducts_search Set FullPriceList = CCCreateControl(ccsLink, "FullPriceList", "FullPriceList", ccsText, Empty, CCGetRequestParam("FullPriceList", ccsGet)) Set AdvSearch = CCCreateControl(ccsLink, "AdvSearch", "AdvSearch", ccsText, Empty, CCGetRequestParam("AdvSearch", ccsGet)) Set categories = New clsGridcategories Set weekly = New clsGridweekly Set reading = New clsGridreading Set notable = New clsGridnotable Set recommend = New clsGridrecommend Set Footer = New clsenFooter Footer.initIncludes("") Footer.BindEvents Footer.Initialize FullPriceList.Parameters = CCGetQueryString("QueryString", Array("ccsForm")) FullPriceList.Page = "enFullList.asp" AdvSearch.Link = "" AdvSearch.Page = "enSearch.asp" categories.Initialize DBInternetDB weekly.Initialize DBInternetDB reading.Initialize DBInternetDB notable.Initialize DBInternetDB recommend.Initialize DBInternetDB CCSEventResult = CCRaiseEvent(CCSEvents, "AfterInitialize", Nothing) 'End Initialize Objects 'Execute Components @1-FEEAD2C4 Header.Operations products_search.Operation Footer.Operations 'End Execute Components 'Go to destination page @1-6D35F4FD If NOT ( Redirect = "" ) Then UnloadPage Response.Redirect Redirect End If 'End Go to destination page 'Initialize HTML Template @1-0155E1BE CCSEventResult = CCRaiseEvent(CCSEvents, "OnInitializeView", Nothing) Set HTMLTemplate = new clsTemplate Set HTMLTemplate.Cache = TemplatesRepository HTMLTemplate.LoadTemplate ScriptPath & TemplateFileName Set Tpl = HTMLTemplate.Block("main") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Nothing) 'End Initialize HTML Template 'Show Page @1-FFAD41D2 Header.Show Tpl, "Header" products_search.Show Tpl FullPriceList.Show Tpl AdvSearch.Show Tpl categories.Show Tpl weekly.Show Tpl reading.Show Tpl notable.Show Tpl recommend.Show Tpl Footer.Show Tpl, "Footer" HTMLTemplate.PParse "main", False 'End Show Page 'Unload Page @1-CB210C62 UnloadPage Set Tpl = Nothing Set HTMLTemplate = Nothing 'End Unload Page 'UnloadPage Sub @1-C83DE54B Sub UnloadPage() CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeUnload", Nothing) If DBInternetDB.State = adStateOpen Then _ DBInternetDB.Close Set DBInternetDB = Nothing Set Header = Nothing Set products_search = Nothing Set categories = Nothing Set weekly = Nothing Set reading = Nothing Set notable = Nothing Set recommend = Nothing Set Footer = Nothing End Sub 'End UnloadPage Sub Class clsRecordproducts_search 'products_search Class @53-E62965FB 'products_search Variables @53-F4BDE988 ' Public variables Public ComponentName Public HTMLFormAction Public PressedButton Public Errors Public FormSubmitted Public EditMode Public Visible Public Recordset Public TemplateBlock Public CCSEvents Private CCSEventResult Public InsertAllowed Public UpdateAllowed Public DeleteAllowed Public ReadAllowed Public DataSource Public Command Public ValidatingControls Public Controls ' Class variables Dim category_id Dim category_idDataSource Dim s_keyword Dim DoSearch 'End products_search Variables 'products_search Class_Initialize Event @53-6D679A02 Private Sub Class_Initialize() Visible = True Set Errors = New clsErrors Set CCSEvents = CreateObject("Scripting.Dictionary") InsertAllowed = False UpdateAllowed = False DeleteAllowed = False ReadAllowed = True Dim Method Dim OperationMode OperationMode = Split(CCGetFromGet("ccsForm", Empty), ":") If UBound(OperationMode) > -1 Then FormSubmitted = (OperationMode(0) = "products_search") End If If UBound(OperationMode) > 0 Then EditMode = (OperationMode(1) = "Edit") End If ComponentName = "products_search" Method = IIf(FormSubmitted, ccsPost, ccsGet) Set category_idDataSource = CCCreateDataSource(dsTable,DBInternetDB, Array("SELECT * " & _ "FROM store_categories", "", "")) With category_idDataSource.WhereParameters Set .ParameterSources = Server.CreateObject("Scripting.Dictionary") .ParameterSources("expr134") = 1 .AddParameter 1, "expr134", ccsInteger, Array(False, 0, False, False, False, "1", "", 1, True, ""), Empty, 1, False .Criterion(1) = .Operation(opEqual, False, "e_is_visible", .getParamByID(1)) .AssembledWhere = .Criterion(1) End With category_idDataSource.Where = category_idDataSource.WhereParameters.AssembledWhere Set category_id = CCCreateList(ccsListBox, "category_id", "category_id", ccsInteger, CCGetRequestParam("category_id", Method), category_idDataSource) category_id.BoundColumn = "category_id" category_id.TextColumn = "e_category_name" Set s_keyword = CCCreateControl(ccsTextBox, "s_keyword", "s_keyword", ccsText, Empty, CCGetRequestParam("s_keyword", Method)) Set DoSearch = CCCreateButton("DoSearch") Set ValidatingControls = new clsControls ValidatingControls.addControls Array(category_id, s_keyword) End Sub 'End products_search Class_Initialize Event 'products_search Class_Terminate Event @53-32B847C9 Private Sub Class_Terminate() Set Errors = Nothing End Sub 'End products_search Class_Terminate Event 'products_search Validate Method @53-B9D513CF Function Validate() Dim Validation ValidatingControls.Validate CCSEventResult = CCRaiseEvent(CCSEvents, "OnValidate", Me) Validate = ValidatingControls.isValid() And (Errors.Count = 0) End Function 'End products_search Validate Method 'products_search Operation Method @53-ADFF9847 Sub Operation() If NOT ( Visible AND FormSubmitted ) Then Exit Sub If FormSubmitted Then PressedButton = "DoSearch" If Not IsEmpty(CCGetParam("DoSearch", Empty)) Then PressedButton = "DoSearch" End If End If Redirect = "enProducts.asp" If Validate() Then If PressedButton = "DoSearch" Then If NOT DoSearch.OnClick() Then Redirect = "" Else Redirect = "enProducts.asp?" & CCGetQueryString("Form", Array(PressedButton, "ccsForm")) End If End If Else Redirect = "" End If End Sub 'End products_search Operation Method 'products_search Show Method @53-17FB4BB3 Sub Show(Tpl) If NOT Visible Then Exit Sub EditMode = False HTMLFormAction = FileName & "?" & CCAddParam(Request.ServerVariables("QUERY_STRING"), "ccsForm", "products_search" & IIf(EditMode, ":Edit", "")) Set TemplateBlock = Tpl.Block("Record " & ComponentName) TemplateBlock.Variable("HTMLFormName") = ComponentName TemplateBlock.Variable("HTMLFormEnctype") ="application/x-www-form-urlencoded" Set Controls = CCCreateCollection(TemplateBlock, Null, ccsParseOverwrite, _ Array(category_id, s_keyword, DoSearch)) If Not FormSubmitted Then End If If FormSubmitted Then With TemplateBlock.Block("Error") .Variable("Error") = ValidatingControls.GetErrors & Errors.ToString .Parse False End With End If TemplateBlock.Variable("Action") = HTMLFormAction CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If Visible Then Controls.Show End Sub 'End products_search Show Method End Class 'End products_search Class @53-A61BA892 Class clsGridcategories 'categories Class @25-664614BE 'categories Variables @25-11947E2F ' Private variables Private VarPageSize ' Public variables Public ComponentName, CCSEvents Public Visible, Errors Public DataSource Public PageNumber Public Command Public TemplateBlock Public Recordset Private CCSEventResult ' Grid Controls Public StaticControls, RowControls Dim category_name 'End categories Variables 'categories Class_Initialize Event @25-EF625C1B Private Sub Class_Initialize() ComponentName = "categories" Visible = True Set CCSEvents = CreateObject("Scripting.Dictionary") Set Errors = New clsErrors Set DataSource = New clscategoriesDataSource Set Command = New clsCommand PageSize = CCGetParam(ComponentName & "PageSize", Empty) If IsNumeric(PageSize) And Len(PageSize) > 0 Then If PageSize <= 0 Then Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageSizeError", Empty)) If PageSize > 100 Then PageSize = 100 End If If NOT IsNumeric(PageSize) OR IsEmpty(PageSize) Then _ PageSize = 20 _ Else _ PageSize = CInt(PageSize) PageNumber = CCGetParam(ComponentName & "Page", 1) If Not IsNumeric(PageNumber) And Len(PageNumber) > 0 Then Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageNumberError", Empty)) PageNumber = 1 ElseIf Len(PageNumber) > 0 Then If PageNumber > 0 Then PageNumber = CInt(PageNumber) Else Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageNumberError", Empty)) PageNumber = 1 End If Else PageNumber = 1 End If Set category_name = CCCreateControl(ccsLink, "category_name", "category_name", ccsText, Empty, CCGetRequestParam("category_name", ccsGet)) End Sub 'End categories Class_Initialize Event 'categories Initialize Method @25-57CE6952 Sub Initialize(objConnection) If NOT Visible Then Exit Sub Set DataSource.Connection = objConnection DataSource.PageSize = PageSize DataSource.AbsolutePage = PageNumber End Sub 'End categories Initialize Method 'categories Class_Terminate Event @25-E1528F98 Private Sub Class_Terminate() Set DataSource = Nothing Set Command = Nothing Set Errors = Nothing End Sub 'End categories Class_Terminate Event 'categories Show Method @25-DEA177A0 Sub Show(Tpl) If NOT Visible Then Exit Sub Dim RecordCounter, ShownRecords Dim RowBlock With DataSource .Parameters("expr130") = 1 .Parameters("expr132") = "RUSRET" End With CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me) Set Recordset = DataSource.Open(Command) Set TemplateBlock = Tpl.Block("Grid " & ComponentName) Set RowBlock = TemplateBlock.Block("Row") Set RowControls = CCCreateCollection(RowBlock, Null, ccsParseAccumulate, _ Array(category_name)) CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If NOT Visible Then Exit Sub Errors.AddErrors DataSource.Errors If Errors.Count > 0 Then TemplateBlock.HTML = CCFormatError("Grid categories", Errors) Else ' Show NoRecords block if no records are found If Recordset.EOF Then TemplateBlock.Block("NoRecords").Parse ccsParseOverwrite End If While NOT Recordset.EOF AND ShownRecords < PageSize category_name.Value = Recordset.Fields("category_name") category_name.Link = "" category_name.Parameters = CCAddParam(category_name.Parameters, "category_id", Recordset.Fields("category_name_param1")) category_name.Page = "enProducts.asp" CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShowRow", Me) RowControls.Show Recordset.MoveNext ShownRecords = ShownRecords + 1 Wend TemplateBlock.Parse ccsParseOverwrite End If End Sub 'End categories Show Method 'categories PageSize Property Let @25-54E46DD6 Public Property Let PageSize(NewValue) VarPageSize = NewValue DataSource.PageSize = NewValue End Property 'End categories PageSize Property Let 'categories PageSize Property Get @25-9AA1D1E9 Public Property Get PageSize() PageSize = VarPageSize End Property 'End categories PageSize Property Get End Class 'End categories Class @25-A61BA892 Class clscategoriesDataSource 'categoriesDataSource Class @25-2C805529 'DataSource Variables @25-85FAB885 Public Errors, Connection, Parameters, CCSEvents Public Recordset Public SQL, CountSQL, Order, Where, Orders Public PageSize Public PageCount Public AbsolutePage Public Fields Dim WhereParameters Public AllParamsSet Public CmdExecution Private CurrentOperation Private CCSEventResult ' Datasource fields Public category_name Public category_name_param1 'End DataSource Variables 'DataSource Class_Initialize Event @25-75AA0F42 Private Sub Class_Initialize() Set CCSEvents = CreateObject("Scripting.Dictionary") Set Fields = New clsFields Set Recordset = New clsDataSource Set Recordset.DataSource = Me Set Errors = New clsErrors AllParamsSet = True Set category_name = CCCreateField("category_name", "e_category_name", ccsText, Empty, Recordset) Set category_name_param1 = CCCreateField("category_name_param1", "category_id", ccsText, Empty, Recordset) Fields.AddFields Array(category_name, category_name_param1) Set Parameters = Server.CreateObject("Scripting.Dictionary") Set WhereParameters = Nothing SQL = "SELECT TOP {SqlParam_endRecord} * " & _ "FROM store_categories" CountSQL = "SELECT COUNT(*) " & _ "FROM store_categories" Where = "" Order = "category_name" End Sub 'End DataSource Class_Initialize Event 'BuildTableWhere Method @25-B6DA15EF Public Sub BuildTableWhere() Dim WhereParams If Not WhereParameters Is Nothing Then _ Exit Sub Set WhereParameters = new clsSQLParameters With WhereParameters Set .Connection = Connection Set .ParameterSources = Parameters Set .DataSource = Me .AddParameter 1, "expr130", ccsInteger, Empty, Empty, 1, False .AddParameter 2, "expr132", ccsText, Empty, Empty, Empty, False .Criterion(1) = .Operation(opEqual, False, "e_is_visible", .getParamByID(1)) .Criterion(2) = .Operation(opContains, False, "category_channel", .getParamByID(2)) .AssembledWhere = .opAND(False, .Criterion(1), .Criterion(2)) WhereParams = .AssembledWhere If Len(Where) > 0 Then If Len(WhereParams) > 0 Then _ Where = Where & " AND " & WhereParams Else If Len(WhereParams) > 0 Then _ Where = WhereParams End If End With End Sub 'End BuildTableWhere Method 'Open Method @25-192E38F9 Function Open(Cmd) Errors.Clear Set Cmd.Connection = Connection Cmd.CommandOperation = cmdOpen Cmd.PageSize = PageSize Cmd.ActivePage = AbsolutePage Cmd.CommandType = dsTable CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect", Me) Cmd.SQL = SQL Cmd.CountSQL = CountSQL BuildTableWhere Cmd.Where = Where Cmd.OrderBy = Order Cmd.Options("TOP") = True CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteSelect", Me) If Errors.Count = 0 And CCSEventResult Then _ Set Recordset = Cmd.Exec(Errors) CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect", Me) Set Recordset.FieldsCollection = Fields Set Open = Recordset End Function 'End Open Method 'DataSource Class_Terminate Event @25-41B4B08D Private Sub Class_Terminate() If Recordset.State = adStateOpen Then _ Recordset.Close Set Recordset = Nothing Set Parameters = Nothing Set Errors = Nothing End Sub 'End DataSource Class_Terminate Event End Class 'End categoriesDataSource Class @25-A61BA892 Class clsGridweekly 'weekly Class @75-C33AEBCD 'weekly Variables @75-CA47DD29 ' Private variables Private VarPageSize ' Public variables Public ComponentName, CCSEvents Public Visible, Errors Public DataSource Public PageNumber Public Command Public TemplateBlock Public Recordset Private CCSEventResult ' Grid Controls Public StaticControls, RowControls Dim article_title Dim article_cont 'End weekly Variables 'weekly Class_Initialize Event @75-6BE13E4F Private Sub Class_Initialize() ComponentName = "weekly" Visible = True Set CCSEvents = CreateObject("Scripting.Dictionary") Set Errors = New clsErrors Set DataSource = New clsweeklyDataSource Set Command = New clsCommand PageSize = CCGetParam(ComponentName & "PageSize", Empty) If IsNumeric(PageSize) And Len(PageSize) > 0 Then If PageSize <= 0 Then Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageSizeError", Empty)) If PageSize > 100 Then PageSize = 100 End If If NOT IsNumeric(PageSize) OR IsEmpty(PageSize) Then _ PageSize = 10 _ Else _ PageSize = CInt(PageSize) PageNumber = CCGetParam(ComponentName & "Page", 1) If Not IsNumeric(PageNumber) And Len(PageNumber) > 0 Then Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageNumberError", Empty)) PageNumber = 1 ElseIf Len(PageNumber) > 0 Then If PageNumber > 0 Then PageNumber = CInt(PageNumber) Else Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageNumberError", Empty)) PageNumber = 1 End If Else PageNumber = 1 End If Set article_title = CCCreateControl(ccsLink, "article_title", "article_title", ccsText, Empty, CCGetRequestParam("article_title", ccsGet)) Set article_cont = CCCreateControl(ccsLabel, "article_cont", "article_cont", ccsText, Empty, CCGetRequestParam("article_cont", ccsGet)) End Sub 'End weekly Class_Initialize Event 'weekly Initialize Method @75-57CE6952 Sub Initialize(objConnection) If NOT Visible Then Exit Sub Set DataSource.Connection = objConnection DataSource.PageSize = PageSize DataSource.AbsolutePage = PageNumber End Sub 'End weekly Initialize Method 'weekly Class_Terminate Event @75-E1528F98 Private Sub Class_Terminate() Set DataSource = Nothing Set Command = Nothing Set Errors = Nothing End Sub 'End weekly Class_Terminate Event 'weekly Show Method @75-F7AD64D3 Sub Show(Tpl) If NOT Visible Then Exit Sub Dim RecordCounter, ShownRecords Dim RowBlock CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me) Set Recordset = DataSource.Open(Command) Set TemplateBlock = Tpl.Block("Grid " & ComponentName) Set RowBlock = TemplateBlock.Block("Row") Set RowControls = CCCreateCollection(RowBlock, Null, ccsParseAccumulate, _ Array(article_title, article_cont)) CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If NOT Visible Then Exit Sub Errors.AddErrors DataSource.Errors If Errors.Count > 0 Then TemplateBlock.HTML = CCFormatError("Grid weekly", Errors) Else ' Show NoRecords block if no records are found If Recordset.EOF Then TemplateBlock.Block("NoRecords").Parse ccsParseOverwrite End If While NOT Recordset.EOF AND ShownRecords < PageSize article_title.Value = Recordset.Fields("article_title") article_title.Link = "" article_title.Parameters = CCAddParam(article_title.Parameters, "product_id", Recordset.Fields("article_title_param1")) article_title.Page = "enProductDetail.asp" article_cont.Value = Recordset.Fields("article_cont") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShowRow", Me) RowControls.Show Recordset.MoveNext ShownRecords = ShownRecords + 1 Wend TemplateBlock.Parse ccsParseOverwrite End If End Sub 'End weekly Show Method 'weekly PageSize Property Let @75-54E46DD6 Public Property Let PageSize(NewValue) VarPageSize = NewValue DataSource.PageSize = NewValue End Property 'End weekly PageSize Property Let 'weekly PageSize Property Get @75-9AA1D1E9 Public Property Get PageSize() PageSize = VarPageSize End Property 'End weekly PageSize Property Get End Class 'End weekly Class @75-A61BA892 Class clsweeklyDataSource 'weeklyDataSource Class @75-926D252A 'DataSource Variables @75-2819A43F Public Errors, Connection, Parameters, CCSEvents Public Recordset Public SQL, CountSQL, Order, Where, Orders Public PageSize Public PageCount Public AbsolutePage Public Fields Dim WhereParameters Public AllParamsSet Public CmdExecution Private CurrentOperation Private CCSEventResult ' Datasource fields Public article_title Public article_title_param1 Public article_cont 'End DataSource Variables 'DataSource Class_Initialize Event @75-42F5B1ED Private Sub Class_Initialize() Set CCSEvents = CreateObject("Scripting.Dictionary") Set Fields = New clsFields Set Recordset = New clsDataSource Set Recordset.DataSource = Me Set Errors = New clsErrors AllParamsSet = True Set article_title = CCCreateField("article_title", "e_article_title", ccsText, Empty, Recordset) Set article_title_param1 = CCCreateField("article_title_param1", "product_id", ccsText, Empty, Recordset) Set article_cont = CCCreateField("article_cont", "e_article_desc", ccsText, Empty, Recordset) Fields.AddFields Array(article_title, article_title_param1, article_cont) SQL = "SELECT TOP {SqlParam_endRecord} * " & _ "FROM store_editorial_products" CountSQL = "SELECT COUNT(*) " & _ "FROM store_editorial_products" Where = "" Order = "" End Sub 'End DataSource Class_Initialize Event 'BuildTableWhere Method @75-98E5A92F Public Sub BuildTableWhere() End Sub 'End BuildTableWhere Method 'Open Method @75-2FB13144 Function Open(Cmd) Errors.Clear Set Cmd.Connection = Connection Cmd.CommandOperation = cmdOpen Cmd.PageSize = PageSize Cmd.ActivePage = AbsolutePage Cmd.CommandType = dsTable CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect", Me) Cmd.SQL = SQL Cmd.CountSQL = CountSQL Cmd.Where = Where Cmd.OrderBy = Order Cmd.Options("TOP") = True CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteSelect", Me) If Errors.Count = 0 And CCSEventResult Then _ Set Recordset = Cmd.Exec(Errors) CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect", Me) Set Recordset.FieldsCollection = Fields Set Open = Recordset End Function 'End Open Method 'DataSource Class_Terminate Event @75-41B4B08D Private Sub Class_Terminate() If Recordset.State = adStateOpen Then _ Recordset.Close Set Recordset = Nothing Set Parameters = Nothing Set Errors = Nothing End Sub 'End DataSource Class_Terminate Event End Class 'End weeklyDataSource Class @75-A61BA892 Class clsGridreading 'reading Class @32-185140DC 'reading Variables @32-98333259 ' Private variables Private VarPageSize ' Public variables Public ComponentName, CCSEvents Public Visible, Errors Public DataSource Public PageNumber Public Command Public TemplateBlock Public Recordset Private CCSEventResult ' Grid Controls Public StaticControls, RowControls Dim Image1 Dim article_title Dim article_desc 'End reading Variables 'reading Class_Initialize Event @32-95954046 Private Sub Class_Initialize() ComponentName = "reading" Visible = True Set CCSEvents = CreateObject("Scripting.Dictionary") Set Errors = New clsErrors Set DataSource = New clsreadingDataSource Set Command = New clsCommand PageSize = CCGetParam(ComponentName & "PageSize", Empty) If IsNumeric(PageSize) And Len(PageSize) > 0 Then If PageSize <= 0 Then Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageSizeError", Empty)) If PageSize > 100 Then PageSize = 100 End If If NOT IsNumeric(PageSize) OR IsEmpty(PageSize) Then _ PageSize = 10 _ Else _ PageSize = CInt(PageSize) PageNumber = CCGetParam(ComponentName & "Page", 1) If Not IsNumeric(PageNumber) And Len(PageNumber) > 0 Then Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageNumberError", Empty)) PageNumber = 1 ElseIf Len(PageNumber) > 0 Then If PageNumber > 0 Then PageNumber = CInt(PageNumber) Else Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageNumberError", Empty)) PageNumber = 1 End If Else PageNumber = 1 End If Set Image1 = CCCreateControl(ccsImageLink, "Image1", "Image1", ccsText, Empty, CCGetRequestParam("Image1", ccsGet)) Set article_title = CCCreateControl(ccsLink, "article_title", "article_title", ccsText, Empty, CCGetRequestParam("article_title", ccsGet)) article_title.HTML = True Set article_desc = CCCreateControl(ccsLabel, "article_desc", "article_desc", ccsMemo, Empty, CCGetRequestParam("article_desc", ccsGet)) End Sub 'End reading Class_Initialize Event 'reading Initialize Method @32-57CE6952 Sub Initialize(objConnection) If NOT Visible Then Exit Sub Set DataSource.Connection = objConnection DataSource.PageSize = PageSize DataSource.AbsolutePage = PageNumber End Sub 'End reading Initialize Method 'reading Class_Terminate Event @32-E1528F98 Private Sub Class_Terminate() Set DataSource = Nothing Set Command = Nothing Set Errors = Nothing End Sub 'End reading Class_Terminate Event 'reading Show Method @32-31664519 Sub Show(Tpl) If NOT Visible Then Exit Sub Dim RecordCounter, ShownRecords Dim RowBlock With DataSource .Parameters("expr123") = 1 .Parameters("expr136") = 1 End With CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me) Set Recordset = DataSource.Open(Command) Set TemplateBlock = Tpl.Block("Grid " & ComponentName) Set RowBlock = TemplateBlock.Block("Row") Set RowControls = CCCreateCollection(RowBlock, Null, ccsParseAccumulate, _ Array(Image1, article_title, article_desc)) CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If NOT Visible Then Exit Sub Errors.AddErrors DataSource.Errors If Errors.Count > 0 Then TemplateBlock.HTML = CCFormatError("Grid reading", Errors) Else ' Show NoRecords block if no records are found If Recordset.EOF Then TemplateBlock.Block("NoRecords").Parse ccsParseOverwrite End If While NOT Recordset.EOF AND ShownRecords < PageSize Image1.Value = Recordset.Fields("Image1") Image1.Parameters = CCGetQueryString("QueryString", Array("ccsForm")) Image1.Parameters = CCAddParam(Image1.Parameters, "product_id", Recordset.Fields("Image1_param1")) Image1.Page = "enProductDetail.asp" article_title.Value = Recordset.Fields("article_title") article_title.Link = "" article_title.Parameters = CCAddParam(article_title.Parameters, "product_id", Recordset.Fields("article_title_param1")) article_title.Page = "enProductDetail.asp" article_desc.Value = Recordset.Fields("article_desc") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShowRow", Me) RowControls.Show Recordset.MoveNext ShownRecords = ShownRecords + 1 Wend TemplateBlock.Parse ccsParseOverwrite End If End Sub 'End reading Show Method 'reading PageSize Property Let @32-54E46DD6 Public Property Let PageSize(NewValue) VarPageSize = NewValue DataSource.PageSize = NewValue End Property 'End reading PageSize Property Let 'reading PageSize Property Get @32-9AA1D1E9 Public Property Get PageSize() PageSize = VarPageSize End Property 'End reading PageSize Property Get End Class 'End reading Class @32-A61BA892 Class clsreadingDataSource 'readingDataSource Class @32-AD61E715 'DataSource Variables @32-C31B77F0 Public Errors, Connection, Parameters, CCSEvents Public Recordset Public SQL, CountSQL, Order, Where, Orders Public PageSize Public PageCount Public AbsolutePage Public Fields Dim WhereParameters Public AllParamsSet Public CmdExecution Private CurrentOperation Private CCSEventResult ' Datasource fields Public Image1 Public Image1_param1 Public article_title Public article_title_param1 Public article_desc 'End DataSource Variables 'DataSource Class_Initialize Event @32-A58C7698 Private Sub Class_Initialize() Set CCSEvents = CreateObject("Scripting.Dictionary") Set Fields = New clsFields Set Recordset = New clsDataSource Set Recordset.DataSource = Me Set Errors = New clsErrors AllParamsSet = True Set Image1 = CCCreateField("Image1", "image_url", ccsText, Empty, Recordset) Set Image1_param1 = CCCreateField("Image1_param1", "product_id", ccsText, Empty, Recordset) Set article_title = CCCreateField("article_title", "e_product_name", ccsText, Empty, Recordset) Set article_title_param1 = CCCreateField("article_title_param1", "product_id", ccsText, Empty, Recordset) Set article_desc = CCCreateField("article_desc", "e_short_description", ccsMemo, Empty, Recordset) Fields.AddFields Array(Image1, Image1_param1, article_title, article_title_param1, article_desc) Set Parameters = Server.CreateObject("Scripting.Dictionary") Set WhereParameters = Nothing SQL = "SELECT TOP {SqlParam_endRecord} * " & _ "FROM store_products" CountSQL = "SELECT COUNT(*) " & _ "FROM store_products" Where = "" Order = "" End Sub 'End DataSource Class_Initialize Event 'BuildTableWhere Method @32-30500F69 Public Sub BuildTableWhere() Dim WhereParams If Not WhereParameters Is Nothing Then _ Exit Sub Set WhereParameters = new clsSQLParameters With WhereParameters Set .Connection = Connection Set .ParameterSources = Parameters Set .DataSource = Me .AddParameter 1, "expr123", ccsInteger, Empty, Empty, 1, False .AddParameter 2, "expr136", ccsInteger, Empty, Empty, Empty, False .Criterion(1) = .Operation(opEqual, False, "is_bestselling", .getParamByID(1)) .Criterion(2) = .Operation(opEqual, False, "e_is_visible", .getParamByID(2)) .AssembledWhere = .opAND(False, .Criterion(1), .Criterion(2)) WhereParams = .AssembledWhere If Len(Where) > 0 Then If Len(WhereParams) > 0 Then _ Where = Where & " AND " & WhereParams Else If Len(WhereParams) > 0 Then _ Where = WhereParams End If End With End Sub 'End BuildTableWhere Method 'Open Method @32-192E38F9 Function Open(Cmd) Errors.Clear Set Cmd.Connection = Connection Cmd.CommandOperation = cmdOpen Cmd.PageSize = PageSize Cmd.ActivePage = AbsolutePage Cmd.CommandType = dsTable CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect", Me) Cmd.SQL = SQL Cmd.CountSQL = CountSQL BuildTableWhere Cmd.Where = Where Cmd.OrderBy = Order Cmd.Options("TOP") = True CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteSelect", Me) If Errors.Count = 0 And CCSEventResult Then _ Set Recordset = Cmd.Exec(Errors) CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect", Me) Set Recordset.FieldsCollection = Fields Set Open = Recordset End Function 'End Open Method 'DataSource Class_Terminate Event @32-41B4B08D Private Sub Class_Terminate() If Recordset.State = adStateOpen Then _ Recordset.Close Set Recordset = Nothing Set Parameters = Nothing Set Errors = Nothing End Sub 'End DataSource Class_Terminate Event End Class 'End readingDataSource Class @32-A61BA892 Class clsGridnotable 'notable Class @87-5607918F 'notable Variables @87-36BA55C9 ' Private variables Private VarPageSize ' Public variables Public ComponentName, CCSEvents Public Visible, Errors Public DataSource Public PageNumber Public Command Public TemplateBlock Public Recordset Private CCSEventResult ' Grid Controls Public StaticControls, RowControls Dim image_url Dim article_title Dim article_desc 'End notable Variables 'notable Class_Initialize Event @87-4ED8E7F4 Private Sub Class_Initialize() ComponentName = "notable" Visible = True Set CCSEvents = CreateObject("Scripting.Dictionary") Set Errors = New clsErrors Set DataSource = New clsnotableDataSource Set Command = New clsCommand PageSize = CCGetParam(ComponentName & "PageSize", Empty) If IsNumeric(PageSize) And Len(PageSize) > 0 Then If PageSize <= 0 Then Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageSizeError", Empty)) If PageSize > 100 Then PageSize = 100 End If If NOT IsNumeric(PageSize) OR IsEmpty(PageSize) Then _ PageSize = 10 _ Else _ PageSize = CInt(PageSize) PageNumber = CCGetParam(ComponentName & "Page", 1) If Not IsNumeric(PageNumber) And Len(PageNumber) > 0 Then Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageNumberError", Empty)) PageNumber = 1 ElseIf Len(PageNumber) > 0 Then If PageNumber > 0 Then PageNumber = CInt(PageNumber) Else Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageNumberError", Empty)) PageNumber = 1 End If Else PageNumber = 1 End If Set image_url = CCCreateControl(ccsImageLink, "image_url", "image_url", ccsText, Empty, CCGetRequestParam("image_url", ccsGet)) image_url.HTML = True Set article_title = CCCreateControl(ccsLink, "article_title", "article_title", ccsText, Empty, CCGetRequestParam("article_title", ccsGet)) article_title.HTML = True Set article_desc = CCCreateControl(ccsLabel, "article_desc", "article_desc", ccsMemo, Empty, CCGetRequestParam("article_desc", ccsGet)) End Sub 'End notable Class_Initialize Event 'notable Initialize Method @87-57CE6952 Sub Initialize(objConnection) If NOT Visible Then Exit Sub Set DataSource.Connection = objConnection DataSource.PageSize = PageSize DataSource.AbsolutePage = PageNumber End Sub 'End notable Initialize Method 'notable Class_Terminate Event @87-E1528F98 Private Sub Class_Terminate() Set DataSource = Nothing Set Command = Nothing Set Errors = Nothing End Sub 'End notable Class_Terminate Event 'notable Show Method @87-9343EDF8 Sub Show(Tpl) If NOT Visible Then Exit Sub Dim RecordCounter, ShownRecords Dim RowBlock With DataSource .Parameters("expr129") = 1 .Parameters("expr135") = 1 End With CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me) Set Recordset = DataSource.Open(Command) Set TemplateBlock = Tpl.Block("Grid " & ComponentName) Set RowBlock = TemplateBlock.Block("Row") Set RowControls = CCCreateCollection(RowBlock, Null, ccsParseAccumulate, _ Array(image_url, article_title, article_desc)) CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If NOT Visible Then Exit Sub Errors.AddErrors DataSource.Errors If Errors.Count > 0 Then TemplateBlock.HTML = CCFormatError("Grid notable", Errors) Else ' Show NoRecords block if no records are found If Recordset.EOF Then TemplateBlock.Block("NoRecords").Parse ccsParseOverwrite End If While NOT Recordset.EOF AND ShownRecords < PageSize image_url.Value = Recordset.Fields("image_url") image_url.Parameters = CCGetQueryString("QueryString", Array("ccsForm")) image_url.Parameters = CCAddParam(image_url.Parameters, "product_id", Recordset.Fields("image_url_param1")) image_url.Page = "enProductDetail.asp" article_title.Value = Recordset.Fields("article_title") article_title.Link = "" article_title.Parameters = CCAddParam(article_title.Parameters, "product_id", Recordset.Fields("article_title_param1")) article_title.Page = "enProductDetail.asp" article_desc.Value = Recordset.Fields("article_desc") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShowRow", Me) RowControls.Show Recordset.MoveNext ShownRecords = ShownRecords + 1 Wend TemplateBlock.Parse ccsParseOverwrite End If End Sub 'End notable Show Method 'notable PageSize Property Let @87-54E46DD6 Public Property Let PageSize(NewValue) VarPageSize = NewValue DataSource.PageSize = NewValue End Property 'End notable PageSize Property Let 'notable PageSize Property Get @87-9AA1D1E9 Public Property Get PageSize() PageSize = VarPageSize End Property 'End notable PageSize Property Get End Class 'End notable Class @87-A61BA892 Class clsnotableDataSource 'notableDataSource Class @87-7B437B41 'DataSource Variables @87-3C517C10 Public Errors, Connection, Parameters, CCSEvents Public Recordset Public SQL, CountSQL, Order, Where, Orders Public PageSize Public PageCount Public AbsolutePage Public Fields Dim WhereParameters Public AllParamsSet Public CmdExecution Private CurrentOperation Private CCSEventResult ' Datasource fields Public image_url Public image_url_param1 Public article_title Public article_title_param1 Public article_desc 'End DataSource Variables 'DataSource Class_Initialize Event @87-0FA05FB3 Private Sub Class_Initialize() Set CCSEvents = CreateObject("Scripting.Dictionary") Set Fields = New clsFields Set Recordset = New clsDataSource Set Recordset.DataSource = Me Set Errors = New clsErrors AllParamsSet = True Set image_url = CCCreateField("image_url", "image_url", ccsText, Empty, Recordset) Set image_url_param1 = CCCreateField("image_url_param1", "product_id", ccsText, Empty, Recordset) Set article_title = CCCreateField("article_title", "e_product_name", ccsText, Empty, Recordset) Set article_title_param1 = CCCreateField("article_title_param1", "product_id", ccsText, Empty, Recordset) Set article_desc = CCCreateField("article_desc", "e_short_description", ccsMemo, Empty, Recordset) Fields.AddFields Array(image_url, image_url_param1, article_title, article_title_param1, article_desc) Set Parameters = Server.CreateObject("Scripting.Dictionary") Set WhereParameters = Nothing SQL = "SELECT TOP {SqlParam_endRecord} * " & _ "FROM store_products" CountSQL = "SELECT COUNT(*) " & _ "FROM store_products" Where = "" Order = "" End Sub 'End DataSource Class_Initialize Event 'BuildTableWhere Method @87-E42574B3 Public Sub BuildTableWhere() Dim WhereParams If Not WhereParameters Is Nothing Then _ Exit Sub Set WhereParameters = new clsSQLParameters With WhereParameters Set .Connection = Connection Set .ParameterSources = Parameters Set .DataSource = Me .AddParameter 1, "expr129", ccsInteger, Empty, Empty, 1, False .AddParameter 2, "expr135", ccsInteger, Empty, Empty, Empty, False .Criterion(1) = .Operation(opEqual, False, "is_toimprove", .getParamByID(1)) .Criterion(2) = .Operation(opEqual, False, "e_is_visible", .getParamByID(2)) .AssembledWhere = .opAND(False, .Criterion(1), .Criterion(2)) WhereParams = .AssembledWhere If Len(Where) > 0 Then If Len(WhereParams) > 0 Then _ Where = Where & " AND " & WhereParams Else If Len(WhereParams) > 0 Then _ Where = WhereParams End If End With End Sub 'End BuildTableWhere Method 'Open Method @87-192E38F9 Function Open(Cmd) Errors.Clear Set Cmd.Connection = Connection Cmd.CommandOperation = cmdOpen Cmd.PageSize = PageSize Cmd.ActivePage = AbsolutePage Cmd.CommandType = dsTable CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect", Me) Cmd.SQL = SQL Cmd.CountSQL = CountSQL BuildTableWhere Cmd.Where = Where Cmd.OrderBy = Order Cmd.Options("TOP") = True CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteSelect", Me) If Errors.Count = 0 And CCSEventResult Then _ Set Recordset = Cmd.Exec(Errors) CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect", Me) Set Recordset.FieldsCollection = Fields Set Open = Recordset End Function 'End Open Method 'DataSource Class_Terminate Event @87-41B4B08D Private Sub Class_Terminate() If Recordset.State = adStateOpen Then _ Recordset.Close Set Recordset = Nothing Set Parameters = Nothing Set Errors = Nothing End Sub 'End DataSource Class_Terminate Event End Class 'End notableDataSource Class @87-A61BA892 Class clsGridrecommend 'recommend Class @28-B2C01EEF 'recommend Variables @28-28594C9D ' Private variables Private VarPageSize ' Public variables Public ComponentName, CCSEvents Public Visible, Errors Public DataSource Public PageNumber Public Command Public TemplateBlock Public Recordset Private CCSEventResult ' Grid Controls Public StaticControls, RowControls Dim article_title Dim image_url Dim Price 'End recommend Variables 'recommend Class_Initialize Event @28-6F7A6438 Private Sub Class_Initialize() ComponentName = "recommend" Visible = True Set CCSEvents = CreateObject("Scripting.Dictionary") Set Errors = New clsErrors Set DataSource = New clsrecommendDataSource Set Command = New clsCommand PageSize = CCGetParam(ComponentName & "PageSize", Empty) If IsNumeric(PageSize) And Len(PageSize) > 0 Then If PageSize <= 0 Then Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageSizeError", Empty)) If PageSize > 100 Then PageSize = 100 End If If NOT IsNumeric(PageSize) OR IsEmpty(PageSize) Then _ PageSize = 10 _ Else _ PageSize = CInt(PageSize) PageNumber = CCGetParam(ComponentName & "Page", 1) If Not IsNumeric(PageNumber) And Len(PageNumber) > 0 Then Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageNumberError", Empty)) PageNumber = 1 ElseIf Len(PageNumber) > 0 Then If PageNumber > 0 Then PageNumber = CInt(PageNumber) Else Errors.AddError(CCSRunTimeMessages.GetMessage("GridPageNumberError", Empty)) PageNumber = 1 End If Else PageNumber = 1 End If Set article_title = CCCreateControl(ccsLink, "article_title", "article_title", ccsText, Empty, CCGetRequestParam("article_title", ccsGet)) article_title.HTML = True Set image_url = CCCreateControl(ccsImageLink, "image_url", "image_url", ccsText, Empty, CCGetRequestParam("image_url", ccsGet)) image_url.HTML = True Set Price = CCCreateControl(ccsLabel, "Price", "Price", ccsFloat, Array(False, 0, True, False, False, "", " Euro", 1, True, ""), CCGetRequestParam("Price", ccsGet)) End Sub 'End recommend Class_Initialize Event 'recommend Initialize Method @28-57CE6952 Sub Initialize(objConnection) If NOT Visible Then Exit Sub Set DataSource.Connection = objConnection DataSource.PageSize = PageSize DataSource.AbsolutePage = PageNumber End Sub 'End recommend Initialize Method 'recommend Class_Terminate Event @28-E1528F98 Private Sub Class_Terminate() Set DataSource = Nothing Set Command = Nothing Set Errors = Nothing End Sub 'End recommend Class_Terminate Event 'recommend Show Method @28-C264686E Sub Show(Tpl) If NOT Visible Then Exit Sub Dim RecordCounter, ShownRecords Dim RowBlock With DataSource .Parameters("expr137") = 1 End With CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me) Set Recordset = DataSource.Open(Command) Set TemplateBlock = Tpl.Block("Grid " & ComponentName) Set RowBlock = TemplateBlock.Block("Row") Set RowControls = CCCreateCollection(RowBlock, Null, ccsParseAccumulate, _ Array(article_title, image_url, Price)) CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If NOT Visible Then Exit Sub Errors.AddErrors DataSource.Errors If Errors.Count > 0 Then TemplateBlock.HTML = CCFormatError("Grid recommend", Errors) Else ' Show NoRecords block if no records are found If Recordset.EOF Then TemplateBlock.Block("NoRecords").Parse ccsParseOverwrite End If While NOT Recordset.EOF AND ShownRecords < PageSize article_title.Value = Recordset.Fields("article_title") article_title.Link = "" article_title.Parameters = CCAddParam(article_title.Parameters, "product_id", Recordset.Fields("article_title_param1")) article_title.Page = "enProductDetail.asp" image_url.Value = Recordset.Fields("image_url") image_url.Parameters = CCGetQueryString("QueryString", Array("ccsForm")) image_url.Parameters = CCAddParam(image_url.Parameters, "product_id", Recordset.Fields("image_url_param1")) image_url.Page = "enProductDetail.asp" Price.Value = Recordset.Fields("Price") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShowRow", Me) RowControls.Show Recordset.MoveNext ShownRecords = ShownRecords + 1 Wend TemplateBlock.Parse ccsParseOverwrite End If End Sub 'End recommend Show Method 'recommend PageSize Property Let @28-54E46DD6 Public Property Let PageSize(NewValue) VarPageSize = NewValue DataSource.PageSize = NewValue End Property 'End recommend PageSize Property Let 'recommend PageSize Property Get @28-9AA1D1E9 Public Property Get PageSize() PageSize = VarPageSize End Property 'End recommend PageSize Property Get End Class 'End recommend Class @28-A61BA892 Class clsrecommendDataSource 'recommendDataSource Class @28-4E1CC834 'DataSource Variables @28-480ACE5D Public Errors, Connection, Parameters, CCSEvents Public Recordset Public SQL, CountSQL, Order, Where, Orders Public PageSize Public PageCount Public AbsolutePage Public Fields Dim WhereParameters Public AllParamsSet Public CmdExecution Private CurrentOperation Private CCSEventResult ' Datasource fields Public article_title Public article_title_param1 Public image_url Public image_url_param1 Public Price 'End DataSource Variables 'DataSource Class_Initialize Event @28-5CC888E5 Private Sub Class_Initialize() Set CCSEvents = CreateObject("Scripting.Dictionary") Set Fields = New clsFields Set Recordset = New clsDataSource Set Recordset.DataSource = Me Set Errors = New clsErrors AllParamsSet = True Set article_title = CCCreateField("article_title", "e_product_name", ccsText, Empty, Recordset) Set article_title_param1 = CCCreateField("article_title_param1", "product_id", ccsText, Empty, Recordset) Set image_url = CCCreateField("image_url", "image_url", ccsText, Empty, Recordset) Set image_url_param1 = CCCreateField("image_url_param1", "product_id", ccsText, Empty, Recordset) Set Price = CCCreateField("Price", "e_price", ccsFloat, Empty, Recordset) Fields.AddFields Array(article_title, article_title_param1, image_url, image_url_param1, Price) Set Parameters = Server.CreateObject("Scripting.Dictionary") Set WhereParameters = Nothing SQL = "SELECT TOP {SqlParam_endRecord} * " & _ "FROM store_products" CountSQL = "SELECT COUNT(*) " & _ "FROM store_products" Where = "" Order = "" End Sub 'End DataSource Class_Initialize Event 'BuildTableWhere Method @28-867367DA Public Sub BuildTableWhere() Dim WhereParams If Not WhereParameters Is Nothing Then _ Exit Sub Set WhereParameters = new clsSQLParameters With WhereParameters Set .Connection = Connection Set .ParameterSources = Parameters Set .DataSource = Me .AddParameter 2, "expr137", ccsInteger, Empty, Empty, Empty, False .Criterion(1) = "(is_recommended=1)" .Criterion(2) = .Operation(opEqual, False, "e_is_visible", .getParamByID(2)) .AssembledWhere = .opAND(False, .Criterion(1), .Criterion(2)) WhereParams = .AssembledWhere If Len(Where) > 0 Then If Len(WhereParams) > 0 Then _ Where = Where & " AND " & WhereParams Else If Len(WhereParams) > 0 Then _ Where = WhereParams End If End With End Sub 'End BuildTableWhere Method 'Open Method @28-192E38F9 Function Open(Cmd) Errors.Clear Set Cmd.Connection = Connection Cmd.CommandOperation = cmdOpen Cmd.PageSize = PageSize Cmd.ActivePage = AbsolutePage Cmd.CommandType = dsTable CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect", Me) Cmd.SQL = SQL Cmd.CountSQL = CountSQL BuildTableWhere Cmd.Where = Where Cmd.OrderBy = Order Cmd.Options("TOP") = True CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteSelect", Me) If Errors.Count = 0 And CCSEventResult Then _ Set Recordset = Cmd.Exec(Errors) CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect", Me) Set Recordset.FieldsCollection = Fields Set Open = Recordset End Function 'End Open Method 'DataSource Class_Terminate Event @28-41B4B08D Private Sub Class_Terminate() If Recordset.State = adStateOpen Then _ Recordset.Close Set Recordset = Nothing Set Parameters = Nothing Set Errors = Nothing End Sub 'End DataSource Class_Terminate Event End Class 'End recommendDataSource Class @28-A61BA892 'Include Page Implementation @2-DAFDA2F0 %> <% 'End Include Page Implementation 'Include Page Implementation @3-E2ECDA17 %> <% 'End Include Page Implementation %>