width = "98%"; $table->class = "databox"; $table->data = array(); $table->colspan[1][0] = 3; $profiles = array(); $default_time = "0"; $table->data[0][0] = "".__('Time used')."
".html_print_input_text ('time_used', $default_time, '', 10, 255, true); $table->data[0][1] = "".__('Have cost')."
".html_print_checkbox ('have_cost', '', false, true); $table->data[0][2] = "".__('Public')."
".html_print_checkbox ('public', '', true, true); $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', 'workunits', true); $form .= html_print_input_hidden('create_workunit', '1', true); $form .= html_print_input_hidden('id_incident', $id_incident, true); $form .= html_print_input_hidden('profile', '0', true); $form .= "
"; ui_toggle($form, __('Add workunit')); if (isset($result['workunit'][0]) && is_array($result['workunit'][0])) { $workunits = $result['workunit']; } else { $workunits = $result; } foreach ($workunits as $value) { $table->width = "98%"; $table->class = "databox"; $table->colspan[1][0] = 4; $table->size[0] = "80%"; $table->size[1] = "20%"; $table->data = array(); $table->data[0][0] = $value['id_user'] . " " . __('said') . " " . $value['timestamp']; $table->data[0][1] = $value['duration'] . " " . __('Hours') . " " . __('Public') . ": " . $value['public']; $table->data[1][0] = $value['description']; html_print_table($table); } ?>