isLogged()) { $users->setCurrent($_GET['setCurrent']); } $userData['currentproject'] = intval($_GET['setCurrent']); unset($_SESSION['selectCache']); } $current = $projects->getCurrent($userData); if(!$current) header("location: projects.php?msg=".urlencode("You should create a project first.")); if($users->isAdmin()) { if(!empty($_GET['delete'])) { $bugs->delete($_GET['delete']); header("location: bugs.php?msg=".urlencode("This bug has been deleted.")); } } if(!empty($_GET['project'])) $project = $_GET['project']; else $project = $current; $project = $projects->getById($project); echo $xhtml->head('Bugs for «'.xHTML::Protect($project['title']).'»',"bugs"); echo '

'.nl2br(stripslashes($project['text'])).'

'; $begin = @intval($_GET['begin']); $list = $bugs->getList($project['id'],$begin); if(count($list) < 1) { echo '

There is no bug reported for this project.

'; } else { if($bugs->getPagination($begin,$bugs->listNb)) { $pagination = ''; echo $pagination; } echo ''; $now = time(); foreach($list as $row) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo '
ID Title Status Updated
'.$row['id'].''.xHTML::Protect($row['title']).''.$row['status'].''.(empty($row['updated']) ? 'c:'.date('d/m/Y H:i',$row['created']) : date('d/m/Y H:i',$row['updated'])).'
'; if(isset($pagination)) echo $pagination; } echo $xhtml->foot(); ?>