<%@ CodePage=1252 %> <% 'Include Common Files @1-07AFC038 %> <% 'End Include Common Files 'Initialize Page @1-639819CD ' Variables Dim PathToRoot, ScriptPath, TemplateFilePath Dim FileName Dim Redirect Dim IsService Dim Tpl, HTMLTemplate Dim TemplateFileName Dim ComponentName Dim PathToCurrentPage Dim Attributes ' Events Dim CCSEvents Dim CCSEventResult ' Connections Dim DBInternet ' Page controls Dim Header Dim store_categories Dim Label1 Dim Label2 Dim Category_Desc Dim image_url Dim store_products Dim Footer Dim ChildControls Response.ContentType = CCSContentType IsService = False Redirect = "" TemplateFileName = "poles.html" Set CCSEvents = CreateObject("Scripting.Dictionary") PathToCurrentPage = "./" FileName = "poles.asp" PathToRoot = "./" ScriptPath = Left(Request.ServerVariables("PATH_TRANSLATED"), Len(Request.ServerVariables("PATH_TRANSLATED")) - Len(FileName)) TemplateFilePath = ScriptPath 'End Initialize Page 'Initialize Objects @1-23C59953 BindEvents "Page" CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeInitialize", Nothing) Set DBInternet = New clsDBInternet DBInternet.Open Set Attributes = New clsAttributes Attributes("pathToRoot") = PathToRoot ' Controls Set Header = New clsHeader Set Header.Attributes = Attributes Header.Initialize "Header", "" Set store_categories = New clsGridstore_categories Set Label1 = CCCreateControl(ccsLabel, "Label1", Empty, ccsText, Empty, CCGetRequestParam("Label1", ccsGet)) Label1.HTML = True Set Label2 = CCCreateControl(ccsLabel, "Label2", Empty, ccsText, Empty, CCGetRequestParam("Label2", ccsGet)) Set Category_Desc = CCCreateControl(ccsLabel, "Category_Desc", Empty, ccsText, Empty, CCGetRequestParam("Category_Desc", ccsGet)) Category_Desc.HTML = True Set image_url = CCCreateControl(ccsLabel, "image_url", Empty, ccsText, Empty, CCGetRequestParam("image_url", ccsGet)) image_url.HTML = True Set store_products = New clsGridstore_products Set Footer = New clsFooter Set Footer.Attributes = Attributes Footer.Initialize "Footer", "" store_categories.Initialize DBInternet store_products.Initialize DBInternet ' Events %> <% BindEvents Empty CCSEventResult = CCRaiseEvent(CCSEvents, "AfterInitialize", Nothing) 'End Initialize Objects 'Execute Components @1-3DAD5F6C Header.Operations 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-2E9DB4BC CCSEventResult = CCRaiseEvent(CCSEvents, "OnInitializeView", Nothing) Set HTMLTemplate = new clsTemplate Set HTMLTemplate.Cache = TemplatesRepository HTMLTemplate.LoadTemplate TemplateFilePath & TemplateFileName HTMLTemplate.SetVar "@CCS_PathToRoot", PathToRoot Set Tpl = HTMLTemplate.Block("main") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Nothing) 'End Initialize HTML Template 'Show Page @1-AF72E256 Attributes.Show HTMLTemplate, "page:" Set ChildControls = CCCreateCollection(Tpl, Null, ccsParseOverwrite, _ Array(Header, store_categories, Label1, Label2, Category_Desc, image_url, store_products, Footer)) ChildControls.Show Dim MainHTML HTMLTemplate.Parse "main", False If IsEmpty(MainHTML) Then MainHTML = HTMLTemplate.GetHTML("main") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeOutput", Nothing) If CCSEventResult Then Response.Write MainHTML 'End Show Page 'Unload Page @1-CB210C62 UnloadPage Set Tpl = Nothing Set HTMLTemplate = Nothing 'End Unload Page 'UnloadPage Sub @1-20B41671 Sub UnloadPage() CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeUnload", Nothing) If DBInternet.State = adStateOpen Then _ DBInternet.Close Set DBInternet = Nothing Set CCSEvents = Nothing Set Attributes = Nothing Header.UnloadPage Set Header = Nothing Set store_categories = Nothing Set store_products = Nothing Footer.UnloadPage Set Footer = Nothing End Sub 'End UnloadPage Sub Class clsGridstore_categories 'store_categories Class @29-DDA41760 'store_categories Variables @29-EAB83BE8 ' Private variables Private VarPageSize ' Public variables Public ComponentName, CCSEvents Public Visible, Errors Public DataSource Public PageNumber Public Command Public TemplateBlock Public IsDSEmpty Public ForceIteration Public Attributes Private ShownRecords Public Recordset Private CCSEventResult ' Grid Controls Public StaticControls, RowControls, NoRecordsControls Public AltRowControls Public RenderAltRow Dim category_name Dim category_parent_id Dim category_id Dim Alt_category_name Dim Alt_category_parent_id Dim Alt_category_id Dim Navigator 'End store_categories Variables 'store_categories Class_Initialize Event @29-956F7E2E Private Sub Class_Initialize() ComponentName = "store_categories" Visible = True Set CCSEvents = CreateObject("Scripting.Dictionary") Set Attributes = New clsAttributes RenderAltRow = False Set Errors = New clsErrors Set DataSource = New clsstore_categoriesDataSource Set Command = New clsCommand PageSize = CCGetParam(ComponentName & "PageSize", Empty) If IsNumeric(PageSize) And Len(PageSize) > 0 Then If PageSize <= 0 Then Errors.AddError(CCSLocales.GetText("CCS_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(CCSLocales.GetText("CCS_GridPageNumberError", Empty)) PageNumber = 1 ElseIf Len(PageNumber) > 0 Then If PageNumber > 0 Then PageNumber = CLng(PageNumber) Else Errors.AddError(CCSLocales.GetText("CCS_GridPageNumberError", Empty)) PageNumber = 1 End If Else PageNumber = 1 End If Set category_name = CCCreateControl(ccsLink, "category_name", Empty, ccsText, Empty, CCGetRequestParam("category_name", ccsGet)) Set category_parent_id = CCCreateControl(ccsHidden, "category_parent_id", Empty, ccsInteger, Empty, CCGetRequestParam("category_parent_id", ccsGet)) Set category_id = CCCreateControl(ccsHidden, "category_id", Empty, ccsInteger, Empty, CCGetRequestParam("category_id", ccsGet)) Set Alt_category_name = CCCreateControl(ccsLink, "Alt_category_name", Empty, ccsText, Empty, CCGetRequestParam("Alt_category_name", ccsGet)) Set Alt_category_parent_id = CCCreateControl(ccsHidden, "Alt_category_parent_id", Empty, ccsInteger, Empty, CCGetRequestParam("Alt_category_parent_id", ccsGet)) Set Alt_category_id = CCCreateControl(ccsHidden, "Alt_category_id", Empty, ccsInteger, Empty, CCGetRequestParam("Alt_category_id", ccsGet)) Set Navigator = CCCreateNavigator(ComponentName, "Navigator", FileName, 10, tpSimple) Navigator.PageSizes = Array("1", "5", "10", "25", "50") IsDSEmpty = True End Sub 'End store_categories Class_Initialize Event 'store_categories Initialize Method @29-57CE6952 Sub Initialize(objConnection) If NOT Visible Then Exit Sub Set DataSource.Connection = objConnection DataSource.PageSize = PageSize DataSource.AbsolutePage = PageNumber End Sub 'End store_categories Initialize Method 'store_categories Class_Terminate Event @29-B97CC660 Private Sub Class_Terminate() Set CCSEvents = Nothing Set DataSource = Nothing Set Command = Nothing Set Errors = Nothing Set Attributes = Nothing End Sub 'End store_categories Class_Terminate Event 'store_categories Show Method @29-CB7F762B Sub Show(Tpl) Dim HasNext If NOT Visible Then Exit Sub Dim RowBlock, SeparatorBlock, AltRowBlock, NoRecordsBlock With DataSource .Parameters("expr37") = 33 End With CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me) Set Recordset = DataSource.Open(Command) If DataSource.Errors.Count = 0 Then IsDSEmpty = Recordset.EOF Set TemplateBlock = Tpl.Block("Grid " & ComponentName) If TemplateBlock is Nothing Then Exit Sub Set RowBlock = TemplateBlock.Block("Row") Set SeparatorBlock = TemplateBlock.Block("Separator") Set AltRowBlock = TemplateBlock.Block("AltRow") Set NoRecordsBlock = TemplateBlock.Block("NoRecords") Set StaticControls = CCCreateCollection(TemplateBlock, Null, ccsParseOverwrite, _ Array(Navigator)) Navigator.PageSize = PageSize Navigator.SetDataSource Recordset Set RowControls = CCCreateCollection(RowBlock, Null, ccsParseAccumulate, _ Array(category_name, category_parent_id, category_id)) Set AltRowControls = CCCreateCollection(AltRowBlock, RowBlock, ccsParseAccumulate, _ Array(Alt_category_name, Alt_category_parent_id, Alt_category_id)) CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If NOT Visible Then Exit Sub RowControls.PreserveControlsVisible AltRowControls.PreserveControlsVisible Errors.AddErrors DataSource.Errors If Errors.Count > 0 Then TemplateBlock.HTML = CCFormatError("Grid " & ComponentName, Errors) Else ' Show NoRecords block if no records are found If Recordset.EOF Then Attributes.Show TemplateBlock, "store_categories:" TemplateBlock.Block("NoRecords").Parse ccsParseOverwrite End If HasNext = HasNextRow() ForceIteration = False Do While ForceIteration Or HasNext Attributes("rowNumber") = ShownRecords + 1 If RenderAltRow Then If HasNext Then Alt_category_name.Value = Recordset.Fields("Alt_category_name") Alt_category_name.Link = "" Alt_category_name.Parameters = CCAddParam(Alt_category_name.Parameters, "category_id", Recordset.Fields("Alt_category_name_param1")) Alt_category_name.Page = "poles.asp" Alt_category_parent_id.Value = Recordset.Fields("Alt_category_parent_id") Alt_category_id.Value = Recordset.Fields("Alt_category_id") End If CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShowRow", Me) Attributes.Show TemplateBlock.Block("AltRow"), "store_categories:" AltRowControls.Show Else If HasNext Then 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 = "poles.asp" category_parent_id.Value = Recordset.Fields("category_parent_id") category_id.Value = Recordset.Fields("category_id") End If CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShowRow", Me) Attributes.Show TemplateBlock.Block("Row"), "store_categories:" RowControls.Show End If RenderAltRow = NOT RenderAltRow If HasNext Then Recordset.MoveNext ShownRecords = ShownRecords + 1 ' Parse Separator If NOT Recordset.EOF AND ShownRecords < PageSize Then _ SeparatorBlock.ParseTo ccsParseAccumulate, RowBlock HasNext = HasNextRow() Loop Attributes.Show TemplateBlock, "store_categories:" StaticControls.Show End If End Sub 'End store_categories Show Method 'store_categories PageSize Property Let @29-54E46DD6 Public Property Let PageSize(NewValue) VarPageSize = NewValue DataSource.PageSize = NewValue End Property 'End store_categories PageSize Property Let 'store_categories PageSize Property Get @29-9AA1D1E9 Public Property Get PageSize() PageSize = VarPageSize End Property 'End store_categories PageSize Property Get 'store_categories RowNumber Property Get @29-F32EE2C6 Public Property Get RowNumber() RowNumber = ShownRecords + 1 End Property 'End store_categories RowNumber Property Get 'store_categories HasNextRow Function @29-9BECE27A Public Function HasNextRow() HasNextRow = NOT Recordset.EOF AND ShownRecords < PageSize End Function 'End store_categories HasNextRow Function End Class 'End store_categories Class @29-A61BA892 Class clsstore_categoriesDataSource 'store_categoriesDataSource Class @29-CBA08391 'DataSource Variables @29-456D8B4F Public Errors, Connection, Parameters, CCSEvents Public Recordset Public SQL, CountSQL, Order, Where, Orders, StaticOrder Public PageSize Public PageCount Public AbsolutePage Public Fields Dim WhereParameters Public AllParamsSet Public CmdExecution Public InsertOmitIfEmpty Public UpdateOmitIfEmpty Private CurrentOperation Private CCSEventResult ' Datasource fields Public category_name Public category_name_param1 Public category_parent_id Public category_id Public Alt_category_name Public Alt_category_name_param1 Public Alt_category_parent_id Public Alt_category_id 'End DataSource Variables 'DataSource Class_Initialize Event @29-F552A17F 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 Set Connection = Nothing AllParamsSet = True Set category_name = CCCreateField("category_name", "category_name", ccsText, Empty, Recordset) Set category_name_param1 = CCCreateField("category_name_param1", "category_id", ccsText, Empty, Recordset) Set category_parent_id = CCCreateField("category_parent_id", "category_parent_id", ccsInteger, Empty, Recordset) Set category_id = CCCreateField("category_id", "category_id", ccsInteger, Empty, Recordset) Set Alt_category_name = CCCreateField("Alt_category_name", "category_name", ccsText, Empty, Recordset) Set Alt_category_name_param1 = CCCreateField("Alt_category_name_param1", "category_id", ccsText, Empty, Recordset) Set Alt_category_parent_id = CCCreateField("Alt_category_parent_id", "category_parent_id", ccsInteger, Empty, Recordset) Set Alt_category_id = CCCreateField("Alt_category_id", "category_id", ccsInteger, Empty, Recordset) Fields.AddFields Array(category_name, category_name_param1, category_parent_id, category_id, Alt_category_name, Alt_category_name_param1, Alt_category_parent_id, Alt_category_id) Set Parameters = Server.CreateObject("Scripting.Dictionary") Set WhereParameters = Nothing SQL = "SELECT TOP {SqlParam_endRecord} * " & vbLf & _ "FROM store_categories {SQL_Where} {SQL_OrderBy}" CountSQL = "SELECT COUNT(*) " & vbLf & _ "FROM store_categories" Where = "" Order = "category_id" StaticOrder = "" End Sub 'End DataSource Class_Initialize Event 'BuildTableWhere Method @29-9E3965E4 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, "expr37", ccsInteger, Empty, Empty, Empty, False .Criterion(1) = .Operation(opEqual, False, "category_parent_id", .getParamByID(1)) .AssembledWhere = .Criterion(1) 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 @29-40984FC5 Function Open(Cmd) Errors.Clear If Connection Is Nothing Then Set Open = New clsEmptyDataSource Exit Function End If 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 If(Len(StaticOrder)>0) Then If Len(Order)>0 Then Cmd.OrderBy = ", "+Cmd.OrderBy Cmd.OrderBy = StaticOrder + Cmd.OrderBy End If 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 @29-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 store_categoriesDataSource Class @29-A61BA892 Class clsGridstore_products 'store_products Class @9-1AA57E19 'store_products Variables @9-A9387C3A ' Private variables Private VarPageSize ' Public variables Public ComponentName, CCSEvents Public Visible, Errors Public DataSource Public PageNumber Public Command Public TemplateBlock Public IsDSEmpty Public ForceIteration Public Attributes Private ShownRecords Public Recordset Private CCSEventResult ' Grid Controls Public StaticControls, RowControls, NoRecordsControls Public AltRowControls Public RenderAltRow 'End store_products Variables 'store_products Class_Initialize Event @9-9223EDBB Private Sub Class_Initialize() ComponentName = "store_products" Visible = True Set CCSEvents = CreateObject("Scripting.Dictionary") Set Attributes = New clsAttributes RenderAltRow = False Set Errors = New clsErrors Set DataSource = New clsstore_productsDataSource Set Command = New clsCommand PageSize = CCGetParam(ComponentName & "PageSize", Empty) If IsNumeric(PageSize) And Len(PageSize) > 0 Then If PageSize <= 0 Then Errors.AddError(CCSLocales.GetText("CCS_GridPageSizeError", Empty)) If PageSize > 100 Then PageSize = 100 End If If NOT IsNumeric(PageSize) OR IsEmpty(PageSize) Then _ PageSize = 5 _ Else _ PageSize = CInt(PageSize) PageNumber = CCGetParam(ComponentName & "Page", 1) If Not IsNumeric(PageNumber) And Len(PageNumber) > 0 Then Errors.AddError(CCSLocales.GetText("CCS_GridPageNumberError", Empty)) PageNumber = 1 ElseIf Len(PageNumber) > 0 Then If PageNumber > 0 Then PageNumber = CLng(PageNumber) Else Errors.AddError(CCSLocales.GetText("CCS_GridPageNumberError", Empty)) PageNumber = 1 End If Else PageNumber = 1 End If IsDSEmpty = True End Sub 'End store_products Class_Initialize Event 'store_products Initialize Method @9-57CE6952 Sub Initialize(objConnection) If NOT Visible Then Exit Sub Set DataSource.Connection = objConnection DataSource.PageSize = PageSize DataSource.AbsolutePage = PageNumber End Sub 'End store_products Initialize Method 'store_products Class_Terminate Event @9-B97CC660 Private Sub Class_Terminate() Set CCSEvents = Nothing Set DataSource = Nothing Set Command = Nothing Set Errors = Nothing Set Attributes = Nothing End Sub 'End store_products Class_Terminate Event 'store_products Show Method @9-EA5597F6 Sub Show(Tpl) Dim HasNext If NOT Visible Then Exit Sub Dim RowBlock, SeparatorBlock, AltRowBlock, NoRecordsBlock With DataSource .Parameters("urlcategory_id") = CCGetRequestParam("category_id", ccsGET) End With CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me) Set Recordset = DataSource.Open(Command) If DataSource.Errors.Count = 0 Then IsDSEmpty = Recordset.EOF Set TemplateBlock = Tpl.Block("Grid " & ComponentName) If TemplateBlock is Nothing Then Exit Sub Set RowBlock = TemplateBlock.Block("Row") Set SeparatorBlock = TemplateBlock.Block("Separator") Set AltRowBlock = TemplateBlock.Block("AltRow") Set NoRecordsBlock = TemplateBlock.Block("NoRecords") CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me) If NOT Visible Then Exit Sub Errors.AddErrors DataSource.Errors If Errors.Count > 0 Then TemplateBlock.HTML = CCFormatError("Grid " & ComponentName, Errors) Else ' Show NoRecords block if no records are found If Recordset.EOF Then Attributes.Show TemplateBlock, "store_products:" TemplateBlock.Block("NoRecords").Parse ccsParseOverwrite End If HasNext = HasNextRow() ForceIteration = False Do While ForceIteration Or HasNext Attributes("rowNumber") = ShownRecords + 1 If RenderAltRow Then CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShowRow", Me) Attributes.Show TemplateBlock.Block("AltRow"), "store_products:" AltRowBlock.Parse ccsParseAccumulate Else CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShowRow", Me) Attributes.Show TemplateBlock.Block("Row"), "store_products:" RowBlock.Parse ccsParseAccumulate End If RenderAltRow = NOT RenderAltRow If HasNext Then Recordset.MoveNext ShownRecords = ShownRecords + 1 ' Parse Separator If NOT Recordset.EOF AND ShownRecords < PageSize Then _ SeparatorBlock.ParseTo ccsParseAccumulate, RowBlock HasNext = HasNextRow() Loop Attributes.Show TemplateBlock, "store_products:" TemplateBlock.Parse ccsParseOverwrite End If End Sub 'End store_products Show Method 'store_products PageSize Property Let @9-54E46DD6 Public Property Let PageSize(NewValue) VarPageSize = NewValue DataSource.PageSize = NewValue End Property 'End store_products PageSize Property Let 'store_products PageSize Property Get @9-9AA1D1E9 Public Property Get PageSize() PageSize = VarPageSize End Property 'End store_products PageSize Property Get 'store_products RowNumber Property Get @9-F32EE2C6 Public Property Get RowNumber() RowNumber = ShownRecords + 1 End Property 'End store_products RowNumber Property Get 'store_products HasNextRow Function @9-9BECE27A Public Function HasNextRow() HasNextRow = NOT Recordset.EOF AND ShownRecords < PageSize End Function 'End store_products HasNextRow Function End Class 'End store_products Class @9-A61BA892 Class clsstore_productsDataSource 'store_productsDataSource Class @9-0319C3B5 'DataSource Variables @9-4752E00F Public Errors, Connection, Parameters, CCSEvents Public Recordset Public SQL, CountSQL, Order, Where, Orders, StaticOrder Public PageSize Public PageCount Public AbsolutePage Public Fields Dim WhereParameters Public AllParamsSet Public CmdExecution Public InsertOmitIfEmpty Public UpdateOmitIfEmpty Private CurrentOperation Private CCSEventResult 'End DataSource Variables 'DataSource Class_Initialize Event @9-8DDB3CA3 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 Set Connection = Nothing AllParamsSet = True Set Parameters = Server.CreateObject("Scripting.Dictionary") Set WhereParameters = Nothing SQL = "SELECT TOP {SqlParam_endRecord} * " & vbLf & _ "FROM store_products {SQL_Where} {SQL_OrderBy}" CountSQL = "SELECT COUNT(*) " & vbLf & _ "FROM store_products" Where = "" Order = "product_id" StaticOrder = "" End Sub 'End DataSource Class_Initialize Event 'BuildTableWhere Method @9-69B452CE 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, "urlcategory_id", ccsInteger, Empty, Empty, Empty, True .Criterion(1) = .Operation(opEqual, False, "category_id", .getParamByID(1)) .AssembledWhere = .Criterion(1) 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 @9-40984FC5 Function Open(Cmd) Errors.Clear If Connection Is Nothing Then Set Open = New clsEmptyDataSource Exit Function End If 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 If(Len(StaticOrder)>0) Then If Len(Order)>0 Then Cmd.OrderBy = ", "+Cmd.OrderBy Cmd.OrderBy = StaticOrder + Cmd.OrderBy End If 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 @9-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 store_productsDataSource Class @9-A61BA892 'Include Page Implementation @2-A598DFC6 %> <% 'End Include Page Implementation 'Include Page Implementation @3-9D89A721 %> <% 'End Include Page Implementation %>