Exemplo n.º 1
0
<?php

useScript("sorttable.js");
useScript("tablehover.js");
$Count = $PAGE_MAX_COUNT;
if (isset($argv[2])) {
    $class = htmlentities($argv[1], ENT_QUOTES);
    $id = htmlentities($argv[2], ENT_QUOTES);
    // echo "Getting $id bugs filtering by $class";
}
$b = new bug();
$b->getAll();
$u = new user();
$p = new project();
$TITLE = "Latest {$Count} bugs";
$i = 0;
$CONTENT .= "<h1>Last {$Count} bugs filed</h1>";
$CONTENT .= "\n<table class = 'sortable' >\n\t<tr class = 'nobg' >\n\t\t<th>ID</th> <th> Status </th> <th> Severity </th> <th>Owner</th> <th>Project</th> <th>Private</th> <th>Title</th>\n\t</tr>\n";
while ($row = $b->getNext()) {
    $u->getAllByPK($row['owner']);
    $owner = $u->getNext();
    if ($owner['uID'] <= 0) {
        $owner['real_name'] = "Nobody";
    }
    $p->getAllByPK($row['package']);
    $package = $p->getNext();
    if (isset($_SESSION['id'])) {
        $id = $_SESSION['id'];
    } else {
        $id = -1;
        // NOT -10000!!!!!!