'.$info['name']; if (file_exists($docroot.'/plugins/'.$info['directory'].'/add.php')) { echo ' '; } echo ' '; $total = Plugins::getQuery($id_plugin); $directory = '/plugins/'.$info['directory']; } else { $info = Modules::get($id_module); $total = Modules::getQuery($id_module); $directory = '/modules/'.$info['directory']; } $module_options = (!empty($info['options2'])) ? $info['options2'] : $info['options']; // Caricamento file aggiuntivo su elenco record if (file_exists($docroot.$directory.'/custom/controller_before.php')) { include $docroot.$directory.'/custom/controller_before.php'; } elseif (file_exists($docroot.$directory.'/controller_before.php')) { include $docroot.$directory.'/controller_before.php'; } /* * Datatables con record */ if (!empty($module_options) && $module_options != 'menu' && $module_options != 'custom') { $table_id = 'main_'.rand(0, 99); echo ' '; foreach ($total['fields'] as $key => $field) { $attr_td = ''; $name = trim($field); // Check per tipologie di campi particolari if (preg_match('/^color_/', $field)) { $attr_td .= " width='140'"; $field = str_replace('color_', '', $field); } // Data (larghezza fissa) elseif (preg_match('/^Data/', $field)) { $attr_td .= " width='100'"; } // Icona di stampa elseif (trim($field) == '_print_') { $attr_td .= " width='30'"; $field = str_replace('_print_', '', $field); } elseif (preg_match('/^icon_/', $field)) { $attr_td .= " width='30'"; $name = str_replace('icon_', 'icon_title_', $name); $field = str_replace('icon_', '', $field); } echo ' '.$field.''; } echo ' '; foreach ($total['fields'] as $key => $field) { echo ' '; } echo '
'; echo '
'; } /* * Inclusione modulo personalizzato */ elseif ($module_options == 'custom') { // Inclusione elementi fondamentali del modulo include $docroot.'/actions.php'; // Lettura template modulo (verifico se ci sono template personalizzati, altrimenti uso quello base) if (file_exists($docroot.$directory.'/custom/edit.php')) { include $docroot.$directory.'/custom/edit.php'; } elseif (file_exists($docroot.$directory.'/custom/edit.html')) { include $docroot.$directory.'/custom/edit.html'; } elseif (file_exists($docroot.$directory.'/edit.php')) { include $docroot.$directory.'/edit.php'; } elseif (file_exists($docroot.$directory.'/edit.html')) { include $docroot.$directory.'/edit.html'; } } // Caricamento file aggiuntivo su elenco record if (file_exists($docroot.$directory.'/custom/controller_after.php')) { include $docroot.$directory.'/custom/controller_after.php'; } elseif (file_exists($docroot.$directory.'/controller_after.php')) { include $docroot.$directory.'/controller_after.php'; }