. */ include_once __DIR__.'/../../core.php'; switch (post('op')) { case 'update': if (!empty(intval(post('predefined'))) && !empty(post('module'))) { $dbo->query('UPDATE `zz_prints` SET `predefined` = 0 WHERE `id_module` = '.post('module')); } $print->setTranslation('title', post('title')); $print->filename = post('filename'); $print->options = post('options'); $print->order = post('order'); $print->predefined = intval(post('predefined')); $print->save(); // Gestione file allegati $dbo->delete('zz_files_print', ['id_print' => $id_record]); $id_files = (array) post('id_files'); foreach ($id_files as $id_file) { $dbo->insert('zz_files_print', [ 'id_print' => $id_record, 'id_file' => $id_file, ]); } flash()->info(tr('Modifiche salvate correttamente')); break; }