Пример #1
0
<?php

$p = new project();
$b = new bug();
$p->getByCol("project_name", $argv[1]);
// this is goddamn awesome
$row = $p->getNext();
$b->getByCol("package", $row['pID']);
// this is goddamn awesome
$booboos = $b->numrows();
$critical = 0;
// doh // $b->specialSelect( "bug_status != 1" );
if (isset($row['pID'])) {
    $TITLE = $row['project_name'] . ", one of the fantastic projects on Whube";
    $CONTENT = "\n<h1>" . $row['project_name'] . "</h1>\n" . $row['descr'] . "<br />\n<br />\nThere are " . $booboos . " bugs in the tracker on this package. " . $critical . " are critical.\n";
} else {
    $_SESSION['err'] = "Project " . $argv[1] . " does not exist!";
    header("Location: {$SITE_PREFIX}" . "t/home");
    exit(0);
}
Пример #2
0
<?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);
}