function stampaFormaz($SuffissoDB, $numMese, $anno) { $dbModel = new OpDbModelOpDb(); $Data = new DataModelData(); $formazioni = $dbModel->leggiFormaz($SuffissoDB, $numMese, $anno); if ($formazioni == NULL) { return "Date formazioni non ancora inserite"; } else { $html = ''; $Sett = $Data->getInfo('GiorniSettimana'); $giorniMese = $Data->days_in_month($numMese, $anno); $t = 0; for ($n = 0; $n <= $giorniMese; $n++) { if ($formazioni[$n] != '0' && $formazioni[$n] != NULL) { $g = $Sett[date("w", strtotime("{$anno}-{$numMese}-{$n}"))]; $html .= "\t\t\t"; if ($t % 2 == 0) { $html .= "<span class=\"color\">"; } $html .= "<span class=\"giorni\">" . $n . " " . $g . "</span> "; if (strcasecmp($formazioni[$n], "noNote") == '0') { $html .= "\n\t\t\t<br /> \n"; } else { $html .= $formazioni[$n] . "\n\t\t\t<br /> \n"; } if ($t % 2 == 0) { $html .= "</span>"; } $t++; } } return $html; } }