Skip to content

Commit

Permalink
Fix riepilogo interventi
Browse files Browse the repository at this point in the history
  • Loading branch information
anas-araid committed Dec 1, 2018
1 parent d0035a1 commit 41bc7cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
try{
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// error_reporting per togliere il notice quando non trova isLogged
//error_reporting(0);
error_reporting(0);
include "core/dbConnection.php";
if (isset($_GET['back'])) {
$_SESSION['include'] = 'core/reports.php';
Expand Down
10 changes: 5 additions & 5 deletions stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ function updateYears() {
<!-- ### GRAFICO MEZZI FREQUENTI ### -->

<?php
$interventi = getMezziIntervenuti($annoSelezionato, $db_conn, true);
$mezziIntervenuti = getMezziIntervenuti($annoSelezionato, $db_conn, true);
$chartData = array();
$chartLabel = array();
// creo due array contenenti uno il nome dell'intervento, e l'altro il numero
for ($i=0; $i<count($interventi);$i++){
$chartData[$i] = $interventi[$i][1];
$chartLabel[$i] = $interventi[$i][0];
for ($i=0; $i<count($mezziIntervenuti);$i++){
$chartData[$i] = $mezziIntervenuti[$i][1];
$chartLabel[$i] = $mezziIntervenuti[$i][0];
}
// conversione da array php a qullo javscript
$chartLabel = json_encode($chartLabel);
Expand Down Expand Up @@ -326,7 +326,7 @@ function updateYears() {
}else{
$inter = "interventi";
}
//print_r($interventi);
print_r($interventi);
$tipoIntervento = $interventi[$i][0];
$totInterventi = $interventi[$i][1];
$tuttiInterventi .= "<b>$tipoIntervento: </b> $totInterventi $inter <br>";
Expand Down

0 comments on commit 41bc7cd

Please sign in to comment.