<?php // content="text/plain; charset=utf-8"
-error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
+error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE & ~E_DEPRECATED);
include ('config_local.php');
if (! ($db = new PDO("mysql:host=$mysql_host;port=$mysql_port;dbname=$mysql_schema",$mysql_user,$mysql_pwd,array( PDO::ATTR_PERSISTENT => false)))) {
- die('Не могу подключиться к БД');
+ die('Ð\9dе могу подключитьÑ\81Ñ\8f к БД');
}
}
$q = $db -> prepare(
- 'select u.name_short from units u where u.id='.$to_unit
+ 'select u.name_short,u.prec from units u where u.id='.$to_unit
);
$q -> execute();
while ($row = $q -> fetch(PDO::FETCH_ASSOC)) {
$param_unit = $row['name_short'];
+ $precision = $row['prec'];
}
$xdata = array();
$g->xaxis->HideLabels(True);
}
$g->xaxis->SetPos("min");
+ $g->yaxis->SetLabelFormat("%0.".$precision."f");
# $g->xaxis->scale->SetTimeAlign( HOURADJ_1 );
} else {
header("Content-Type: text/html; charset=UTF-8");
- die('СенÑ\81оÑ\80 не вÑ\8bбÑ\80ан!');
+ die('Ã\90¡Ã\90µÃ\90½Ã\91Â\81Ã\90¾Ã\91â\82¬ Ã\90½Ã\90µ Ã\90²Ã\91â\80¹Ã\90±Ã\91â\82¬Ã\90°Ã\90½!');
}