isLogged()) { $adv = array( 'status' => empty($_POST['owner']) ? 'open' : 'assigned', 'owner' => empty($_POST['owner']) ? '' : $_POST['owner'], 'type' => empty($_POST['type']) ? '' : $_POST['type'], 'file' => empty($_POST['file']) ? '' : $_POST['file'], 'comments' => $users->isAdmin() ? (empty($_POST['comments']) ? 0 : 1) : '1', ); } else { $adv = false; } $res = $bugs->add($_POST['project'], $_POST['title'], $_POST['text'], $_POST['author'], $adv); if(is_numeric($res)) { header("location: reportBug.php?id=".$res); exit; } $err = $res; } echo $xhtml->head("Report a new bug","report"); if(!empty($_GET['id']) && is_numeric($_GET['id'])) echo '

Your bug has been submitted: #'.$_GET['id'].'.

'; if(isset($err)) echo '

'.xHTML::Protect($err).'

'; if($users->isLogged()) { $lProjects = $projects->getList(true); $currentProject = $projects->getCurrent($userData); echo '
People
Assigned to
Misc.
Category
Project categories
'.($users->isAdmin() ? '
' : '').'
the bug itself
(separate by commas)
Title
Description (be precise please)

'; } else { $lProjects = $projects->getList(false); $currentProject = $projects->getCurrent(array()); echo '
General
(required)
The bug
Title (be concise)
Description (be precise)

'; } echo $xhtml->foot(); function selectProject($list,$selected) { $out = ''; foreach($list as $p) { $out.= ''; } return $out; } ?>