width = "98%";
$table->class = "databox";
$table->data = array();
$table->colspan[1][0] = 3;
$profiles = array();
$default_time = "0.25";
$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 = "
";
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);
}
?>