<?php $p = new project(); $b = new bug(); $u = new user(); $u->getByCol("username", $argv[1]); $user = $u->getNext(); $RIGHTS_OBJECT->getAllByPK($user['uID']); $user_rights = $RIGHTS_OBJECT->getNext(); $p->getAll("owner", $user['uID']); // this is goddamn awesome $projects = $p->numrows(); $b->getByCol("package", $user["uID"]); // this is goddamn awesome $booboos = $b->numrows(); $critical = 0; // doh // $b->specialSelect( "bug_status != 1" ); if (isset($user["username"])) { $projectList = ""; $i = 0; while ($row = $p->getNext()) { $projectList .= "<li><a href='../project/" . $row['project_name'] . "'>" . $row['project_name'] . "</a></li>"; $i++; } $TITLE = $user["username"] . ", one of the fantastic users on Whube"; $CONTENT = "\n<h1>" . $user["username"] . "</h1>\nThis here be " . $user['real_name'] . ".<br />\nThere are " . $booboos . " bugs filed by " . $user['username'] . ". " . $critical . " are critical.<br />\n<br />\n" . $user_rights['admin'] . " - Admin<br />\n" . $user_rights['staff'] . " - Staff<br />\n" . $user_rights['doner'] . " - Doner<br />\n" . $user_rights['member'] . " - Member<br />\n" . $user_rights['banned'] . " - Banned<br />\n<br />\n\n" . ucwords($user['username']) . " is owner of " . $projects . " projects. These projects are: \n<ul>" . $projectList . "</ul>\n"; } else { $_SESSION['err'] = "User " . $argv[1] . " does not exist!"; header("Location: {$SITE_PREFIX}" . "t/home"); exit(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); } $TITLE = "Latest {$Count} projects"; $i = 0; $CONTENT .= "<h1>Last {$Count} projects created</h1>"; $CONTENT .= "\n<table class = 'sortable' >\n\t<tr class = 'nobg' >\n\t\t<th>Name</th> <th>Owner</th> <th>Bugs</th> <th>Private</th>\n\t</tr>\n"; $p = new project(); $p->getAll(); while ($row = $p->getNext()) { $i++; } $CONTENT .= "\n</table><br /><br />\n";