'.$element['name']; if (file_exists($docroot.'/plugins/'.$element['directory'].'/add.php')) { echo ' '; } echo ' '; $directory = '/plugins/'.$element['directory']; } else { $element = Modules::get($id_module); $directory = '/modules/'.$element['directory']; } $total = App::readQuery($element); $module_options = (!empty($element['options2'])) ? $element['options2'] : $element['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 '
---|---|
'; } echo ' |