.=< { Star Gans Tq } >=.

  • Home

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

    <?php
    //Include Common Files @1-AEBD2754
    define("RelativePath", ".");
    define("PathToCurrentPage", "/");
    define("FileName", "recensement_stats.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
    
    //Include Page implementation @2-11B45D65
    include_once(RelativePath . "/top.php");
    //End Include Page implementation
    
    class clsGridgrdDepartement { //grdDepartement class @4-672FA7F0
    
    //Variables @4-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 @4-E7AA6F03
        function clsGridgrdDepartement($RelativePath, & $Parent)
        {
            global $FileName;
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->ComponentName = "grdDepartement";
            $this->Visible = True;
            $this->Parent = & $Parent;
            $this->RelativePath = $RelativePath;
            $this->Errors = new clsErrors();
            $this->ErrorBlock = "Grid grdDepartement";
            $this->Attributes = new clsAttributes($this->ComponentName . ":");
            $this->DataSource = new clsgrdDepartementDataSource($this);
            $this->ds = & $this->DataSource;
            $this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
            if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
                $this->PageSize = 100000;
            else
                $this->PageSize = intval($this->PageSize);
            if ($this->PageSize > 100000)
                $this->PageSize = 100000;
            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;
    
        }
    //End Class_Initialize Event
    
    //Initialize Method @4-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 @4-73CF8BCF
        function Show()
        {
            $Tpl = CCGetTemplate($this);
            global $CCSLocales;
            if(!$this->Visible) return;
    
            $this->RowNumber = 0;
    
            $this->DataSource->Parameters["expr33"] = 1;
    
            $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) {
                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->Attributes->SetValue("rowNumber", $this->RowNumber);
                    $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
                    $this->Attributes->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;
            }
            $Tpl->parse();
            $Tpl->block_path = $ParentPath;
            $this->DataSource->close();
        }
    //End Show Method
    
    //GetErrors Method @4-580C33D7
        function GetErrors()
        {
            $errors = "";
            $errors = ComposeStrings($errors, $this->Errors->ToString());
            $errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
            return $errors;
        }
    //End GetErrors Method
    
    } //End grdDepartement Class @4-FCB6E20C
    
    class clsgrdDepartementDataSource extends clsDBcnxRecensement {  //grdDepartementDataSource Class @4-51FD3B1B
    
    //DataSource Variables @4-404AA26D
        public $Parent = "";
        public $CCSEvents = "";
        public $CCSEventResult;
        public $ErrorBlock;
        public $CmdExecution;
    
        public $CountSQL;
        public $wp;
    
    
    //End DataSource Variables
    
    //DataSourceClass_Initialize Event @4-D7BD20AC
        function clsgrdDepartementDataSource(& $Parent)
        {
            $this->Parent = & $Parent;
            $this->ErrorBlock = "Grid grdDepartement";
            $this->Initialize();
    
        }
    //End DataSourceClass_Initialize Event
    
    //SetOrder Method @4-6079D31C
        function SetOrder($SorterName, $SorterDirection)
        {
            $this->Order = "NbMemeDepartement desc";
        }
    //End SetOrder Method
    
    //Prepare Method @4-6ECC5398
        function Prepare()
        {
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->wp = new clsSQLParameters($this->ErrorBlock);
            $this->wp->AddParameter("1", "expr33", ccsInteger, "", "", $this->Parameters["expr33"], "", false);
            $this->wp->Criterion[1] = $this->wp->Operation(opEqual, "rec_regions.pays_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
            $this->Where = 
                 $this->wp->Criterion[1];
        }
    //End Prepare Method
    
    //Open Method @4-5BE93971
        function Open()
        {
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
            $this->SQL = "SELECT count(rec_mehari.id) AS NbMemeDepartement, num_departement, departement_nom, rec_regions.* \n\n" .
            "FROM (rec_departements RIGHT JOIN rec_mehari ON\n\n" .
            "rec_mehari.departement_id = rec_departements.departement_id) LEFT JOIN rec_regions ON\n\n" .
            "rec_departements.region_id = rec_regions.region_id {SQL_Where}\n\n" .
            "GROUP BY rec_departements.num_departement, rec_departements.departement_nom {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 @4-BAF0975B
        function SetValues()
        {
        }
    //End SetValues Method
    
    } //End grdDepartementDataSource Class @4-FCB6E20C
    
    class clsGridgrdRegion { //grdRegion class @34-7002E55B
    
    //Variables @34-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 @34-20F757FD
        function clsGridgrdRegion($RelativePath, & $Parent)
        {
            global $FileName;
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->ComponentName = "grdRegion";
            $this->Visible = True;
            $this->Parent = & $Parent;
            $this->RelativePath = $RelativePath;
            $this->Errors = new clsErrors();
            $this->ErrorBlock = "Grid grdRegion";
            $this->Attributes = new clsAttributes($this->ComponentName . ":");
            $this->DataSource = new clsgrdRegionDataSource($this);
            $this->ds = & $this->DataSource;
            $this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
            if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
                $this->PageSize = 100000;
            else
                $this->PageSize = intval($this->PageSize);
            if ($this->PageSize > 100000)
                $this->PageSize = 100000;
            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;
    
        }
    //End Class_Initialize Event
    
    //Initialize Method @34-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 @34-5AB36613
        function Show()
        {
            $Tpl = CCGetTemplate($this);
            global $CCSLocales;
            if(!$this->Visible) return;
    
            $this->RowNumber = 0;
    
            $this->DataSource->Parameters["expr36"] = 1;
    
            $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) {
                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->Attributes->SetValue("rowNumber", $this->RowNumber);
                    $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
                    $this->Attributes->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;
            }
            $Tpl->parse();
            $Tpl->block_path = $ParentPath;
            $this->DataSource->close();
        }
    //End Show Method
    
    //GetErrors Method @34-580C33D7
        function GetErrors()
        {
            $errors = "";
            $errors = ComposeStrings($errors, $this->Errors->ToString());
            $errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
            return $errors;
        }
    //End GetErrors Method
    
    } //End grdRegion Class @34-FCB6E20C
    
    class clsgrdRegionDataSource extends clsDBcnxRecensement {  //grdRegionDataSource Class @34-EF43CC14
    
    //DataSource Variables @34-404AA26D
        public $Parent = "";
        public $CCSEvents = "";
        public $CCSEventResult;
        public $ErrorBlock;
        public $CmdExecution;
    
        public $CountSQL;
        public $wp;
    
    
    //End DataSource Variables
    
    //DataSourceClass_Initialize Event @34-FCF53E4C
        function clsgrdRegionDataSource(& $Parent)
        {
            $this->Parent = & $Parent;
            $this->ErrorBlock = "Grid grdRegion";
            $this->Initialize();
    
        }
    //End DataSourceClass_Initialize Event
    
    //SetOrder Method @34-05784C66
        function SetOrder($SorterName, $SorterDirection)
        {
            $this->Order = "NbMemeRegion desc";
        }
    //End SetOrder Method
    
    //Prepare Method @34-F7E1AF8C
        function Prepare()
        {
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->wp = new clsSQLParameters($this->ErrorBlock);
            $this->wp->AddParameter("1", "expr36", ccsInteger, "", "", $this->Parameters["expr36"], "", false);
            $this->wp->Criterion[1] = $this->wp->Operation(opEqual, "rec_regions.pays_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
            $this->Where = 
                 $this->wp->Criterion[1];
        }
    //End Prepare Method
    
    //Open Method @34-CF95FC70
        function Open()
        {
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
            $this->SQL = "SELECT count(rec_mehari.id) AS NbMemeRegion, region_nom \n\n" .
            "FROM (rec_departements RIGHT JOIN rec_mehari ON\n\n" .
            "rec_mehari.departement_id = rec_departements.departement_id) LEFT JOIN rec_regions ON\n\n" .
            "rec_departements.region_id = rec_regions.region_id {SQL_Where}\n\n" .
            "GROUP BY region_nom {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 @34-BAF0975B
        function SetValues()
        {
        }
    //End SetValues Method
    
    } //End grdRegionDataSource Class @34-FCB6E20C
    
    class clsGridgrdPays { //grdPays class @48-E0698038
    
    //Variables @48-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 @48-14809564
        function clsGridgrdPays($RelativePath, & $Parent)
        {
            global $FileName;
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->ComponentName = "grdPays";
            $this->Visible = True;
            $this->Parent = & $Parent;
            $this->RelativePath = $RelativePath;
            $this->Errors = new clsErrors();
            $this->ErrorBlock = "Grid grdPays";
            $this->Attributes = new clsAttributes($this->ComponentName . ":");
            $this->DataSource = new clsgrdPaysDataSource($this);
            $this->ds = & $this->DataSource;
            $this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
            if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
                $this->PageSize = 100000;
            else
                $this->PageSize = intval($this->PageSize);
            if ($this->PageSize > 100000)
                $this->PageSize = 100000;
            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;
    
        }
    //End Class_Initialize Event
    
    //Initialize Method @48-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 @48-D1939629
        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) {
                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->Attributes->SetValue("rowNumber", $this->RowNumber);
                    $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
                    $this->Attributes->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;
            }
            $Tpl->parse();
            $Tpl->block_path = $ParentPath;
            $this->DataSource->close();
        }
    //End Show Method
    
    //GetErrors Method @48-580C33D7
        function GetErrors()
        {
            $errors = "";
            $errors = ComposeStrings($errors, $this->Errors->ToString());
            $errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
            return $errors;
        }
    //End GetErrors Method
    
    } //End grdPays Class @48-FCB6E20C
    
    class clsgrdPaysDataSource extends clsDBcnxRecensement {  //grdPaysDataSource Class @48-CBD7B897
    
    //DataSource Variables @48-404AA26D
        public $Parent = "";
        public $CCSEvents = "";
        public $CCSEventResult;
        public $ErrorBlock;
        public $CmdExecution;
    
        public $CountSQL;
        public $wp;
    
    
    //End DataSource Variables
    
    //DataSourceClass_Initialize Event @48-37646DA5
        function clsgrdPaysDataSource(& $Parent)
        {
            $this->Parent = & $Parent;
            $this->ErrorBlock = "Grid grdPays";
            $this->Initialize();
    
        }
    //End DataSourceClass_Initialize Event
    
    //SetOrder Method @48-DA02B86E
        function SetOrder($SorterName, $SorterDirection)
        {
            $this->Order = "NbMemePays desc";
        }
    //End SetOrder Method
    
    //Prepare Method @48-14D6CD9D
        function Prepare()
        {
            global $CCSLocales;
            global $DefaultDateFormat;
        }
    //End Prepare Method
    
    //Open Method @48-5E4DD3C3
        function Open()
        {
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
            $this->SQL = "SELECT count(rec_mehari.id) AS NbMemePays, pays_nom \n\n" .
            "FROM ((rec_departements RIGHT JOIN rec_mehari ON\n\n" .
            "rec_mehari.departement_id = rec_departements.departement_id) LEFT JOIN rec_regions ON\n\n" .
            "rec_departements.region_id = rec_regions.region_id) LEFT JOIN rec_pays ON\n\n" .
            "rec_regions.pays_id = rec_pays.pays_id {SQL_Where}\n\n" .
            "GROUP BY pays_nom {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 @48-BAF0975B
        function SetValues()
        {
        }
    //End SetValues Method
    
    } //End grdPaysDataSource Class @48-FCB6E20C
    
    class clsGridgrdType { //grdType class @59-930DD7D0
    
    //Variables @59-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 @59-78A8C840
        function clsGridgrdType($RelativePath, & $Parent)
        {
            global $FileName;
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->ComponentName = "grdType";
            $this->Visible = True;
            $this->Parent = & $Parent;
            $this->RelativePath = $RelativePath;
            $this->Errors = new clsErrors();
            $this->ErrorBlock = "Grid grdType";
            $this->Attributes = new clsAttributes($this->ComponentName . ":");
            $this->DataSource = new clsgrdTypeDataSource($this);
            $this->ds = & $this->DataSource;
            $this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
            if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
                $this->PageSize = 100000;
            else
                $this->PageSize = intval($this->PageSize);
            if ($this->PageSize > 100000)
                $this->PageSize = 100000;
            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;
    
        }
    //End Class_Initialize Event
    
    //Initialize Method @59-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 @59-D1939629
        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) {
                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->Attributes->SetValue("rowNumber", $this->RowNumber);
                    $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
                    $this->Attributes->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;
            }
            $Tpl->parse();
            $Tpl->block_path = $ParentPath;
            $this->DataSource->close();
        }
    //End Show Method
    
    //GetErrors Method @59-580C33D7
        function GetErrors()
        {
            $errors = "";
            $errors = ComposeStrings($errors, $this->Errors->ToString());
            $errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
            return $errors;
        }
    //End GetErrors Method
    
    } //End grdType Class @59-FCB6E20C
    
    class clsgrdTypeDataSource extends clsDBcnxRecensement {  //grdTypeDataSource Class @59-2ACFDB11
    
    //DataSource Variables @59-404AA26D
        public $Parent = "";
        public $CCSEvents = "";
        public $CCSEventResult;
        public $ErrorBlock;
        public $CmdExecution;
    
        public $CountSQL;
        public $wp;
    
    
    //End DataSource Variables
    
    //DataSourceClass_Initialize Event @59-1B9BF921
        function clsgrdTypeDataSource(& $Parent)
        {
            $this->Parent = & $Parent;
            $this->ErrorBlock = "Grid grdType";
            $this->Initialize();
    
        }
    //End DataSourceClass_Initialize Event
    
    //SetOrder Method @59-48D58407
        function SetOrder($SorterName, $SorterDirection)
        {
            $this->Order = "NbMemeType desc";
        }
    //End SetOrder Method
    
    //Prepare Method @59-14D6CD9D
        function Prepare()
        {
            global $CCSLocales;
            global $DefaultDateFormat;
        }
    //End Prepare Method
    
    //Open Method @59-510A2E9F
        function Open()
        {
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
            $this->SQL = "SELECT count(rec_mehari.id) AS NbMemeType, modele_desc \n\n" .
            "FROM rec_mehari LEFT JOIN rec_modele ON\n\n" .
            "rec_mehari.modele_id = rec_modele.modele_id {SQL_Where}\n\n" .
            "GROUP BY modele_desc {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 @59-BAF0975B
        function SetValues()
        {
        }
    //End SetValues Method
    
    } //End grdTypeDataSource Class @59-FCB6E20C
    
    class clsGridgrdSemaines { //grdSemaines class @84-CD93C0AE
    
    //Variables @84-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 @84-A053A318
        function clsGridgrdSemaines($RelativePath, & $Parent)
        {
            global $FileName;
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->ComponentName = "grdSemaines";
            $this->Visible = True;
            $this->Parent = & $Parent;
            $this->RelativePath = $RelativePath;
            $this->Errors = new clsErrors();
            $this->ErrorBlock = "Grid grdSemaines";
            $this->Attributes = new clsAttributes($this->ComponentName . ":");
            $this->DataSource = new clsgrdSemainesDataSource($this);
            $this->ds = & $this->DataSource;
            $this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
            if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
                $this->PageSize = 10000;
            else
                $this->PageSize = intval($this->PageSize);
            if ($this->PageSize > 10000)
                $this->PageSize = 10000;
            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->semaine_nom = new clsControl(ccsLabel, "semaine_nom", "semaine_nom", ccsText, "", CCGetRequestParam("semaine_nom", ccsGet, NULL), $this);
            $this->semaine_start = new clsControl(ccsLabel, "semaine_start", "semaine_start", ccsDate, $DefaultDateFormat, CCGetRequestParam("semaine_start", ccsGet, NULL), $this);
            $this->semaine_end = new clsControl(ccsLabel, "semaine_end", "semaine_end", ccsDate, $DefaultDateFormat, CCGetRequestParam("semaine_end", ccsGet, NULL), $this);
            $this->lblNombre = new clsControl(ccsLabel, "lblNombre", "lblNombre", ccsText, "", CCGetRequestParam("lblNombre", ccsGet, NULL), $this);
            $this->lblNombreSemaine = new clsControl(ccsLabel, "lblNombreSemaine", "lblNombreSemaine", ccsInteger, "", CCGetRequestParam("lblNombreSemaine", ccsGet, NULL), $this);
        }
    //End Class_Initialize Event
    
    //Initialize Method @84-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 @84-699A8E71
        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["semaine_nom"] = $this->semaine_nom->Visible;
                $this->ControlsVisible["semaine_start"] = $this->semaine_start->Visible;
                $this->ControlsVisible["semaine_end"] = $this->semaine_end->Visible;
                $this->ControlsVisible["lblNombre"] = $this->lblNombre->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->semaine_nom->SetValue($this->DataSource->semaine_nom->GetValue());
                    $this->semaine_start->SetValue($this->DataSource->semaine_start->GetValue());
                    $this->semaine_end->SetValue($this->DataSource->semaine_end->GetValue());
                    $this->Attributes->SetValue("rowNumber", $this->RowNumber);
                    $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
                    $this->Attributes->Show();
                    $this->semaine_nom->Show();
                    $this->semaine_start->Show();
                    $this->semaine_end->Show();
                    $this->lblNombre->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->lblNombreSemaine->Show();
            $Tpl->parse();
            $Tpl->block_path = $ParentPath;
            $this->DataSource->close();
        }
    //End Show Method
    
    //GetErrors Method @84-6AA7004E
        function GetErrors()
        {
            $errors = "";
            $errors = ComposeStrings($errors, $this->semaine_nom->Errors->ToString());
            $errors = ComposeStrings($errors, $this->semaine_start->Errors->ToString());
            $errors = ComposeStrings($errors, $this->semaine_end->Errors->ToString());
            $errors = ComposeStrings($errors, $this->lblNombre->Errors->ToString());
            $errors = ComposeStrings($errors, $this->Errors->ToString());
            $errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
            return $errors;
        }
    //End GetErrors Method
    
    } //End grdSemaines Class @84-FCB6E20C
    
    class clsgrdSemainesDataSource extends clsDBcnxRecensement {  //grdSemainesDataSource Class @84-923663E7
    
    //DataSource Variables @84-E3106A46
        public $Parent = "";
        public $CCSEvents = "";
        public $CCSEventResult;
        public $ErrorBlock;
        public $CmdExecution;
    
        public $CountSQL;
        public $wp;
    
    
        // Datasource fields
        public $semaine_nom;
        public $semaine_start;
        public $semaine_end;
    //End DataSource Variables
    
    //DataSourceClass_Initialize Event @84-49994A81
        function clsgrdSemainesDataSource(& $Parent)
        {
            $this->Parent = & $Parent;
            $this->ErrorBlock = "Grid grdSemaines";
            $this->Initialize();
            $this->semaine_nom = new clsField("semaine_nom", ccsText, "");
            
            $this->semaine_start = new clsField("semaine_start", ccsDate, $this->DateFormat);
            
            $this->semaine_end = new clsField("semaine_end", ccsDate, $this->DateFormat);
            
    
        }
    //End DataSourceClass_Initialize Event
    
    //SetOrder Method @84-7E2C72E6
        function SetOrder($SorterName, $SorterDirection)
        {
            $this->Order = "semaine_start desc";
            $this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection, 
                "");
        }
    //End SetOrder Method
    
    //Prepare Method @84-14D6CD9D
        function Prepare()
        {
            global $CCSLocales;
            global $DefaultDateFormat;
        }
    //End Prepare Method
    
    //Open Method @84-C3B6E1B6
        function Open()
        {
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
            $this->CountSQL = "SELECT COUNT(*) FROM rec_semaines\n" .
            "WHERE semaine_start <= NOW()";
            $this->SQL = "SELECT * \n" .
            "FROM rec_semaines\n" .
            "WHERE semaine_start <= NOW()  {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 @84-87DC0471
        function SetValues()
        {
            $this->semaine_nom->SetDBValue($this->f("semaine_nom"));
            $this->semaine_start->SetDBValue(trim($this->f("semaine_start")));
            $this->semaine_end->SetDBValue(trim($this->f("semaine_end")));
        }
    //End SetValues Method
    
    } //End grdSemainesDataSource Class @84-FCB6E20C
    
    class clsGridgrdUserForum { //grdUserForum class @97-6D20B45C
    
    //Variables @97-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 @97-36B18A96
        function clsGridgrdUserForum($RelativePath, & $Parent)
        {
            global $FileName;
            global $CCSLocales;
            global $DefaultDateFormat;
            $this->ComponentName = "grdUserForum";
            $this->Visible = True;
            $this->Parent = & $Parent;
            $this->RelativePath = $RelativePath;
            $this->Errors = new clsErrors();
            $this->ErrorBlock = "Grid grdUserForum";
            $this->Attributes = new clsAttributes($this->ComponentName . ":");
            $this->DataSource = new clsgrdUserForumDataSource($this);
            $this->ds = & $this->DataSource;
            $this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
            if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
                $this->PageSize = 100000;
            else
                $this->PageSize = intval($this->PageSize);
            if ($this->PageSize > 100000)
                $this->PageSize = 100000;
            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;
    
        }
    //End Class_Initialize Event
    
    //Initialize Method @97-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 @97-D1939629
        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) {
                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->Attributes->SetValue("rowNumber", $this->RowNumber);
                    $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
                    $this->Attributes->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;
            }
            $Tpl->parse();
            $Tpl->block_path = $ParentPath;
            $this->DataSource->close();
        }
    //End Show Method
    
    //GetErrors Method @97-580C33D7
        function GetErrors()
        {
            $errors = "";
            $errors = ComposeStrings($errors, $this->Errors->ToString());
            $errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
            return $errors;
        }
    //End GetErrors Method
    
    } //End grdUserForum Class @97-FCB6E20C
    
    class clsgrdUserForumDataSource extends clsDBcnxRecensement {  //grdUserForumDataSource Class @97-0E82D588
    
    //DataSource Variables @97-404AA26D
        public $Parent = "";
        public $CCSEvents = "";
        public $CCSEventResult;
        public $ErrorBlock;
        public $CmdExecution;
    
        public $CountSQL;
        public $wp;
    
    
    //End DataSource Variables
    
    //DataSourceClass_Initialize Event @97-EBE10A90
        function clsgrdUserForumDataSource(& $Parent)
        {
            $this->Parent = & $Parent;
            $this->ErrorBlock = "Grid grdUserForum";
            $this->Initialize();
    
        }
    //End DataSourceClass_Initialize Event
    
    //SetOrder Method @97-B85F7BDE
        function SetOrder($SorterName, $SorterDirection)
        {
            $this->Order = "mehari_pseudo_forum asc";
        }
    //End SetOrder Method
    
    //Prepare Method @97-14D6CD9D
        function Prepare()
        {
            global $CCSLocales;
            global $DefaultDateFormat;
        }
    //End Prepare Method
    
    //Open Method @97-034E7563
        function Open()
        {
            $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
            $this->CountSQL = "SELECT COUNT(*) FROM rec_mehari \n" .
            "WHERE mehari_pseudo_ok = 1\n" .
            "GROUP BY rec_mehari.mehari_pseudo_forum";
            $this->SQL = "SELECT rec_mehari.mehari_pseudo_forum, count(rec_mehari.id) AS NbMemeUser \n" .
            "FROM rec_mehari \n" .
            "WHERE mehari_pseudo_ok = 1\n" .
            "GROUP BY rec_mehari.mehari_pseudo_forum {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 @97-BAF0975B
        function SetValues()
        {
        }
    //End SetValues Method
    
    } //End grdUserForumDataSource Class @97-FCB6E20C
    
    //Initialize Page @1-97344BBE
    // Variables
    $FileName = "";
    $Redirect = "";
    $Tpl = "";
    $TemplateFileName = "";
    $BlockToParse = "";
    $ComponentName = "";
    $Attributes = "";
    
    // Events;
    $CCSEvents = "";
    $CCSEventResult = "";
    $TemplateSource = "";
    
    $FileName = FileName;
    $Redirect = "";
    $TemplateFileName = "recensement_stats.html";
    $BlockToParse = "main";
    $TemplateEncoding = "UTF-8";
    $ContentType = "text/html";
    $PathToRoot = "./";
    $PathToRootOpt = "";
    $Scripts = "|";
    $Charset = $Charset ? $Charset : "utf-8";
    //End Initialize Page
    
    //Include events file @1-A428EA66
    include_once("./recensement_stats_events.php");
    //End Include events file
    
    //Before Initialize @1-E870CEBC
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage);
    //End Before Initialize
    
    //Initialize Objects @1-5797D768
    $DBcnxRecensement = new clsDBcnxRecensement();
    $MainPage->Connections["cnxRecensement"] = & $DBcnxRecensement;
    $Attributes = new clsAttributes("page:");
    $Attributes->SetValue("pathToRoot", $PathToRoot);
    $MainPage->Attributes = & $Attributes;
    
    // Controls
    $top = new clstop("", "top", $MainPage);
    $top->Initialize();
    $grdDepartement = new clsGridgrdDepartement("", $MainPage);
    $lnkEncours = new clsControl(ccsLink, "lnkEncours", "lnkEncours", ccsText, "", CCGetRequestParam("lnkEncours", ccsGet, NULL), $MainPage);
    $lnkEncours->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
    $lnkEncours->Page = "../publications_recensement/publication_encours.html";
    $imlPublication = new clsControl(ccsImageLink, "imlPublication", "imlPublication", ccsText, "", CCGetRequestParam("imlPublication", ccsGet, NULL), $MainPage);
    $imlPublication->Page = "";
    $grdRegion = new clsGridgrdRegion("", $MainPage);
    $grdPays = new clsGridgrdPays("", $MainPage);
    $grdType = new clsGridgrdType("", $MainPage);
    $grdSemaines = new clsGridgrdSemaines("", $MainPage);
    $lblListeFichier = new clsControl(ccsLabel, "lblListeFichier", "lblListeFichier", ccsText, "", CCGetRequestParam("lblListeFichier", ccsGet, NULL), $MainPage);
    $lblListeFichier->HTML = true;
    $grdUserForum = new clsGridgrdUserForum("", $MainPage);
    $MainPage->top = & $top;
    $MainPage->grdDepartement = & $grdDepartement;
    $MainPage->lnkEncours = & $lnkEncours;
    $MainPage->imlPublication = & $imlPublication;
    $MainPage->grdRegion = & $grdRegion;
    $MainPage->grdPays = & $grdPays;
    $MainPage->grdType = & $grdType;
    $MainPage->grdSemaines = & $grdSemaines;
    $MainPage->lblListeFichier = & $lblListeFichier;
    $MainPage->grdUserForum = & $grdUserForum;
    $imlPublication->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
    $imlPublication->Parameters = CCAddParam($imlPublication->Parameters, "action", add);
    $grdDepartement->Initialize();
    $grdRegion->Initialize();
    $grdPays->Initialize();
    $grdType->Initialize();
    $grdSemaines->Initialize();
    $grdUserForum->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-DC3EC8FB
    $top->Operations();
    //End Execute Components
    
    //Go to destination page @1-666EB96C
    if($Redirect)
    {
        $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
        $DBcnxRecensement->close();
        header("Location: " . $Redirect);
        $top->Class_Terminate();
        unset($top);
        unset($grdDepartement);
        unset($grdRegion);
        unset($grdPays);
        unset($grdType);
        unset($grdSemaines);
        unset($grdUserForum);
        unset($Tpl);
        exit;
    }
    //End Go to destination page
    
    //Show Page @1-0D26A9B1
    $top->Show();
    $grdDepartement->Show();
    $grdRegion->Show();
    $grdPays->Show();
    $grdType->Show();
    $grdSemaines->Show();
    $grdUserForum->Show();
    $lnkEncours->Show();
    $imlPublication->Show();
    $lblListeFichier->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-147AF4FB
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
    $DBcnxRecensement->close();
    $top->Class_Terminate();
    unset($top);
    unset($grdDepartement);
    unset($grdRegion);
    unset($grdPays);
    unset($grdType);
    unset($grdSemaines);
    unset($grdUserForum);
    unset($Tpl);
    //End Unload Page
    
    
    ?>