10 $echo=
'<table class="spip">';
14 <tr class="row_first">';
15 foreach($tEntetes as $s){
16 $echo.=
'<th scope="col" rowspan="2">'.$s.
'</th>';
23 foreach($tContent as $Ligne){
25 $echo.=
'<tr class="align_right ';
26 $echo.=($i%2==0)?
'row_even':
'row_odd';
28 foreach($Ligne as $Cellule){
29 $echo.=
'<td>'.$Cellule.
'</td>';
52 $tLib = $datas[
'tLib'];
53 if(!isset($datas[
'ValVar'])) {
58 foreach($tLib as $k=>$s) {
59 if(!in_array($k,array($datas[
'ValCal'],$datas[
'ValVar']))) {
62 $tEnt = array(_T(
'hydraulic:param_fixes'),_T(
'hydraulic:valeurs'));
65 if(!$datas[
'ValVar']) {
66 $tCnt[]=array(
'<b>'.$tLib[$datas[
'ValCal']].
'</b>',
'<b>'.
format_nombre($tRes[0], $datas[
'iPrec']).
'</b>');
68 spip_log($tFlag,
'hydraulic.'._LOG_DEBUG);
69 $tCnt[]= array(_T(
'hydraulic:type_ecoulement'),_T(
'hydraulic:flag_'.$tFlag[0]));
75 if($datas[
'ValVar']) {
77 foreach($tAbs as $k=>$Abs){
80 $tEnt = array($tLib[$datas[
'ValVar']],$tLib[$datas[
'ValCal']]);
84 if(is_infinite($tRes[0])){
88 $tRes = array_values($tRes);
92 $tAbs = array_values($tAbs);
98 include_spip(
'hyd_inc/graph.class');
99 $oGraph =
new cGraph(
'',$tLib[$datas[
'ValVar']],
'');
102 _T(
'hydraulic:param_'.$datas[
'ValCal']),
106 'lineWidth:3, showMarker:true, markerOptions:{style:\'filledCircle\', size:8}');
109 $graph = $oGraph->GetGraph(
'graphique',400,600);
112 $echo .=
'<table class="hyd_graph"><tr><td>'.$tableau_fixe.
'</td>';
113 if(isset($tableau_variable)) {
114 $echo .=
'<td width="5%"> </td><td>'.$tableau_variable.
'</td>';
116 $echo .=
'</tr></table>';
AfficheResultats($datas, $tAbs, $tRes, $tFlag=false)
Renvoie Le résultat sous la forme de tableaux et graphiques.
GetResultTable($tContent, $tEntetes=false)
Renvoie un tableau formaté à partir d'un array à deux dimensions.
Classe pour l'affichage des graphiques.
format_nombre($nombre, $dec)