. */ include_once __DIR__.'/../../core.php'; $img = null; if (!empty($record['immagine'])) { $fileinfo = Uploads::fileInfo($record['immagine']); $default_img = '/'.Uploads::getDirectory($id_module).'/'.$fileinfo['filename'].'_thumb600.'.$fileinfo['extension']; $img = file_exists(base_dir().$default_img) ? base_path().$default_img : base_path().'/'.Uploads::getDirectory($id_module).'/'.$record['immagine']; } ?>

{[ "type": "image", "label": "", "name": "immagine", "class": "img-thumbnail", "value": "" ]}
{[ "type": "text", "label": "", "name": "matricola", "required": 1, "class": "text-center", "maxlength": 25, "value": "$matricola$", "validation": "matricola" ]}
{[ "type": "text", "label": "", "name": "nome", "required": 1, "value": "$nome$" ]}
{[ "type": "select", "label": "", "name": "idanagrafica", "required": 1, "value": "$idanagrafica$", "extra": "", "ajax-source": "clienti" ]}
{[ "type": "select", "label": "", "name": "idtecnico", "ajax-source": "tecnici", "value": "$idtecnico$" ]}
{[ "type": "select", "label": "", "name": "id_categoria", "required": 0, "value": "$id_categoria$", "ajax-source": "categorie_imp", "icon-after": "add|" ]}
{[ "type": "select", "label": "", "name": "id_sottocategoria", "value": "$id_sottocategoria$", "ajax-source": "sottocategorie_imp", "select-options": $record['id_categoria']]); ?>, "icon-after": "add||id_original=" ]}
{[ "type": "date", "label": "", "name": "data", "value": "$data$" ]}
{[ "type": "select", "label": "'.tr('Sede').'", "name": "idsede", "value": "$idsede$", "required": "1", "ajax-source": "sedi", "select-options": '.json_encode(['idanagrafica' => $record['idanagrafica']]).', "placeholder": "'.tr('Sede legale').'" ]}
'; ?>
{[ "type": "textarea", "label": "", "name": "descrizione", "value": "$descrizione$" ]}
{[ "type": "text", "label": "", "name": "proprietario", "value": "$proprietario$" ]}
{[ "type": "text", "label": "", "name": "ubicazione", "value": "$ubicazione$" ]}
{[ "type": "text", "label": "", "name": "palazzo", "value": "$palazzo$" ]}
{[ "type": "text", "label": "", "name": "scala", "value": "$scala$" ]}
{[ "type": "text", "label": "", "name": "piano", "value": "$piano$" ]}
{[ "type": "text", "label": "", "name": "interno", "value": "$interno$" ]}
{[ "type": "text", "label": "", "name": "occupante", "value": "$occupante$" ]}
{( "name": "filelist_and_upload", "id_module": "$id_module$", "id_record": "$id_record$" )} fetchArray('SELECT `in_interventi`.`id`, `codice` AS numero, `data_richiesta` AS data, "Intervento" AS tipo_documento FROM `in_interventi` INNER JOIN `my_impianti_interventi` ON `in_interventi`.`id`=`my_impianti_interventi`.`idintervento` WHERE `my_impianti_interventi`.`idimpianto` = '.prepare($id_record).' UNION SELECT `co_contratti`.`id`, `numero` AS numero, `data_bozza` AS data, "Contratto" AS tipo_documento FROM `co_contratti` INNER JOIN `my_impianti_contratti` ON `co_contratti`.`id`=`my_impianti_contratti`.`idcontratto` WHERE `my_impianti_contratti`.`idimpianto` = '.prepare($id_record)); $class = ''; if (!empty($elementi)) { echo '

'.tr('Documenti collegati: _NUM_', [ '_NUM_' => count($elementi), ]).'

'; } echo ' '.tr('Elimina').' '; ?>