1)); } if ($fields === false) { $fields = array(); ui_print_empty_data ( __("No fields defined") ); } else { $table->width = '100%'; $table->class = 'databox data'; $table->head = array (); $table->head[0] = __('Field'); $table->size[0] = "20%"; $table->head[1] = __('Display on front') . ui_print_help_tip (__('The fields with display on front enabled will be displayed into the agent details'), true); $table->size[1] = "10%"; $table->head[2] = __('Description'); $table->align = array (); $table->align[1] = 'center'; $table->align[2] = 'left'; $table->data = array (); foreach ($fields as $field) { $data[0] = ''.$field['name'].''; if ($field['display_on_front']) { $data[1] = html_print_image('images/tick.png', true); } else { $data[1] = html_print_image('images/delete.png', true); } $custom_value = db_get_value_filter('description', 'tagent_custom_data', array( 'id_field' => $field['id_field'], 'id_agent' => $id_agente)); if ($custom_value === false || $custom_value == '') { $custom_value = '-'.__('empty').'-'; } else { $custom_value = ui_bbcode_to_html($custom_value); } $data[2] = $custom_value; array_push ($table->data, $data); } html_print_table ($table); } ?>