.=< { Star Gans Tq } >=.

  • Home

  • Killme
  • Download
  • Current Path : /home/m/e/h/meharicl/www/recensement2/
    Upload File
    @Command ~ $  
    Current File : /home/m/e/h/meharicl/www/recensement2/recensement_couleurs.php

    <?php
    //Include Common Files @1-C856A4A7
    define("RelativePath", ".");
    define("PathToCurrentPage", "/");
    define("FileName", "recensement_couleurs.php");
    include_once(RelativePath . "/Common.php");
    include_once(RelativePath . "/Template.php");
    include_once(RelativePath . "/Sorter.php");
    include_once(RelativePath . "/Navigator.php");
    //End Include Common Files
    
    class clsGridrec_couleurs { //rec_couleurs class @3-DA686F89
    
    //Variables @3-6E51DF5A
    
        // Public variables
        public $ComponentType = "Grid";
        public $ComponentName;
        public $Visible;
        public $Errors;
        public $ErrorBlock;
        public $ds;
        public $DataSource;
        public $PageSize;
        public $IsEmpty;
        public $ForceIteration = false;
        public $HasRecord = false;
        public $SorterName = "";
        public $SorterDirection = "";
        public $PageNumber;
        public $RowNumber;
        public $ControlsVisible = array();
    
        public $CCSEvents = "";
        public $CCSEventResult;
    
        public $RelativePath = "";
        public $Attributes;
    
        // Grid Controls
        public $StaticControls;
        public $RowControls;
    //End Variables
    
    //Class_Initialize Event @3-E4717AAC
        function clsGridrec_couleurs($RelativePath, & $Parent)
        {
            global $FileName;
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->ComponentName = "rec_couleurs";
            $this->Visible = True;
            $this->Parent = & $Parent;
            $this->RelativePath = $RelativePath;
            $this->Errors = new clsErrors();
            $this->ErrorBlock = "Grid rec_couleurs";
            $this->Attributes = new clsAttributes($this->ComponentName . ":");
            $this->DataSource = new clsrec_couleursDataSource($this);
            $this->ds = & $this->DataSource;
            $this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
            if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
                $this->PageSize = 1000;
            else
                $this->PageSize = intval($this->PageSize);
            if ($this->PageSize > 1000)
                $this->PageSize = 1000;
            if($this->PageSize == 0)
                $this->Errors->addError("<p>Form: Grid " . $this->ComponentName . "<BR>Error: (CCS06) Invalid page size.</p>");
            $this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
            if ($this->PageNumber <= 0) $this->PageNumber = 1;
    
            $this->couleur_id = new clsControl(ccsLink, "couleur_id", "couleur_id", ccsInteger, "", CCGetRequestParam("couleur_id", ccsGet, NULL), $this);
            $this->couleur_id->Page = "";
            $this->couleur_desc = new clsControl(ccsLabel, "couleur_desc", "couleur_desc", ccsText, "", CCGetRequestParam("couleur_desc", ccsGet, NULL), $this);
            $this->rec_couleurs_Insert = new clsControl(ccsLink, "rec_couleurs_Insert", "rec_couleurs_Insert", ccsText, "", CCGetRequestParam("rec_couleurs_Insert", ccsGet, NULL), $this);
            $this->rec_couleurs_Insert->Parameters = CCGetQueryString("QueryString", array("couleur_id", "ccsForm"));
            $this->rec_couleurs_Insert->Page = "recensement_couleurs.php";
        }
    //End Class_Initialize Event
    
    //Initialize Method @3-90E704C5
        function Initialize()
        {
            if(!$this->Visible) return;
    
            $this->DataSource->PageSize = & $this->PageSize;
            $this->DataSource->AbsolutePage = & $this->PageNumber;
            $this->DataSource->SetOrder($this->SorterName, $this->SorterDirection);
        }
    //End Initialize Method
    
    //Show Method @3-6C41CC45
        function Show()
        {
            $Tpl = CCGetTemplate($this);
            global $CCSLocales;
            if(!$this->Visible) return;
    
            $this->RowNumber = 0;
    
    
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
    
    
            $this->DataSource->Prepare();
            $this->DataSource->Open();
            $this->HasRecord = $this->DataSource->has_next_record();
            $this->IsEmpty = ! $this->HasRecord;
            $this->Attributes->Show();
    
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
            if(!$this->Visible) return;
    
            $GridBlock = "Grid " . $this->ComponentName;
            $ParentPath = $Tpl->block_path;
            $Tpl->block_path = $ParentPath . "/" . $GridBlock;
    
    
            if (!$this->IsEmpty) {
                $this->ControlsVisible["couleur_id"] = $this->couleur_id->Visible;
                $this->ControlsVisible["couleur_desc"] = $this->couleur_desc->Visible;
                while ($this->ForceIteration || (($this->RowNumber < $this->PageSize) &&  ($this->HasRecord = $this->DataSource->has_next_record()))) {
                    $this->RowNumber++;
                    if ($this->HasRecord) {
                        $this->DataSource->next_record();
                        $this->DataSource->SetValues();
                    }
                    $Tpl->block_path = $ParentPath . "/" . $GridBlock . "/Row";
                    $this->couleur_id->SetValue($this->DataSource->couleur_id->GetValue());
                    $this->couleur_id->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
                    $this->couleur_id->Parameters = CCAddParam($this->couleur_id->Parameters, "couleur_id", $this->DataSource->f("couleur_id"));
                    $this->couleur_desc->SetValue($this->DataSource->couleur_desc->GetValue());
                    $this->Attributes->SetValue("rowNumber", $this->RowNumber);
                    $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
                    $this->Attributes->Show();
                    $this->couleur_id->Show();
                    $this->couleur_desc->Show();
                    $Tpl->block_path = $ParentPath . "/" . $GridBlock;
                    $Tpl->parse("Row", true);
                }
            }
            else { // Show NoRecords block if no records are found
                $this->Attributes->Show();
                $Tpl->parse("NoRecords", false);
            }
    
            $errors = $this->GetErrors();
            if(strlen($errors))
            {
                $Tpl->replaceblock("", $errors);
                $Tpl->block_path = $ParentPath;
                return;
            }
            $this->rec_couleurs_Insert->Show();
            $Tpl->parse();
            $Tpl->block_path = $ParentPath;
            $this->DataSource->close();
        }
    //End Show Method
    
    //GetErrors Method @3-110E42B1
        function GetErrors()
        {
            $errors = "";
            $errors = ComposeStrings($errors, $this->couleur_id->Errors->ToString());
            $errors = ComposeStrings($errors, $this->couleur_desc->Errors->ToString());
            $errors = ComposeStrings($errors, $this->Errors->ToString());
            $errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
            return $errors;
        }
    //End GetErrors Method
    
    } //End rec_couleurs Class @3-FCB6E20C
    
    class clsrec_couleursDataSource extends clsDBcnxRecensement {  //rec_couleursDataSource Class @3-CED94A87
    
    //DataSource Variables @3-9505E024
        public $Parent = "";
        public $CCSEvents = "";
        public $CCSEventResult;
        public $ErrorBlock;
        public $CmdExecution;
    
        public $CountSQL;
        public $wp;
    
    
        // Datasource fields
        public $couleur_id;
        public $couleur_desc;
    //End DataSource Variables
    
    //DataSourceClass_Initialize Event @3-E1EBD62D
        function clsrec_couleursDataSource(& $Parent)
        {
            $this->Parent = & $Parent;
            $this->ErrorBlock = "Grid rec_couleurs";
            $this->Initialize();
            $this->couleur_id = new clsField("couleur_id", ccsInteger, "");
            
            $this->couleur_desc = new clsField("couleur_desc", ccsText, "");
            
    
        }
    //End DataSourceClass_Initialize Event
    
    //SetOrder Method @3-9E1383D1
        function SetOrder($SorterName, $SorterDirection)
        {
            $this->Order = "";
            $this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection, 
                "");
        }
    //End SetOrder Method
    
    //Prepare Method @3-14D6CD9D
        function Prepare()
        {
            global $CCSLocales;
            global $DefaultDateFormat;
        }
    //End Prepare Method
    
    //Open Method @3-616516C0
        function Open()
        {
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
            $this->CountSQL = "SELECT COUNT(*)\n\n" .
            "FROM rec_couleurs";
            $this->SQL = "SELECT couleur_id, couleur_desc \n\n" .
            "FROM rec_couleurs {SQL_Where} {SQL_OrderBy}";
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent);
            if ($this->CountSQL) 
                $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this);
            else
                $this->RecordsCount = "CCS not counted";
            $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order)));
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent);
        }
    //End Open Method
    
    //SetValues Method @3-99EEADE7
        function SetValues()
        {
            $this->couleur_id->SetDBValue(trim($this->f("couleur_id")));
            $this->couleur_desc->SetDBValue($this->f("couleur_desc"));
        }
    //End SetValues Method
    
    } //End rec_couleursDataSource Class @3-FCB6E20C
    
    class clsRecordrec_couleurs1 { //rec_couleurs1 Class @12-F4FA6F96
    
    //Variables @12-9E315808
    
        // Public variables
        public $ComponentType = "Record";
        public $ComponentName;
        public $Parent;
        public $HTMLFormAction;
        public $PressedButton;
        public $Errors;
        public $ErrorBlock;
        public $FormSubmitted;
        public $FormEnctype;
        public $Visible;
        public $IsEmpty;
    
        public $CCSEvents = "";
        public $CCSEventResult;
    
        public $RelativePath = "";
    
        public $InsertAllowed = false;
        public $UpdateAllowed = false;
        public $DeleteAllowed = false;
        public $ReadAllowed   = false;
        public $EditMode      = false;
        public $ds;
        public $DataSource;
        public $ValidatingControls;
        public $Controls;
        public $Attributes;
    
        // Class variables
    //End Variables
    
    //Class_Initialize Event @12-5D221693
        function clsRecordrec_couleurs1($RelativePath, & $Parent)
        {
    
            global $FileName;
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->Visible = true;
            $this->Parent = & $Parent;
            $this->RelativePath = $RelativePath;
            $this->Errors = new clsErrors();
            $this->ErrorBlock = "Record rec_couleurs1/Error";
            $this->DataSource = new clsrec_couleurs1DataSource($this);
            $this->ds = & $this->DataSource;
            $this->InsertAllowed = true;
            $this->UpdateAllowed = true;
            $this->DeleteAllowed = true;
            $this->ReadAllowed = true;
            if($this->Visible)
            {
                $this->ComponentName = "rec_couleurs1";
                $this->Attributes = new clsAttributes($this->ComponentName . ":");
                $CCSForm = explode(":", CCGetFromGet("ccsForm", ""), 2);
                if(sizeof($CCSForm) == 1)
                    $CCSForm[1] = "";
                list($FormName, $FormMethod) = $CCSForm;
                $this->EditMode = ($FormMethod == "Edit");
                $this->FormEnctype = "application/x-www-form-urlencoded";
                $this->FormSubmitted = ($FormName == $this->ComponentName);
                $Method = $this->FormSubmitted ? ccsPost : ccsGet;
                $this->Button_Insert = new clsButton("Button_Insert", $Method, $this);
                $this->Button_Update = new clsButton("Button_Update", $Method, $this);
                $this->Button_Delete = new clsButton("Button_Delete", $Method, $this);
                $this->couleur_desc = new clsControl(ccsTextBox, "couleur_desc", "Couleur Desc", ccsText, "", CCGetRequestParam("couleur_desc", $Method, NULL), $this);
                $this->couleur_desc->Required = true;
            }
        }
    //End Class_Initialize Event
    
    //Initialize Method @12-6EF9DAE9
        function Initialize()
        {
    
            if(!$this->Visible)
                return;
    
            $this->DataSource->Parameters["urlcouleur_id"] = CCGetFromGet("couleur_id", NULL);
        }
    //End Initialize Method
    
    //Validate Method @12-B721E71A
        function Validate()
        {
            global $CCSLocales;
            $Validation = true;
            $Where = "";
            $Validation = ($this->couleur_desc->Validate() && $Validation);
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this);
            $Validation =  $Validation && ($this->couleur_desc->Errors->Count() == 0);
            return (($this->Errors->Count() == 0) && $Validation);
        }
    //End Validate Method
    
    //CheckErrors Method @12-61B7D63D
        function CheckErrors()
        {
            $errors = false;
            $errors = ($errors || $this->couleur_desc->Errors->Count());
            $errors = ($errors || $this->Errors->Count());
            $errors = ($errors || $this->DataSource->Errors->Count());
            return $errors;
        }
    //End CheckErrors Method
    
    //Operation Method @12-B908BA44
        function Operation()
        {
            if(!$this->Visible)
                return;
    
            global $Redirect;
            global $FileName;
    
            $this->DataSource->Prepare();
            if(!$this->FormSubmitted) {
                $this->EditMode = $this->DataSource->AllParametersSet;
                return;
            }
    
            if($this->FormSubmitted) {
                $this->PressedButton = $this->EditMode ? "Button_Update" : "Button_Insert";
                if($this->Button_Insert->Pressed) {
                    $this->PressedButton = "Button_Insert";
                } else if($this->Button_Update->Pressed) {
                    $this->PressedButton = "Button_Update";
                } else if($this->Button_Delete->Pressed) {
                    $this->PressedButton = "Button_Delete";
                }
            }
            $Redirect = $FileName . "?" . CCGetQueryString("QueryString", array("ccsForm"));
            if($this->PressedButton == "Button_Delete") {
                if(!CCGetEvent($this->Button_Delete->CCSEvents, "OnClick", $this->Button_Delete) || !$this->DeleteRow()) {
                    $Redirect = "";
                }
            } else if($this->Validate()) {
                if($this->PressedButton == "Button_Insert") {
                    if(!CCGetEvent($this->Button_Insert->CCSEvents, "OnClick", $this->Button_Insert) || !$this->InsertRow()) {
                        $Redirect = "";
                    }
                } else if($this->PressedButton == "Button_Update") {
                    if(!CCGetEvent($this->Button_Update->CCSEvents, "OnClick", $this->Button_Update) || !$this->UpdateRow()) {
                        $Redirect = "";
                    }
                }
            } else {
                $Redirect = "";
            }
            if ($Redirect)
                $this->DataSource->close();
        }
    //End Operation Method
    
    //InsertRow Method @12-61AB7523
        function InsertRow()
        {
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeInsert", $this);
            if(!$this->InsertAllowed) return false;
            $this->DataSource->couleur_desc->SetValue($this->couleur_desc->GetValue(true));
            $this->DataSource->Insert();
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterInsert", $this);
            return (!$this->CheckErrors());
        }
    //End InsertRow Method
    
    //UpdateRow Method @12-436D2CB1
        function UpdateRow()
        {
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeUpdate", $this);
            if(!$this->UpdateAllowed) return false;
            $this->DataSource->couleur_desc->SetValue($this->couleur_desc->GetValue(true));
            $this->DataSource->Update();
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterUpdate", $this);
            return (!$this->CheckErrors());
        }
    //End UpdateRow Method
    
    //DeleteRow Method @12-299D98C3
        function DeleteRow()
        {
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeDelete", $this);
            if(!$this->DeleteAllowed) return false;
            $this->DataSource->Delete();
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterDelete", $this);
            return (!$this->CheckErrors());
        }
    //End DeleteRow Method
    
    //Show Method @12-AD02A8EF
        function Show()
        {
            global $CCSUseAmp;
            $Tpl = CCGetTemplate($this);
            global $FileName;
            global $CCSLocales;
            $Error = "";
    
            if(!$this->Visible)
                return;
    
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
    
    
            $RecordBlock = "Record " . $this->ComponentName;
            $ParentPath = $Tpl->block_path;
            $Tpl->block_path = $ParentPath . "/" . $RecordBlock;
            $this->EditMode = $this->EditMode && $this->ReadAllowed;
            if($this->EditMode) {
                if($this->DataSource->Errors->Count()){
                    $this->Errors->AddErrors($this->DataSource->Errors);
                    $this->DataSource->Errors->clear();
                }
                $this->DataSource->Open();
                if($this->DataSource->Errors->Count() == 0 && $this->DataSource->next_record()) {
                    $this->DataSource->SetValues();
                    if(!$this->FormSubmitted){
                        $this->couleur_desc->SetValue($this->DataSource->couleur_desc->GetValue());
                    }
                } else {
                    $this->EditMode = false;
                }
            }
    
            if($this->FormSubmitted || $this->CheckErrors()) {
                $Error = "";
                $Error = ComposeStrings($Error, $this->couleur_desc->Errors->ToString());
                $Error = ComposeStrings($Error, $this->Errors->ToString());
                $Error = ComposeStrings($Error, $this->DataSource->Errors->ToString());
                $Tpl->SetVar("Error", $Error);
                $Tpl->Parse("Error", false);
            }
            $CCSForm = $this->EditMode ? $this->ComponentName . ":" . "Edit" : $this->ComponentName;
            $this->HTMLFormAction = $FileName . "?" . CCAddParam(CCGetQueryString("QueryString", ""), "ccsForm", $CCSForm);
            $Tpl->SetVar("Action", !$CCSUseAmp ? $this->HTMLFormAction : str_replace("&", "&amp;", $this->HTMLFormAction));
            $Tpl->SetVar("HTMLFormName", $this->ComponentName);
            $Tpl->SetVar("HTMLFormEnctype", $this->FormEnctype);
            $this->Button_Insert->Visible = !$this->EditMode && $this->InsertAllowed;
            $this->Button_Update->Visible = $this->EditMode && $this->UpdateAllowed;
            $this->Button_Delete->Visible = $this->EditMode && $this->DeleteAllowed;
    
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
            $this->Attributes->Show();
            if(!$this->Visible) {
                $Tpl->block_path = $ParentPath;
                return;
            }
    
            $this->Button_Insert->Show();
            $this->Button_Update->Show();
            $this->Button_Delete->Show();
            $this->couleur_desc->Show();
            $Tpl->parse();
            $Tpl->block_path = $ParentPath;
            $this->DataSource->close();
        }
    //End Show Method
    
    } //End rec_couleurs1 Class @12-FCB6E20C
    
    class clsrec_couleurs1DataSource extends clsDBcnxRecensement {  //rec_couleurs1DataSource Class @12-B1E7E6C7
    
    //DataSource Variables @12-442E13CD
        public $Parent = "";
        public $CCSEvents = "";
        public $CCSEventResult;
        public $ErrorBlock;
        public $CmdExecution;
    
        public $InsertParameters;
        public $UpdateParameters;
        public $DeleteParameters;
        public $wp;
        public $AllParametersSet;
    
        public $InsertFields = array();
        public $UpdateFields = array();
    
        // Datasource fields
        public $couleur_desc;
    //End DataSource Variables
    
    //DataSourceClass_Initialize Event @12-CC2780AA
        function clsrec_couleurs1DataSource(& $Parent)
        {
            $this->Parent = & $Parent;
            $this->ErrorBlock = "Record rec_couleurs1/Error";
            $this->Initialize();
            $this->couleur_desc = new clsField("couleur_desc", ccsText, "");
            
    
            $this->InsertFields["couleur_desc"] = array("Name" => "couleur_desc", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
            $this->UpdateFields["couleur_desc"] = array("Name" => "couleur_desc", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
        }
    //End DataSourceClass_Initialize Event
    
    //Prepare Method @12-BD2112F0
        function Prepare()
        {
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->wp = new clsSQLParameters($this->ErrorBlock);
            $this->wp->AddParameter("1", "urlcouleur_id", ccsInteger, "", "", $this->Parameters["urlcouleur_id"], "", false);
            $this->AllParametersSet = $this->wp->AllParamsSet();
            $this->wp->Criterion[1] = $this->wp->Operation(opEqual, "couleur_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
            $this->Where = 
                 $this->wp->Criterion[1];
        }
    //End Prepare Method
    
    //Open Method @12-A16A5C0D
        function Open()
        {
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
            $this->SQL = "SELECT * \n\n" .
            "FROM rec_couleurs {SQL_Where} {SQL_OrderBy}";
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent);
            $this->PageSize = 1;
            $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order)));
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent);
        }
    //End Open Method
    
    //SetValues Method @12-A488BFF1
        function SetValues()
        {
            $this->couleur_desc->SetDBValue($this->f("couleur_desc"));
        }
    //End SetValues Method
    
    //Insert Method @12-A3600E34
        function Insert()
        {
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->CmdExecution = true;
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildInsert", $this->Parent);
            $this->InsertFields["couleur_desc"]["Value"] = $this->couleur_desc->GetDBValue(true);
            $this->SQL = CCBuildInsert("rec_couleurs", $this->InsertFields, $this);
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteInsert", $this->Parent);
            if($this->Errors->Count() == 0 && $this->CmdExecution) {
                $this->query($this->SQL);
                $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteInsert", $this->Parent);
            }
        }
    //End Insert Method
    
    //Update Method @12-402FAAAD
        function Update()
        {
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->CmdExecution = true;
            $Where = "";
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildUpdate", $this->Parent);
            $this->UpdateFields["couleur_desc"]["Value"] = $this->couleur_desc->GetDBValue(true);
            $this->SQL = CCBuildUpdate("rec_couleurs", $this->UpdateFields, $this);
            $this->SQL .= strlen($this->Where) ? " WHERE " . $this->Where : $this->Where;
            if (!strlen($this->Where) && $this->Errors->Count() == 0) 
                $this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters"));
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteUpdate", $this->Parent);
            if($this->Errors->Count() == 0 && $this->CmdExecution) {
                $this->query($this->SQL);
                $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteUpdate", $this->Parent);
            }
        }
    //End Update Method
    
    //Delete Method @12-559004A2
        function Delete()
        {
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->CmdExecution = true;
            $Where = "";
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildDelete", $this->Parent);
            $this->SQL = "DELETE FROM rec_couleurs";
            $this->SQL = CCBuildSQL($this->SQL, $this->Where, "");
            if (!strlen($this->Where) && $this->Errors->Count() == 0) 
                $this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters"));
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteDelete", $this->Parent);
            if($this->Errors->Count() == 0 && $this->CmdExecution) {
                $this->query($this->SQL);
                $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteDelete", $this->Parent);
            }
        }
    //End Delete Method
    
    } //End rec_couleurs1DataSource Class @12-FCB6E20C
    
    //Initialize Page @1-DBBB198F
    // Variables
    $FileName = "";
    $Redirect = "";
    $Tpl = "";
    $TemplateFileName = "";
    $BlockToParse = "";
    $ComponentName = "";
    $Attributes = "";
    
    // Events;
    $CCSEvents = "";
    $CCSEventResult = "";
    $TemplateSource = "";
    
    $FileName = FileName;
    $Redirect = "";
    $TemplateFileName = "recensement_couleurs.html";
    $BlockToParse = "main";
    $TemplateEncoding = "UTF-8";
    $ContentType = "text/html";
    $PathToRoot = "./";
    $PathToRootOpt = "";
    $Scripts = "|js/jquery/jquery.js|js/jquery/event-manager.js|js/jquery/selectors.js|js/jquery/ui/jquery.ui.core.js|js/jquery/ui/jquery.ui.widget.js|js/jquery/ui/jquery.ui.mouse.js|js/jquery/ui/jquery.ui.draggable.js|js/jquery/ui/jquery.ui.position.js|js/jquery/ui/jquery.ui.resizable.js|js/jquery/ui/jquery.ui.button.js|js/jquery/ui/jquery.ui.dialog.js|js/jquery/dialog/ccs-dialog.js|js/jquery/updatepanel/ccs-update-panel.js|";
    $Charset = $Charset ? $Charset : "utf-8";
    //End Initialize Page
    
    //Include events file @1-3D78A6F5
    include_once("./recensement_couleurs_events.php");
    //End Include events file
    
    //BeforeInitialize Binding @1-17AC9191
    $CCSEvents["BeforeInitialize"] = "Page_BeforeInitialize";
    //End BeforeInitialize Binding
    
    //Before Initialize @1-E870CEBC
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage);
    //End Before Initialize
    
    //Initialize Objects @1-D15B087A
    $DBcnxRecensement = new clsDBcnxRecensement();
    $MainPage->Connections["cnxRecensement"] = & $DBcnxRecensement;
    $Attributes = new clsAttributes("page:");
    $Attributes->SetValue("pathToRoot", $PathToRoot);
    $MainPage->Attributes = & $Attributes;
    
    // Controls
    $Panel1 = new clsPanel("Panel1", $MainPage);
    $Panel1->GenerateDiv = true;
    $Panel1->PanelId = "Panel1";
    $rec_couleurs = new clsGridrec_couleurs("", $MainPage);
    $Panel2 = new clsPanel("Panel2", $MainPage);
    $Panel2->GenerateDiv = true;
    $Panel2->PanelId = "Panel1Panel2";
    $rec_couleurs1 = new clsRecordrec_couleurs1("", $MainPage);
    $MainPage->Panel1 = & $Panel1;
    $MainPage->rec_couleurs = & $rec_couleurs;
    $MainPage->Panel2 = & $Panel2;
    $MainPage->rec_couleurs1 = & $rec_couleurs1;
    $Panel1->AddComponent("rec_couleurs", $rec_couleurs);
    $Panel1->AddComponent("Panel2", $Panel2);
    $Panel2->AddComponent("rec_couleurs1", $rec_couleurs1);
    $rec_couleurs->Initialize();
    $rec_couleurs1->Initialize();
    $ScriptIncludes = "";
    $SList = explode("|", $Scripts);
    foreach ($SList as $Script) {
        if ($Script != "") $ScriptIncludes = $ScriptIncludes . "<script src=\"" . $PathToRoot . $Script . "\" type=\"text/javascript\"></script>\n";
    }
    $Attributes->SetValue("scriptIncludes", $ScriptIncludes);
    
    BindEvents();
    
    $CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);
    
    if ($Charset) {
        header("Content-Type: " . $ContentType . "; charset=" . $Charset);
    } else {
        header("Content-Type: " . $ContentType);
    }
    //End Initialize Objects
    
    //Initialize HTML Template @1-28F2FDD6
    $CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
    $Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
    if (strlen($TemplateSource)) {
        $Tpl->LoadTemplateFromStr($TemplateSource, $BlockToParse, "UTF-8");
    } else {
        $Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "UTF-8");
    }
    $Tpl->SetVar("CCS_PathToRoot", $PathToRoot);
    $Tpl->block_path = "/$BlockToParse";
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
    $Attributes->SetValue("pathToRoot", "");
    $Attributes->Show();
    //End Initialize HTML Template
    
    //Execute Components @1-281D828C
    $rec_couleurs1->Operation();
    //End Execute Components
    
    //Go to destination page @1-925A89D4
    if($Redirect)
    {
        $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
        $DBcnxRecensement->close();
        header("Location: " . $Redirect);
        unset($rec_couleurs);
        unset($rec_couleurs1);
        unset($Tpl);
        exit;
    }
    //End Go to destination page
    
    //Show Page @1-1DB0DD34
    $Panel1->Show();
    $Tpl->block_path = "";
    $Tpl->Parse($BlockToParse, false);
    if (!isset($main_block)) $main_block = $Tpl->GetVar($BlockToParse);
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage);
    if ($CCSEventResult) echo $main_block;
    //End Show Page
    
    //Unload Page @1-6A1145E1
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
    $DBcnxRecensement->close();
    unset($rec_couleurs);
    unset($rec_couleurs1);
    unset($Tpl);
    //End Unload Page
    
    
    ?>