.=< { 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_stats_events.php

    <?php
    //BindEvents Method @1-9A0C3396
    function BindEvents()
    {
        global $grdDepartement;
        global $grdRegion;
        global $grdPays;
        global $grdType;
        global $grdSemaines;
        global $lblListeFichier;
        global $grdUserForum;
        global $CCSEvents;
        $grdDepartement->CCSEvents["BeforeShowRow"] = "grdDepartement_BeforeShowRow";
        $grdRegion->CCSEvents["BeforeShowRow"] = "grdRegion_BeforeShowRow";
        $grdPays->CCSEvents["BeforeShowRow"] = "grdPays_BeforeShowRow";
        $grdType->CCSEvents["BeforeShowRow"] = "grdType_BeforeShowRow";
        $grdSemaines->lblNombreSemaine->CCSEvents["BeforeShow"] = "grdSemaines_lblNombreSemaine_BeforeShow";
        $grdSemaines->CCSEvents["BeforeShowRow"] = "grdSemaines_BeforeShowRow";
        $grdSemaines->CCSEvents["BeforeShow"] = "grdSemaines_BeforeShow";
        $lblListeFichier->CCSEvents["BeforeShow"] = "lblListeFichier_BeforeShow";
        $grdUserForum->CCSEvents["BeforeShowRow"] = "grdUserForum_BeforeShowRow";
        $CCSEvents["BeforeShow"] = "Page_BeforeShow";
        $CCSEvents["BeforeOutput"] = "Page_BeforeOutput";
    }
    //End BindEvents Method
    
    //grdDepartement_BeforeShowRow @4-CB0691E8
    function grdDepartement_BeforeShowRow(& $sender)
    {
        $grdDepartement_BeforeShowRow = true;
        $Component = & $sender;
        $Container = & CCGetParentContainer($sender);
        global $grdDepartement; //Compatibility
    //End grdDepartement_BeforeShowRow
    
    //Custom Code @5-2A29BDB7
    // -------------------------
        // Write your own code here.
    	global $str_departement_value;
    	global $str_departement_name;
    
    	if ($grdDepartement->ds->f("num_departement") == "")
    		$str_departement_name .= "'?:inconnu',";
    	else
    		$str_departement_name .= "'".addslashes($grdDepartement->ds->f("num_departement")).":".addslashes($grdDepartement->ds->f("departement_nom"))."',";
    	$str_departement_value .= $grdDepartement->ds->f("NbMemeDepartement").",";
    
    // -------------------------
    //End Custom Code
    
    //Close grdDepartement_BeforeShowRow @4-8BC1FAA9
        return $grdDepartement_BeforeShowRow;
    }
    //End Close grdDepartement_BeforeShowRow
    
    //grdRegion_BeforeShowRow @34-1CD9C5B6
    function grdRegion_BeforeShowRow(& $sender)
    {
        $grdRegion_BeforeShowRow = true;
        $Component = & $sender;
        $Container = & CCGetParentContainer($sender);
        global $grdRegion; //Compatibility
    //End grdRegion_BeforeShowRow
    
    //Custom Code @35-2A29BDB7
    // -------------------------
        // Write your own code here.
    	global $str_region_value;
    	global $str_region_name;
    
    	if ($grdRegion->ds->f("region_nom") == "")
    		$str_region_name .= "'inconnu',";
    	else
    		$str_region_name .= "'".addslashes($grdRegion->ds->f("region_nom"))."',";
    	$str_region_value .= $grdRegion->ds->f("NbMemeRegion").",";
    
    // -------------------------
    //End Custom Code
    
    //Close grdRegion_BeforeShowRow @34-EDAA0B5B
        return $grdRegion_BeforeShowRow;
    }
    //End Close grdRegion_BeforeShowRow
    
    //grdPays_BeforeShowRow @48-C41D4BD3
    function grdPays_BeforeShowRow(& $sender)
    {
        $grdPays_BeforeShowRow = true;
        $Component = & $sender;
        $Container = & CCGetParentContainer($sender);
        global $grdPays; //Compatibility
    //End grdPays_BeforeShowRow
    
    //Custom Code @49-2A29BDB7
    // -------------------------
        // Write your own code here.
    	global $str_pays_value;
    	global $str_pays_name;
    
    	if ($grdPays->ds->f("pays_nom") == "")
    		$str_pays_name .= "'inconnu',";
    	else
    		$str_pays_name .= "'".addslashes($grdPays->ds->f("pays_nom"))."',";
    	$str_pays_value .= $grdPays->ds->f("NbMemePays").",";
    
    // -------------------------
    //End Custom Code
    
    //Close grdPays_BeforeShowRow @48-E14414B9
        return $grdPays_BeforeShowRow;
    }
    //End Close grdPays_BeforeShowRow
    
    //grdType_BeforeShowRow @59-3E718C2C
    function grdType_BeforeShowRow(& $sender)
    {
        $grdType_BeforeShowRow = true;
        $Component = & $sender;
        $Container = & CCGetParentContainer($sender);
        global $grdType; //Compatibility
    //End grdType_BeforeShowRow
    
    //Custom Code @60-2A29BDB7
    // -------------------------
        // Write your own code here.
    	global $str_type_value;
    	global $str_type_name;
    
    	if ($grdType->ds->f("modele_desc") == "")
    		$str_type_name .= "'inconnu',";
    	else
    		$str_type_name .= "'".addslashes($grdType->ds->f("modele_desc"))."',";
    	$str_type_value .= $grdType->ds->f("NbMemeType").",";
    
    // -------------------------
    //End Custom Code
    
    //Close grdType_BeforeShowRow @59-FD2CEFF7
        return $grdType_BeforeShowRow;
    }
    //End Close grdType_BeforeShowRow
    
    //grdSemaines_lblNombreSemaine_BeforeShow @94-40CA366E
    function grdSemaines_lblNombreSemaine_BeforeShow(& $sender)
    {
        $grdSemaines_lblNombreSemaine_BeforeShow = true;
        $Component = & $sender;
        $Container = & CCGetParentContainer($sender);
        global $grdSemaines; //Compatibility
    //End grdSemaines_lblNombreSemaine_BeforeShow
    
    //Retrieve number of records @95-ABE656B4
        $Component->SetValue($Container->DataSource->RecordsCount);
    //End Retrieve number of records
    
    //Close grdSemaines_lblNombreSemaine_BeforeShow @94-77D272C6
        return $grdSemaines_lblNombreSemaine_BeforeShow;
    }
    //End Close grdSemaines_lblNombreSemaine_BeforeShow
    
    //grdSemaines_BeforeShowRow @84-8A9D9DB7
    function grdSemaines_BeforeShowRow(& $sender)
    {
        $grdSemaines_BeforeShowRow = true;
        $Component = & $sender;
        $Container = & CCGetParentContainer($sender);
        global $grdSemaines; //Compatibility
    //End grdSemaines_BeforeShowRow
    
    //Set Row Style @85-982C9472
        $styles = array("Row", "AltRow");
        if (count($styles)) {
            $Style = $styles[($Component->RowNumber - 1) % count($styles)];
            if (strlen($Style) && !strpos($Style, "="))
                $Style = (strpos($Style, ":") ? 'style="' : 'class="'). $Style . '"';
            $Component->Attributes->SetValue("rowStyle", $Style);
        }
    //End Set Row Style
    
    //Custom Code @92-2A29BDB7
    // -------------------------
        // Write your own code here.
    	global $j;
    	$str_2 = "";
    	$str  = "";
    	$i = 0;
    
    
    	$db = new clsDBcnxRecensement();
    
    //$con=mysqli_connect("mehariclubdd.mysql.db","mehariclubdd","OoCLcS5Z","mehariclubdd");
    // Check connection
    //if (mysqli_connect_errno())
      //{
     // echo "Failed to connect to MySQL: " . mysqli_connect_error();
      //}
    
      	$SQL = "SELECT r.mehari_id, d.num_departement, d.departement_nom, r.recensement_qui, r.mehari_pseudo_forum FROM rec_mehari r LEFT  JOIN rec_departements d ON r.departement_id = d.departement_id WHERE r.saisie BETWEEN  '";
    	$SQL .= $grdSemaines->ds->f("semaine_start");
    	$SQL .= "' AND  '";
    	$SQL .= $grdSemaines->ds->f("semaine_end");
    	$SQL .= "' ORDER  BY mehari_id";
    //echo "SQL : ".$SQL."<br>";
    	
    	$db->query($SQL);
    
    	while ($result = $db->next_record())
    	{
    		  $i++;
    		//echo "i : ".$i;
     	   	$str_2 .= "- ".$db->f('mehari_id')."ième ";
        	$str_2 .= "département ".$db->f('num_departement')." (".$db->f('departement_nom').")";
    		$str_2 .= " : celle de ";
    		if ($db->f('mehari_pseudo_forum') <> "")
        		$str_2 .= "[b][i]". $db->f('mehari_pseudo_forum')."[/i][/b]\n";
    		else 
    			$str_2 .= "[b]".$db->f('recensement_qui')."[/b]\n";
    		  }
      //else
      //echo "not ok<br>";
    	/*
     	while ($row = mysqli_fetch_assoc($result)) {
    		$i++;
    		echo "i : ".$i;
     	   	$str_2 .= "- ".$row['mehari_id']."ième ";
        	$str_2 .= "département ".$row['num_departement']." (".$row['departement_nom'].")";
    		$str_2 .= " : celle de ";
    		if ($row['mehari_pseudo_forum'] <> "")
        		$str_2 .= "[b][i]". $row['mehari_pseudo_forum']."[/i][/b]\n";
    		else 
    			$str_2 .= "[b]".$row['recensement_qui']."[/b]\n";
        }
    	*/
    	$nbr_total = 0;
    	$nbr_total = CCDLookUp("count(*)","rec_mehari","recensement_actif=1 and saisie <= '".$grdSemaines->ds->f("semaine_end")."'", $db);
    
    	$str = "[size=150][i][b][u]RECENSEMENT[/u] : [/b][/i][/size] [b][size=150] ".str_replace("-", " ", $grdSemaines->semaine_nom->Value)."[/size][/b], ".($grdSemaines->DataSource->RecordsCount-$j)."ième rapport hebdomadaire de recensement pour un total de [b][size=150]".$nbr_total."[/size][/b] Méhari.\n\n";
    	$str .= "Pour cette période [b][size=150][i][u]".substr(chunk_split(strtoupper(int2str($i)),1,' '),0,-1)."[/u][/i][/size][/b] [b]Méhari[/b] recensée";
    	if ($i > 1 )
    		$str .= "s";
    	$str .= " :\n\n";
    	$str .= $str_2;
    	$str .= "\nLien pour voir les statistiques : \n\n";
    	$grdSemaines->lblNombre->SetValue($str);      
      	$db->close();
    	$j++;
    
    // -------------------------
    //End Custom Code
    
    //Close grdSemaines_BeforeShowRow @84-07A777CD
        return $grdSemaines_BeforeShowRow;
    }
    //End Close grdSemaines_BeforeShowRow
    
    //grdSemaines_BeforeShow @84-B6012700
    function grdSemaines_BeforeShow(& $sender)
    {
        $grdSemaines_BeforeShow = true;
        $Component = & $sender;
        $Container = & CCGetParentContainer($sender);
        global $grdSemaines; //Compatibility
    //End grdSemaines_BeforeShow
    
    //Custom Code @96-2A29BDB7
    // -------------------------
        // Write your own code here.
    	global $j;
    	$j = 0;
    // -------------------------
    //End Custom Code
    
    //Close grdSemaines_BeforeShow @84-BBE899A3
        return $grdSemaines_BeforeShow;
    }
    //End Close grdSemaines_BeforeShow
    
    //lblListeFichier_BeforeShow @22-7BF816A7
    function lblListeFichier_BeforeShow(& $sender)
    {
        $lblListeFichier_BeforeShow = true;
        $Component = & $sender;
        $Container = & CCGetParentContainer($sender);
        global $lblListeFichier; //Compatibility
    //End lblListeFichier_BeforeShow
    
    //Custom Code @23-2A29BDB7
    // -------------------------
        // Write your own code here.
    	$directory = "../publications_recensement/";  
    //    if ($handle = opendir( $directory )) {  
    //        while ($file = readdir($handle)) {  
    //            if ($file != '.' && $file != '..' && $file != 'js' && $file != 'defaut.css' && $file != 'publication_encours.html') {
    //				$stat = stat($directory.$file);  
    //                $str_files.= "<a href=\"recensement_stats.php?action=del&filename=".$file."\"><img src=\"images/not_present.jpg\" alt=\"Supprimer ce fichier\"></a> <a href=\"".$directory.$file."\">".$file."</a> (créé le ".date("j-n-Y H:i:s", $stat['mtime']).")<br>";  
    //            }  
    //        }  
    //        closedir($handle);  
    //    }  
     
    chdir($directory); 
    array_multisort(array_map('filemtime', ($files = glob("*.*"))), SORT_DESC, $files); 
    $i=0;
    foreach($files as $filename) if ($i < 13)
    { 
    	if ($filename != '.' && $filename != '..' && $filename != 'js' && $filename != 'defaut.css' && $filename != 'publication_encours.html'  && $filename != 'chargement_photo_mcdf.swf' && $filename != 'chargement_photo_mcdf.html') {
    		$stat = stat($directory.$filename);
    		$str_files.= "<a href=\"recensement_stats.php?action=del&filename=".$filename."\"><img src=\"images/not_present.jpg\" alt=\"Supprimer ce fichier\"></a> <a href=\"".$directory.$filename."\">".$filename."</a> (créé le ".date("j-n-Y H:i:s", $stat['mtime']).")<br>"; 
       }
       // $str_files.= "<li>".$filename."</li>";  
    $i++;
    }  
    
    	$lblListeFichier->SetValue($str_files);
    // -------------------------
    //End Custom Code
    
    //Close lblListeFichier_BeforeShow @22-9ACA3B40
        return $lblListeFichier_BeforeShow;
    }
    //End Close lblListeFichier_BeforeShow
    
    //grdUserForum_BeforeShowRow @97-9EFBC969
    function grdUserForum_BeforeShowRow(& $sender)
    {
        $grdUserForum_BeforeShowRow = true;
        $Component = & $sender;
        $Container = & CCGetParentContainer($sender);
        global $grdUserForum; //Compatibility
    //End grdUserForum_BeforeShowRow
    
    //Custom Code @98-2A29BDB7
    // -------------------------
        // Write your own code here.
    	global $str_userforum;
    
    	$str_userforum .= "<b>".addslashes($grdUserForum->ds->f("mehari_pseudo_forum"))."</b>";
    	$str_userforum .= " --> ".$grdUserForum->ds->f("NbMemeUser")."<br>";
    
    // -------------------------
    //End Custom Code
    
    //Close grdUserForum_BeforeShowRow @97-E82F9BA1
        return $grdUserForum_BeforeShowRow;
    }
    //End Close grdUserForum_BeforeShowRow
    
    //Page_BeforeShow @1-83D4B92E
    function Page_BeforeShow(& $sender)
    {
        $Page_BeforeShow = true;
        $Component = & $sender;
        $Container = & CCGetParentContainer($sender);
        global $recensement_stats; //Compatibility
    //End Page_BeforeShow
    
    //Custom Code @20-2A29BDB7
    // -------------------------
        // Write your own code here.
      // -------------------------
          
      	$directory = "../publications_recensement/";  
      	global $Redirect;
      
      	if (CCGetParam("action","") == "add")
      	{
      		copy($directory."publication_encours.html", $directory."publication_".date("j_n_Y_H_i_s").".html");
        		$Redirect = "recensement_stats.php";
      	} 
      	elseif (CCGetParam("action","") == "del")
      	{
      		unlink($directory.CCGetParam("filename",""));
      		$Redirect = "recensement_stats.php";
      	} 
    
    // -------------------------
    //End Custom Code
    
    //Close Page_BeforeShow @1-4BC230CD
        return $Page_BeforeShow;
    }
    //End Close Page_BeforeShow
    
    //Page_BeforeOutput @1-0D4524F5
    function Page_BeforeOutput(& $sender)
    {
        $Page_BeforeOutput = true;
        $Component = & $sender;
        $Container = & CCGetParentContainer($sender);
        global $recensement_stats; //Compatibility
    //End Page_BeforeOutput
    
    //Custom Code @21-2A29BDB7
    // -------------------------
        // Write your own code here.
    	$directory = "../publications_recensement/";  
    	global $str;
    	global $str_departement_value;
    	global $str_departement_name;
    	global $str_region_value;
    	global $str_region_name;
    	global $str_pays_value;
    	global $str_pays_name;
    	global $str_type_value;
    	global $str_type_name;
    	global $str_userforum;
    
    	if ($str=="")
    	{
    		$str= "<html>\n";
    		$str.= "<head>\n";
    		$str.= "<title>Recensement Statistiques</title>\n";
    		$str.= "<link rel=\"stylesheet\" type=\"text/css\" href=\"defaut.css\">\n";
    //		$str.= "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n";
    //		$str.= "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n";
    		$str.= "<meta http-equiv=\"content-type\" content=\"text/html; charset=windows-1252\">\n";
    		$str.= "<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\"></script>\n";
    		$str.= "<script type=\"text/javascript\">//<![CDATA[\n";
    		$str.= "(function($){\n";
    		$str.= "$(function () {\n\n";
    
            $str.= "$('#container_dep').highcharts({\n";
    		$str.= "chart: {\n";
    		$str.= "type: 'bar'\n";
            $str.= "},\n";
            $str.= "title: {\n";
            $str.= "text: 'Nombre de méhari par département'\n";
            $str.= "},\n";
            $str.= "subtitle: {\n";
            $str.= "text: 'Source: recensement MCDF'\n";
            $str.= "},\n";
            $str.= "xAxis: {\n";
            $str.= "categories: [";
    		$str.= substr($str_departement_name, 0, -1);
    		$str.= "],\n";
            $str.= "title: {\n";
            $str.= "text: 'Départements'\n";
            $str.= "}\n";
            $str.= "},\n";
            $str.= "yAxis: {\n";
            $str.= "min: 0,\n";
            $str.= "title: {\n";
            $str.= "text: 'Nombre de méhari',\n";
            $str.= "align: 'high'\n";
            $str.= "},\n";
            $str.= "labels: {\n";
            $str.= "overflow: 'justify'\n";
            $str.= "}\n";
            $str.= "},\n";
            $str.= "tooltip: {\n";
            $str.= "valueSuffix: ' unités'\n";
            $str.= "},\n";
            $str.= "plotOptions: {\n";
            $str.= "bar: {\n";
    		$str.= "pointPadding: 0.2,\n";
    		$str.= "borderWidth: 0,\n";
    		$str.= "pointWidth: 10,\n";
    		$str.= "borderRadius: 2,\n";
            $str.= "    dataLabels: {\n";
            $str.= "enabled: true\n";
            $str.= "}\n";
            $str.= "}\n";
            $str.= "},\n";
            $str.= "legend: {\n";
    		$str.= "enabled: false\n";
            $str.= "},\n";
            $str.= "credits: {\n";
            $str.= "enabled: false\n";
            $str.= "},\n";
            $str.= "series: [{\n";
    		$str.= "name: 'Nb de méhari',\n";
            $str.= "data: [";
    		$str.= substr($str_departement_value, 0, -1);
    		$str.= "]\n";
            $str.= "}]\n";
            $str.= "});\n\n";
    
    		$str.= "$('#container_reg').highcharts({\n";
    		$str.= "chart: {\n";
    		$str.= "type: 'column'\n";
            $str.= "},\n";
            $str.= "title: {\n";
            $str.= "text: 'Nombre de méhari par région'\n";
            $str.= "},\n";
            $str.= "subtitle: {\n";
            $str.= "text: 'Source: recensement MCDF'\n";
            $str.= "},\n";
            $str.= "xAxis: {\n";
            $str.= "categories: [";
    		$str.= substr($str_region_name, 0, -1);
    		$str.= "],\n";
    		$str.= "labels: {\n";
    		$str.= "rotation: 270\n";
    		$str.= "},\n";
            $str.= "title: {\n";
            $str.= "text: null\n";
            $str.= "}\n";
            $str.= "},\n";
            $str.= "yAxis: {\n";
            $str.= "min: 0,\n";
            $str.= "title: {\n";
            $str.= "text: 'Nombre de méhari',\n";
            $str.= "align: 'high'\n";
            $str.= "},\n";
            $str.= "labels: {\n";
            $str.= "overflow: 'justify'\n";
            $str.= "}\n";
            $str.= "},\n";
            $str.= "tooltip: {\n";
            $str.= "valueSuffix: ' unités'\n";
            $str.= "},\n";
            $str.= "plotOptions: {\n";
            $str.= "column: {\n";
            $str.= "pointPadding: 0.2,\n";
    		$str.= "borderWidth: 0,\n";
    		$str.= "pointWidth: 8,\n";
    		$str.= "borderRadius: 2,\n";
    		$str.= "    dataLabels: {\n";
            $str.= "enabled: false\n";
            $str.= "}\n";
            $str.= "}\n";
            $str.= "},\n";
            $str.= "legend: {\n";
    		$str.= "enabled: false\n";
            $str.= "},\n";
            $str.= "credits: {\n";
            $str.= "enabled: false\n";
            $str.= "},\n";
            $str.= "series: [{\n";
    		$str.= "name: 'Nb de méhari',\n";
            $str.= "data: [";
    		$str.= substr($str_region_value, 0, -1);
    		$str.= "]\n";
            $str.= "}]\n";
            $str.= "});\n\n";
    
    		$str.= "$('#container_pays').highcharts({\n";
    		$str.= "chart: {\n";
    		$str.= "type: 'column'\n";
            $str.= "},\n";
            $str.= "title: {\n";
            $str.= "text: 'Nombre de méhari par pays'\n";
            $str.= "},\n";
            $str.= "subtitle: {\n";
            $str.= "text: 'Source: recensement MCDF'\n";
            $str.= "},\n";
            $str.= "xAxis: {\n";
            $str.= "categories: [";
    		$str.= substr($str_pays_name, 0, -1);
    		$str.= "],\n";
    		$str.= "labels: {\n";
    		$str.= "rotation: 270\n";
    		$str.= "},\n";
            $str.= "title: {\n";
            $str.= "text: null\n";
            $str.= "}\n";
            $str.= "},\n";
            $str.= "yAxis: {\n";
            $str.= "min: 0,\n";
            $str.= "title: {\n";
            $str.= "text: 'Nombre de méhari',\n";
            $str.= "align: 'high'\n";
            $str.= "},\n";
            $str.= "labels: {\n";
            $str.= "overflow: 'justify'\n";
            $str.= "}\n";
            $str.= "},\n";
            $str.= "tooltip: {\n";
            $str.= "valueSuffix: ' unités'\n";
            $str.= "},\n";
            $str.= "plotOptions: {\n";
            $str.= "column: {\n";
            $str.= "pointPadding: 0.2,\n";
    		$str.= "borderWidth: 0,\n";
    		$str.= "pointWidth: 11,\n";
    		$str.= "borderRadius: 2,\n";
    		$str.= "    dataLabels: {\n";
            $str.= "enabled: true\n";
            $str.= "}\n";
            $str.= "},\n";
    		$str.= "series: {\n";
            $str.= "dataLabels: {\n";
            $str.= "enabled: true\n";
            $str.= "}\n";
            $str.= "}\n";
            $str.= "},\n";
            $str.= "legend: {\n";
    		$str.= "enabled: false\n";
            $str.= "},\n";
            $str.= "credits: {\n";
            $str.= "enabled: false\n";
            $str.= "},\n";
            $str.= "series: [{\n";
    		$str.= "name: 'Nb de méhari',\n";
            $str.= "data: [";
    		$str.= substr($str_pays_value, 0, -1);
    		$str.= "]\n";
            $str.= "}]\n";
            $str.= "});\n\n";
    
    		$str.= "$('#container_type').highcharts({\n";
    		$str.= "chart: {\n";
    		$str.= "type: 'column'\n";
            $str.= "},\n";
            $str.= "title: {\n";
            $str.= "text: 'Nombre de méhari par modèle'\n";
            $str.= "},\n";
            $str.= "subtitle: {\n";
            $str.= "text: 'Source: recensement MCDF'\n";
            $str.= "},\n";
            $str.= "xAxis: {\n";
            $str.= "categories: [";
    		$str.= substr($str_type_name, 0, -1);
    		$str.= "],\n";
    		$str.= "labels: {\n";
    		$str.= "rotation: 270\n";
    		$str.= "},\n";
            $str.= "title: {\n";
            $str.= "text: null\n";
            $str.= "}\n";
            $str.= "},\n";
            $str.= "yAxis: {\n";
            $str.= "min: 0,\n";
            $str.= "title: {\n";
            $str.= "text: 'Nombre de méhari',\n";
            $str.= "align: 'high'\n";
            $str.= "},\n";
            $str.= "labels: {\n";
            $str.= "overflow: 'justify'\n";
            $str.= "}\n";
            $str.= "},\n";
            $str.= "tooltip: {\n";
            $str.= "valueSuffix: ' unités'\n";
            $str.= "},\n";
            $str.= "plotOptions: {\n";
            $str.= "column: {\n";
            $str.= "pointPadding: 0.2,\n";
    		$str.= "borderWidth: 0,\n";
    		$str.= "pointWidth: 15,\n";
    		$str.= "borderRadius: 2,\n";
    		$str.= "    dataLabels: {\n";
            $str.= "enabled: true\n";
            $str.= "}\n";
            $str.= "},\n";
    		$str.= "series: {\n";
            $str.= "dataLabels: {\n";
            $str.= "enabled: true\n";
            $str.= "}\n";
            $str.= "}\n";
            $str.= "},\n";
            $str.= "legend: {\n";
    		$str.= "enabled: false\n";
            $str.= "},\n";
            $str.= "credits: {\n";
            $str.= "enabled: false\n";
            $str.= "},\n";
            $str.= "series: [{\n";
    		$str.= "name: 'Nb de méhari',\n";
            $str.= "data: [";
    		$str.= substr($str_type_value, 0, -1);
    		$str.= "]\n";
            $str.= "}]\n";
            $str.= "});\n";
    
            $str.= "});\n";
    		$str.= "})(jQuery);\n";
    		$str.= "//]]>\n";
    		$str.= "</script>\n";
    		$str.= "</head>\n";
    		$str.= "<body>\n";
    		
    		$str.= "<script src=\"http://code.highcharts.com/highcharts.js\"></script>\n";
    		$str.= "<script src=\"http://code.highcharts.com/modules/exporting.js\"></script>\n";
    
    		$str.= "<div id=\"container_dep\"></div>\n";
    		$str.= "<div id=\"container_reg\"></div>\n";
    		$str.= "<div id=\"container_pays\"></div>\n";
    		$str.= "<div id=\"container_type\"></div>\n";
    		//$str.= "<div id=\"container_forum\">".$str_userforum."</div>\n";
    		$str.= "</body>\n";
    		$str.= "</html>\n";
    	}	
    
    	
    	$file = $directory."publication_encours.html";
    	$f = fopen($file,'w');
    	fwrite($f,$str,strlen($str));
    	fclose($f); 
    // -------------------------
    //End Custom Code
    
    //Close Page_BeforeOutput @1-8964C188
        return $Page_BeforeOutput;
    }
    //End Close Page_BeforeOutput
    
    
    
    ?>