2017-08-04 16:28:16 +02:00
< ? php
include_once __DIR__ . '/../../../core.php' ;
// INTERVENTI ESEGUITI SU QUESTO IMPIANTO
echo '
< div class = " box " >
< div class = " box-header with-border " >
2017-09-04 12:02:29 +02:00
< h3 class = " box-title " > '.tr(' Interventi eseguiti su questo impianto ').' </ h3 >
2017-08-04 16:28:16 +02:00
</ div >
< div class = " box-body " > ' ;
$results = $dbo -> fetchArray ( 'SELECT in_interventi.codice, descrizione, (SELECT MIN(orario_inizio) FROM in_interventi_tecnici WHERE idintervento=my_impianti_interventi.idintervento) AS data FROM my_impianti_interventi INNER JOIN in_interventi ON my_impianti_interventi.idintervento=in_interventi.id WHERE idimpianto=' . prepare ( $id_record ) . ' ORDER BY data DESC' );
if ( ! empty ( $results )) {
echo '
< table class = " table table-striped table-hover " >
< tr >
2017-09-04 12:02:29 +02:00
< th width = " 25% " > '.tr(' Intervento ').' </ th >
< th > '.tr(' Descrizione ').' </ th >
2017-08-04 16:28:16 +02:00
</ tr > ' ;
foreach ( $results as $result ) {
echo '
< tr >
< td >
2017-09-10 14:35:41 +02:00
'.Modules::link(' Interventi ', $result[' codice '], tr(' Intervento _NUM_ del _DATE_ ' , [
'_NUM_' => $result [ 'idintervento' ],
'_DATE_' => Translator :: dateToLocale ( $result [ 'data' ]),
])) . '
2017-08-04 16:28:16 +02:00
</ td >
< td > '.nl2br($result[' descrizione ']).' </ td >
</ tr > ' ;
}
echo '
</ table > ' ;
} else {
echo '
2017-09-04 12:02:29 +02:00
< p > '.tr(' Nessun intervento su questo impianto ').' ...</ p > ' ;
2017-08-04 16:28:16 +02:00
}
echo '
</ div >
</ div > ' ;