';
echo ''.__('Incident').' | ';
if ((give_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
print_input_text ("titulo", $titulo,'', 70);
} else {
print_input_text_extended ("titulo", $titulo, "", "", 70, "", false, "", "readonly");
}
echo ' |
';
echo ''.__('Opened at').' | '.date ($config['date_format'],strtotime ($inicio)).' | ';
echo ''.__('Updated at').' | '.date ($config['date_format'],strtotime ($actualizacion)).' |
';
echo ''.__('Owner').' | ';
if ((give_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
print_select (list_users (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135");
} else {
print_select (list_users (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135", true);
}
echo ' | '.__('Status').' | ';
$fields = array ();
$fields[0] = __('Open and Active');
$fields[2] = __('Not valid');
$fields[3] = __('Out of date');
$fields[13] = __('Closed');
if ((give_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
print_select ($fields, "estado_form", $estado, '', '', '', false, false, false, 'w135');
} else {
print_select ($fields, "estado_form", $estado, '', '', '', false, false, false, 'w135', true);
}
echo ' |
';
echo ''.__('Source').' | ';
$fields = array ();
$return = get_db_all_rows_sql ("SELECT origen FROM torigen ORDER BY origen");
if ($return === false)
$return[0] = $estado; //Something must be displayed
foreach ($return as $row) {
$fields[$row["origen"]] = $row["origen"];
}
// Only owner could change source or user with Incident management privileges
if ((give_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
print_select ($fields, "origen_form", $estado, '', '', '', false, false, false, 'w135');
} else {
print_select ($fields, "origen_form", $estado, '', '', '', false, false, false, 'w135', true);
}
echo ' | '.__('Group').' | ';
// Group combo
if ((give_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
print_select (get_user_groups (), "grupo_form", $id_grupo, '', '', '', false, false, false, 'w135');
} else {
print_select (get_user_groups (), "grupo_form", $id_grupo, '', '', '', false, false, true, 'w135', true);
}
echo ' |
'.__('Priority').' | ';
$fields = array();
$fields[0] = __('Informative');
$fields[1] = __('Low');
$fields[2] = __('Medium');
$fields[3] = __('Serious');
$fields[4] = __('Very serious');
$fields[10] = __('Maintenance');
if ((give_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
print_select ($fields, "prioridad_form", $prioridad, '', '', '', false, false, false, 'w135');
} else {
print_select ($fields, "prioridad_form", $prioridad, '', '', '', false, false, false, 'w135', true);
}
echo ' | '.__('Creator').' | ';
if (empty ($id_creator)) {
echo 'SYSTEM';
} else {
echo $id_creator.' ('.dame_nombre_real ($id_creator).')';
}
echo ' |
';
if ((give_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
print_textarea ("descripcion", 15, 80, safe_input ($texto), 'style="height:200px;"');
} else {
print_textarea ("descripcion", 15, 80, safe_input ($texto), 'style="height:200px;" disabled');
}
echo ' |
';
// Only if user is the used who opened incident or (s)he is admin
if (isset ($id_inc) AND (give_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
print_submit_button (__('Update incident'), "accion", false, 'class="sub upd"');
} elseif (give_acl ($config["id_user"], $id_grupo, "IW")) {
print_submit_button (__('Create'), "accion", false, 'class="sub wand"');
} else {
print_submit_button (__('Submit'), "accion", true, 'class="sub upd"');
}
echo "