width = "98%"; $table->class = "databox"; $table->data = array(); $profiles = array(); $table->data[0][0] = "".__('File')."
".html_print_input_file ('new_file', true, array('size' => "50%")); $table->data[1][0] = "".__('Description')."
".html_print_textarea('description', 3, 6, '' , '', true); $form = "
"; $form .= html_print_table($table, true); $form .= html_print_submit_button(__('Add'), 'submit_button', false, 'class="sub next"', true); $form .= html_print_input_hidden('tab', 'files', true); $form .= html_print_input_hidden('attach_file', '1', true); $form .= html_print_input_hidden('id_incident', $id_incident, true); $form .= "
"; ui_toggle($form, __('Add a file')); unset($table); $table->width = "98%"; $table->class = "databox"; $table->head[0] = __('Filename'); $table->head[1] = __('Timestamp'); $table->head[2] = __('Description'); $table->head[3] = __('Size'); $table->head[4] = __('Delete'); $table->data = array(); if (isset($result['file'][0]) && is_array($result['file'][0])) { $files = $result['file']; } else { $files = $result; } $row = 0; foreach($files as $value) { $table->data[$row][0] = ''.$value['filename'].''; $table->data[$row][1] = $value['id_usuario']; if(is_array($value['description'])) { $value['description'] = ''; } $table->data[$row][2] = $value['description']; $table->data[$row][3] = $value['size']; $table->data[$row][4] = "".html_print_image("images/cross.png", true, array('title' => __('Delete file'))).""; $row++; } html_print_table($table); ?>