コード例 #1
0
 public function getFormRichiestaInserimento()
 {
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'data.php';
     $d = new DataModelData();
     $mail = $this->getMailStaff();
     $FormRichiestaInserimento = array('nome' => 'FormRichiestaInserimento', 'campi' => array('type' => 'text', 'label' => 'Sono ', 'name' => 'nomeClown', 'value' => '(Inserisci il tuo nome)'), array('type' => 'text', 'label' => ', la mia mail è: ', 'name' => 'mailClown', 'value' => '(Inserisci la tua mail)'), array('type' => 'select', 'label' => ' <br />e vorrei iscrivermi per il turno del', 'name' => 'gg'), array('type' => 'select', 'label' => ' ', 'name' => 'mm', 'value' => '(Inserisci il tuo nome)', 'option' => array($d->getInfo(MeseAttuale), $d->getInfo(MeseProssimo))), array('type' => 'textarea', 'label' => '<br /> <br /> <span style="font-size:14px;">(Per comunicazioni aggiuntive puoi compilare questo campo, che verrà aggiunto alla mail):</span> ', 'name' => 'agg'), array('type' => 'submit', 'label' => '<br /> <br />', 'name' => 'Invia', 'value' => 'Invia'), array('type' => 'hidden', 'name' => 'option', 'value' => 'com_turniservizi'), array('type' => 'hidden', 'name' => 'task', 'value' => 'inviaRichiestaInserimento'), array('type' => 'hidden', 'name' => 'mail', 'value' => $mail));
     return $FormRichiestaInserimento;
 }
コード例 #2
0
 public function servizi($mese, $anno)
 {
     $model = new TurniServiziModelTurniServizi();
     $modelData = new DataModelData();
     $modelDB = new OpDBModelOpDB();
     $giorni_servizio = $model->getServizi();
     $giorni_settimana = $modelData->getInfo('GiorniSettimana');
     $giorni_del_mese = $modelData->days_in_month($mese, $anno);
     $servizi_nel_mese = array_fill(1, $giorni_del_mese, 0);
     $servizi_nel_mese[0] = '0';
     $UltimiDelMese = array_fill(0, 6, 0);
     //Se uno dei giorni è settato come "Solo ultimo del mese" cerca qual'è l'ultimo
     // di quei giorni nel mese.
     for ($t = 0; $t <= 6; $t++) {
         if ($t < 6) {
             $S = $giorni_settimana[$t + 1];
         } else {
             $S = $giorni_settimana[0];
         }
         if (strcasecmp($giorni_servizio[$t], 'Ultimo' . $S) == '0') {
             for ($n = 1; $n <= $giorni_del_mese; $n++) {
                 $g = $giorni_settimana[date("w", strtotime("{$anno}-{$mese}-{$n}"))];
                 if (strcasecmp($g, $S) == '0') {
                     $UltimiDelMese[$t] = $n;
                 }
             }
         }
     }
     //crea un array in cui inserisce i giorni di servizio
     for ($n = 1; $n <= $giorni_del_mese; $n++) {
         for ($t = 0; $t <= 6; $t++) {
             $g = $giorni_settimana[date("w", strtotime("{$anno}-{$mese}-{$n}"))];
             if (strcasecmp($giorni_servizio[$t], $g) == '0') {
                 $servizi_nel_mese[$n] = $g;
             }
             if (strcasecmp($giorni_servizio[$t], 'Ultimo' . $g) == '0') {
                 if ($n == $UltimiDelMese[$t]) {
                     $servizi_nel_mese[$n] = $g;
                 }
             }
         }
     }
     //controlla se ci sono altri servizi nel DB
     $servizi_in_db = $modelDB->serviziInDb($mese, $anno);
     if ($servizi_in_db != NULL) {
         for ($n = 0; $n <= $giorni_del_mese; $n++) {
             if ($servizi_in_db[$n] != '0') {
                 $servizi_nel_mese[$n] = $servizi_in_db[$n];
             }
         }
     }
     return $servizi_nel_mese;
 }
コード例 #3
0
 function infoFormazioni($info, $meseDa, $annoDa, $meseA, $annoA, $SuffissoDB, $clown = NULL)
 {
     $dbModel = new OpDbModelOpDb();
     $Data = new DataModelData();
     $formazioni = $dbModel->leggiFormazioni($meseDa, $annoDa, $meseA, $annoA, $SuffissoDB);
     if ($info == "dateNonFormattate") {
         return $formazioni[0];
     } else {
         if ($info == "date") {
             $tmp = $formazioni[0];
             $mesi = $Data->getInfo('MesiAnno');
             for ($n = 0; $tmp[$n]; $n++) {
                 $dataTmp = explode('-', $tmp[$n]);
                 if ($dataTmp[1] <= 9) {
                     $tmp[$n] = $dataTmp[2] . " " . $mesi[substr($dataTmp[1], 1)];
                 } else {
                     $tmp[$n] = $dataTmp[2] . " " . $mesi[$dataTmp[1]];
                 }
             }
             return $tmp;
         } else {
             if ($info == "presenze") {
                 $formaz = $formazioni[0];
                 $presenze = $formazioni[2];
                 for ($n = 0; $formaz[$n]; $n++) {
                     $ret->{$formaz}[$n] = $presenze[$n];
                 }
                 return $ret;
             } else {
                 if ($info == "contaPresenze") {
                     $ret = $dbModel->contaPresenze($clown, $meseDa, $annoDa, $meseA, $annoA, $SuffissoDB);
                     return $ret;
                 }
             }
         }
     }
     return 1;
 }
コード例 #4
0
 function serviziInDb($m, $a, $tabella)
 {
     //restituisce i servizi in quel mese già inseriti nel db
     $data = new DataModelData();
     $giorniMese = $data->days_in_month($m, $a);
     $clownInServ = array_fill(1, $giorniMese, 0);
     $servExtra = array_fill(1, $giorniMese, 0);
     //Se il mese (e il giorno) è minore di 9 aggiungi uno zero
     if ($giorno <= 9) {
         $giorno = "0" . $giorno;
     }
     if ($m <= 9) {
         $m = "0" . $m;
     }
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     $query = "SELECT * FROM `{$tabella}` WHERE  YEAR(Data) = {$a} AND MONTH(Data) = {$m} ORDER BY DAY(Data)";
     $db->setQuery($query);
     $db->query();
     $rows = $db->loadObjectList();
     if ($rows != NULL) {
         foreach ($rows as $row) {
             $tmp = explode('-', $row->Data);
             $giorno = $tmp[2];
             if ($giorno <= 9) {
                 $giorno = substr($giorno, 1);
             }
             $clownInServ[$giorno] = $row->Nomi;
             $servExtra[$giorno] = $row->Altro;
         }
         $tmp[0] = $clownInServ;
         $tmp[1] = $servExtra;
         return $tmp;
     } else {
         return NULL;
     }
 }
コード例 #5
0
 function leggiFormazioni($mFrom, $aFrom, $mTo, $aTo)
 {
     $model = new FormazioniModelFormazioni();
     $modelData = new DataModelData();
     $suff_db = $model->getSuffissoDB();
     $tabella = "#__formazioni_" . $suff_db;
     //if($mFrom<=9){$mFrom = "0".$mFrom;}
     //if($mTo<=9){$mTo = "0".$mTo;}
     $gTo = $modelData->days_in_month($mTo, $aTo);
     $giorni_settimana = $modelData->getInfo('GiorniSettimana');
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     $query = "SELECT * FROM `{$tabella}` WHERE  DATA >= '{$aFrom}-{$mFrom}-1' AND DATA <= '{$aTo}-{$mTo}-{$gTo}' ORDER BY DATA ";
     $db->setQuery($query);
     $db->query();
     $rows = $db->loadObjectList();
     //array di mesi intercorrenti tra $mFrom e $mTo (1,mese,0,  1,mese,0  ecc..):
     $a_Tmp = $aFrom;
     $m_Tmp = $mFrom;
     $data_fine = "{$mTo}-{$aTo}";
     for ($i = 0; strcasecmp("{$m_Tmp}-{$a_Tmp}", $data_fine) != '0'; $i++) {
         $array_formazioni[$i] = 1;
         $i++;
         $array_formazioni[$i] = $modelData->meseFromNumToText($m_Tmp);
         $array_formazioni[$i] .= " {$a_Tmp}";
         $i++;
         $array_formazioni[$i] = 0;
         $m_Tmp++;
         if ($m_Tmp == 13) {
             $m_Tmp = 1;
             $a_Tmp++;
         }
         // mese restante - da fare prima che si chiuda il ciclo for
         if (strcasecmp("{$m_Tmp}-{$a_Tmp}", $data_fine) == '0') {
             $i++;
             $array_formazioni[$i] = 1;
             $i++;
             $array_formazioni[$i] = $modelData->meseFromNumToText($m_Tmp);
             $array_formazioni[$i] .= " {$a_Tmp}";
             $i++;
             $array_formazioni[$i] = 0;
         }
     }
     if ($rows == NULL) {
         //NESSUNA FORMAZIONE TROVATA,
         $formazioni[0] = $array_formazioni;
         $formazioni[1] = $array_formazioni;
         $formazioni[2] = $array_formazioni;
         return $formazioni;
     } else {
         $i = 0;
         foreach ($rows as $row) {
             $date_formazioni_db[$i] = $row->Data;
             $note_formazioni_db[$i] = $row->Note;
             $presenze_formazioni_db[$i] = $row->Presenze;
             $i++;
         }
         $m = 0;
         $t = 0;
         for ($n = 0; $n < count($array_formazioni); $n++) {
             $date_formazioni[$t] = $array_formazioni[$n];
             $note_formazioni[$t] = $array_formazioni[$n];
             $presenze_formazioni[$t] = $array_formazioni[$n];
             $t++;
             if (isset($date_formazioni_db[$m])) {
                 $data = explode('-', $date_formazioni_db[$m]);
                 $mese = $data[1];
                 $mese = $modelData->meseFromNumToText($mese);
                 $anno = $data[0];
                 while (strcasecmp("{$mese} {$anno}", $array_formazioni[$n]) == 0) {
                     $date_formazioni[$t] = $date_formazioni_db[$m];
                     $note_formazioni[$t] = $note_formazioni_db[$m];
                     $presenze_formazioni[$t] = $presenze_formazioni_db[$m];
                     $m++;
                     $data = explode('-', $date_formazioni_db[$m]);
                     $mese = $data[1];
                     $mese = $modelData->meseFromNumToText($mese);
                     $anno = $data[0];
                     $t++;
                 }
             }
         }
         //formatta le date per le select:
         $index = 0;
         for ($i = 0; $i < count($date_formazioni); $i++) {
             if ($date_formazioni[$i] != '0' && $date_formazioni[$i] != '1' && $date_formazioni[$i - 1] != '1') {
                 $data = explode('-', $date_formazioni[$i]);
                 if ($data[2] <= 9) {
                     $data[2] = substr($data[2], 1);
                 }
                 if ($data[1] <= 9) {
                     $data[1] = substr($data[1], 1);
                 }
                 $date_formazioni_formattate[$index] = $data[2] . " " . $modelData->meseFromNumToText($data[1]);
                 $index++;
             }
         }
         $formazioni[0] = $date_formazioni;
         $formazioni[1] = $note_formazioni;
         $formazioni[2] = $presenze_formazioni;
         $formazioni[3] = $date_formazioni_formattate;
         return $formazioni;
     }
 }
コード例 #6
0
 function stampaDateMese($m, $a, $serviziNelMese, $SuffissoDB)
 {
     //funzione principale che ritorna l'html da stampare
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'opdb.php';
     $dbModel = new OpDbModelOpDb();
     $Data = new DataModelData();
     $tabella = '#__servizi_' . $SuffissoDB;
     $tmp = $dbModel->serviziInDb($m, $a, $tabella);
     $servExtra = $tmp[1];
     $GiorniMese = $Data->days_in_month($m, $a);
     $GiorniSettimana = $Data->getInfo('GiorniSettimana');
     $mesi = $Data->getInfo('MesiAnno');
     $mese = $mesi[$m];
     $t = 0;
     for ($n = 1; $n < $GiorniMese; $n++) {
         $data = $a . "-" . $m . "-" . $n;
         if ($servExtra[$n] != NULL && strcasecmp($servExtra[$n], '0') != 0 && strcasecmp($serviziNelMese[$n], '0') == 0) {
             //Servizio "speciale"
             $html[$t] = "<br />" . $GiorniSettimana[date("w", strtotime($data))] . " {$n} {$mese}";
             $t++;
         } else {
             if (strcasecmp($serviziNelMese[$n], '0') != 0) {
                 // Servizio normale
                 $html[$t] = "<br />" . $GiorniSettimana[date("w", strtotime($data))] . " {$n} {$mese}";
                 if ($servExtra[$n] != '0' && $servExtra[$n] != NULL) {
                     $html[$t] .= " ({$servExtra[$n]})";
                 } else {
                     $html[$t] .= "</span>";
                 }
                 $t++;
             }
         }
     }
     return $html;
 }
コード例 #7
0
 function rimClown($nome, $giorno, $mese, $anno)
 {
     $nome = trim($nome);
     //Elimina gli spazi vuoti da inizio e fine
     $nome = str_replace(' ', '_', $nome);
     //Sostituisce gli spazi in mezzo con '_'
     $model = new TurniServiziModelTurniServizi();
     $modelData = new DataModelData();
     $suff_db = $model->getSuffissoDB();
     $tabella = "#__servizi_" . $suff_db;
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     //Se il mese (e il giorno) è minore di 9 aggiungi uno zero
     if ($giorno <= 9 && strlen($giorno) < 2) {
         $giorno = "0" . $giorno;
     }
     if ($mese <= 9 && strlen($mese) < 2) {
         $mese = "0" . $mese;
     }
     //Recupera i nomi dei clown presenti in servizio
     $query = "SELECT * FROM `{$tabella}` WHERE YEAR(Data) = {$anno} AND MONTH(Data) = {$mese} AND DAY(Data) = {$giorno} ";
     $db->setQuery($query);
     $db->query();
     $rows = $db->loadObjectList();
     //Richiama la mail per poter inviare una notifica allo staff e prepara il contenuto
     $mail_staff = $model->getMailStaff();
     $mail_bcc = $model->getMailBcc();
     //recupera la mail del clown:
     $elenco = $this->leggiElencoClowns();
     $nomiClown = $elenco['nomiClowns'];
     $elenco_mail = $elenco['mail'];
     for ($i = 0; $i < count($nomiClown); $i++) {
         if (strcasecmp($nome, $nomiClown[$i]) == '0') {
             $mail_clown = $elenco_mail[$i];
         }
     }
     // Headers, subject e message staff
     $headers_staff .= "From: Gestione Servizi Online <*****@*****.**>\r\n";
     $headers_staff .= "Reply-To: " . $mail_clown . "\r\n";
     $headers_staff .= "Bcc: " . $mail_bcc . "\r\n";
     $subject_staff = "Conferma cancellazione clown " . $nome . "dal servizio";
     $message_staff = "Ciao staff Ospedale!\n\n" . $nome . " e' stato rimosso/a dal servizio del giorno " . $giorno . " " . $modelData->meseFromNumToText($mese) . ".\n\n";
     $message_staff .= "Un messaggio di notifica e' gia' stato inviato al suo indirizzo " . $mail_clown . " al quale potete scrivere rispondendo a questa mail. \n\n";
     $message_staff .= "Grazie, \nil servizio online di gestione turni automatico di Split.\n\n";
     // Headers, subject e message clow
     $headers_clown .= "From: Gestione Servizi Online <*****@*****.**>\r\n";
     $headers_clown .= "Reply-To: " . $mail_staff . "\r\n";
     $subject_clown = "Il tuo nome e' stato rimosso da un servizio";
     $message_clown = "Ciao " . $nome . ",  il tuo nome e' stato cancellato dal servizio del giorno " . $giorno . " " . $modelData->meseFromNumToText($mese) . ".\n\n";
     $message_clown .= "Per comunicare con lo staff ospedale puoi scrivere all'indirizzo " . $mail_staff . " oppure rispondere a quesa mail. \n\n";
     $message_clown .= "Grazie, \nil servizio online di gestione turni automatico di Split.\n\n";
     if ($rows == NULL) {
         return 1;
         //se non c'è il mese nel db
     } else {
         foreach ($rows as $row) {
             $nomi = $row->Nomi;
             $etichetta = $row->Etichetta;
         }
         if ($nomi == '-') {
             return 1;
             //Il servizio anche se ha un etichetta è vuoto.
         } else {
             //Converti il campo in array di stringhe
             $nomiVecchi = explode(' ', $nomi);
             //verifica che il nome sia nel db
             $check = 0;
             for ($i = 0; $i < count($nomiVecchi); $i++) {
                 if ($nomiVecchi[$i] == $nome) {
                     //Il clown è nel servizio. continua oltre.
                     $check = 1;
                     $i = count($nomiVecchi) + 1;
                 }
             }
             if ($check == 0) {
                 return 1;
             } else {
                 //elimino nome dall'array
                 //se c'è un solo nome elimina la riga nel db ma solo se non ci sono etichette
                 if ($nomiVecchi[1] == NULL && $etichetta == NULL) {
                     //un solo nome e nessuna etichetta
                     $query = "DELETE FROM `{$tabella}` WHERE Nomi='{$nomi}' AND YEAR(Data) = {$anno} AND MONTH(Data) = {$mese} AND DAY(Data) = {$giorno} ";
                     $db->setQuery($query);
                     $db->query();
                     mail($mail_staff, $subject_staff, $message_staff, $headers_staff);
                     //Mail allo staff
                     mail($mail_clown, $subject_clown, $message_clown, $headers_clown);
                     //Mail al clown
                     return 0;
                 } else {
                     if ($nomiVecchi[1] == NULL && $etichetta != NULL) {
                         //se c'è un solo nome e nessuna etichetta
                         $query = "UPDATE `{$tabella}` SET Nomi='-' WHERE YEAR(Data) = {$anno} AND MONTH(Data) = {$mese} AND DAY(Data) = {$giorno} ";
                         $db->setQuery($query);
                         $db->query() == 1;
                         mail($mail_staff, $subject_staff, $message_staff, $headers_staff);
                         //Mail allo staff
                         mail($mail_clown, $subject_clown, $message_clown, $headers_clown);
                         //Mail al clown
                         return 0;
                     } else {
                         for ($i = 0; $nomiVecchi[$i] != NULL; $i++) {
                             if ($nomiVecchi[$i] == $nome) {
                                 while ($nomiVecchi[$i] != NULL) {
                                     $nomiVecchi[$i] = $nomiVecchi[$i + 1];
                                     $i++;
                                 }
                             }
                         }
                     }
                 }
                 // Ricostruisci stringa unica per il db
                 for ($n = 1; $nomiVecchi[$n] != NULL; $n++) {
                     $nomiVecchi[0] = $nomiVecchi[0] . " " . $nomiVecchi[$n];
                 }
                 $nomiNuovi = $nomiVecchi[0];
                 //Modifica nomi in campo
                 $query = "UPDATE `{$tabella}` SET Nomi=\"{$nomiNuovi}\" WHERE YEAR(Data) = {$anno} AND MONTH(Data) = {$mese} AND DAY(Data) = {$giorno} ";
                 $db->setQuery($query);
                 $db->query();
                 mail($mail_staff, $subject_staff, $message_staff, $headers_staff);
                 //Mail allo staff
                 mail($mail_clown, $subject_clown, $message_clown, $headers_clown);
                 //Mail al clown
                 return 0;
             }
         }
     }
 }
コード例 #8
0
 function modificaNote()
 {
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'data.php';
     $modelData = new DataModelData();
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'functions.php';
     $modelFunctions = new FunctionsModelFunctions();
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'opdb.php';
     $modelOpDB = new OpDbModelOpDB();
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'turniservizi.php';
     $mm = JRequest::getVar('mm');
     $note = JRequest::getVar('note');
     $mm = $modelData->meseFromTextToNum($mm);
     //trasforma il mese da testuale a numero
     $aa = $modelData->calcolaAnno($mm);
     //calcola l'anno in base al mese
     $modifica = $modelOpDB->modificaNote($note, $mm, $aa);
     $vName = JRequest::getCmd('view', 'categories');
     JRequest::setVar('view', $vName);
     $view = $this->getView($vName, 'html');
     $view->setModel($this->getModel('turniservizi'), true);
     $view->set('modelData', $modelData);
     $view->set('modelFunzioni', $modelFunctions);
     $view->set('modelOpDB', $modelOpDB);
     if ($modifica == 0) {
         $view->set('mese', $modelData->meseFromNumToText($mm));
         $view->set('messaggio', 'note-modificata');
     } else {
         if ($modifica == 1) {
             $view->set('mese', $modelData->meseFromNumToText($mm));
             $view->set('messaggio', 'note-cancellate');
         } else {
             //stampa errore
             $view->set('messaggio', 'errore');
         }
     }
     parent::display();
     //$view->display();
 }
コード例 #9
0
 function modificaNote()
 {
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'data.php';
     $modelData = new DataModelData();
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'functions.php';
     $f = new FunctionsModelFunctions();
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'opdb.php';
     $modelOpDB = new OpDbModelOpDB();
     $model = $this->getModel('gestisci_turni');
     $view = $this->getView('gestisci_turni', 'html');
     $note = JRequest::getVar('note');
     $mese = JRequest::getVar('mm');
     $mesi = $modelData->getInfo('MesiAnno');
     $SuffissoDB = $model->getSuffissoDB();
     for ($m = 0; $m <= 12; $m++) {
         //trasforma il mese da testuale a numero
         if ($mesi[$m] == $mese) {
             $mm = $m;
         }
     }
     //Calcola l'anno
     if ($mm == $modelData->getInfo('NumMeseAttuale')) {
         $aa = $modelData->getInfo('AnnoAttuale');
     } else {
         if ($mm == $modelData->getInfo('NumMeseProssimo')) {
             $aa = $modelData->getInfo('AnnoMeseProssimo');
         }
     }
     $modifica = $modelOpDB->modificaNote($SuffissoDB, $note, $mm, $aa);
     $view->set('Data', $modelData);
     $view->set('Funzioni', $f);
     if ($modifica == 0) {
         $view->set('messaggio', 'nota_modificata');
     } else {
         //stampa errore
         $view->set('messaggio', 'errore');
     }
     parent::display();
     //$view->display();
 }
コード例 #10
0
 function modNoteFormaz()
 {
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'data.php';
     $modelData = new DataModelData();
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'opdb.php';
     $modelOpDB = new OpDbModelOpDB();
     $vName = JRequest::getCmd('view', 'categories');
     JRequest::setVar('view', $vName);
     $view = $this->getView($vName, 'html');
     $view->setModel($this->getModel('formazioni'), true);
     $data = JRequest::getVar('data');
     $data_array = explode(' ', $data);
     $view = $this->getView('gestisci_formazioni', 'html');
     $note = JRequest::getVar('note');
     $data = JRequest::getVar('data');
     $tmp = explode(' ', $data);
     //Riformatta la data
     $gg = $tmp[0];
     $mm = $tmp[1];
     $mm = $modelData->meseFromTextToNum($mm);
     //trasforma il mese da testuale a numero
     $aa = $modelData->calcolaAnno($mm);
     //Calcola l'anno
     if ($mm <= 9) {
         $mm = '0' . $mm;
     }
     //aggiungi uno zero al mese se necessario
     $modifica = $modelOpDB->modificaNoteFormaz("note", "{$aa}-{$mm}-{$gg}", $note);
     $view->set('modelData', $modelData);
     $view->set('modelOpDB', $modelOpDB);
     if ($modifica == 0) {
         //op. andata a buon fine
         $view->set('data_formazione', "{$gg} " . $modelData->meseFromNumToText($mm) . " {$aa}");
         $view->set('messaggio', 'note-modificate');
     } else {
         if ($modifica == 1) {
             //op. andata a buon fine
             $view->set('data_formazione', "{$gg} " . $modelData->meseFromNumToText($mm) . " {$aa}");
             $view->set('messaggio', 'note-cancellate');
         } else {
             //stampa errore
             $view->set('messaggio', 'errore-note-non-modificate');
         }
     }
     parent::display();
     //$view->display();
 }