Exemple #1
0
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<?php 
header('Content-type: text/html; charset=UTF-8');
$func = explode("_//_", $_POST['functional']);
$indicator = explode("_//_", $_POST['indicator']);
$units = $indicator[3];
$mode = explode("_//_", $_POST['mode']);
$year = $indicator[2];
require '../classes/csv.class.php';
$csvfilename = $indicator[1] . "_" . $mode[1] . "_" . $func[1] . ".csv";
$mycsv = new csv($csvfilename);
$top = explode("_//_", $mycsv->gettop());
$topname = $top[0];
$topval = $top[1];
if ($topval < 0) {
    $precision = 2;
}
if ($topval >= 0) {
    $precision = 0;
}
if ($topval > 1000) {
    $precision = -1;
}
if ($topval > 10000) {
    $precision = -2;
}
if ($topval > 100000) {
    $precision = -3;
}
# POT
if (substr($func[1], 0, 3) == "POT") {