Пример #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!!!!!!
Пример #2
0
<?php

useScript("validate-user.php");
useScript("validate-project.php");
useScript("edit-menu.js");
useScript("uncheck-check.js");
$b = $BUG_OBJECT;
$u = $USER_OBJECT;
$p = $PROJECT_OBJECT;
if (sizeof($argv) > 2 && strpos($argv[2], '-')) {
    $bugName = str_replace('-', ' ', $argv[2]);
}
$app_root = dirname(__FILE__) . "/../";
include $app_root . "libs/php/markdown.php";
$b->getAllByPK($argv[1]);
$row = $b->getNext();
if ($row['private'] && isset($argv[1])) {
    // uh oh. let's make sure they are not punkassbitches
    $reporter = $b->getReporter($row['bID']);
    $owner = $b->getOwner($row['bID']);
    $project = $b->getProject($row['bID']);
    if ($reporter['uID'] != $_SESSION['id'] && $owner['uID'] != $_SESSION['id'] && $project['oID'] != $_SESSION['id']) {
        $_SESSION['err'] = "This is a private bug. You are not the owner, reporter or project leader.";
        header("Location: " . $SITE_PREFIX . "t/home");
        exit(0);
    } else {
        $_SESSION['msg'] = "This is a private bug. Please keep this quiet.";
    }
}
if (isset($row['bID'])) {
    $p->getAllByPK($row['package']);
Пример #3
0
<?php

useScript('timezone.js');
$TITLE = "Register for Whube!";
$CONTENT = "\r\n<h1>So, you want an account, eh?</h1>\r\n<form action = '" . $SITE_PREFIX . "l/submit-register' method = 'post' >\r\n<table>\r\n\t<tr>\r\n\t\t<td>Desired Username</td>\r\n\t\t<td></td>\r\n\t\t<td><input type = 'text' name = 'username' id = 'username' /></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>Your Real Name ( First and Last, please )</td>\r\n\t\t<td></td>\r\n\t\t<td><input type = 'text' name = 'realname' id = 'realname' /></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>Password ( take one )</td>\r\n\t\t<td></td>\r\n\t\t<td><input type = 'password' name = 'pass0' id = 'pass0' /></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>Email addy</td>\r\n\t\t<td></td>\r\n\t\t<td><input type = 'text' name = 'email' id = 'email' /></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>Password ( take two )</td>\r\n\t\t<td></td>\r\n\t\t<td><input type = 'password' name = 'pass1' id = 'pass1' /></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td><input type = 'hidden' name = 'tz' id = 'tz' /></td>\r\n\t\t<td></td>\r\n\t\t<td><input type = 'submit' name = 'new-user' id = 'submit' value = 'will you remember me?' /></td>\r\n\t</tr>\r\n</table>\r\n</form>\r\n";
Пример #4
0
<?php

requireLogin();
useScript("validate-project.php");
preload(32, 32, "no.png");
preload(32, 32, "yes.png");
preload(32, 32, "loading.png");
$TITLE = "Oh noes!";
$CONTENT .= "\n<h1>So. You have a problem. Well whoopdie do. Don't we all</h1>\n<br />\n<br />\n<div id = 'images' ></div>\n<form action = '" . $SITE_PREFIX . "submit-bug.php' method = 'post' >\n\t<table>\n<tr>\n\t<td>What project is giving you crap?</td>\n\t<td><div id = 'project-ok' ><img src = '" . $SITE_PREFIX . "imgs/no.png' alt = '' /></div></td>\n\t<td><input type = 'text' id = 'project' name = 'project' size = '20' /></td>\n</tr>\n<tr>\n\t<td></td>\n\t<td></td>\n\t<td><div id = 'project-descr' >&nbsp;</div></td>\n</tr>\n<tr>\n\t<td>So, I need a poetic name for this issue</td>\n\t<td></td>\n\t<td><input type = 'text' name = 'title' size = '40' /></td>\n</tr>\n<tr>\n\t<td>And a nice description</td>\n\t<td></td>\n\t<td><textarea rows = '20' cols = '50' name = 'descr' ></textarea></td>\n</tr>\n<tr>\n\t<td></td>\n\t<td><img src = '" . $SITE_PREFIX . "imgs/32_space.png' alt = '' /></td>\n\t<td><input type = 'submit' value = 'Look, I made this for you!' /></td>\n</tr>\n\t</table>\n</form>\n";
Пример #5
0
<?php

if (isset($_SESSION['id']) && $_SESSION['id'] > 0) {
    header("Location: " . $SITE_PREFIX . "t/home");
}
useScript("md5.js");
useScript("login.js");
$_SESSION['token'] = md5(time());
$TOKEN = $_SESSION['token'];
$TITLE = "Login Page";
$CONTENT = "\n<div class = 'shit' id = 'remove-me' >\n\t<div class = 'content' >\n\t\t<b>YOU DON'T HAVE JAVASCRIPT</b>.\n\t\tDON'T LOG IN WITHOUT JAVASCRIPT. YOUR PASSWORD WILL BE\n\t\tSENT IN PLAINTEXT. DON'T LOG IN WITHOUT JAVASCRIPT!!!!\n\t</div>\n</div>\n<script type = 'text/javascript' >\n\t\$('#remove-me').hide();\n</script>\n<form action = '" . $SITE_PREFIX . "gate.php' method = 'post' >\n<p>\n\t<input type = 'hidden' name = 'token' value = '" . $TOKEN . "' />\n\t<input type = 'hidden' name = 'pass' />\n</p>\n<table>\n\t<tr>\n\t\t<td>Login Name</td>\n\t\t<td><input class = 'bigme name' type = 'text' name = 'name' /></td>\n\t</tr>\n\t<tr>\n\t\t<td>Password</td>\n\t\t<td><input class = 'bigme password' type = 'password' name = 'pw' /></td>\n\t</tr>\n\t<tr>\n\t\t<td></td>\n\t\t<td><input name = 'login' type = 'submit' value = 'Let me in!' onclick = 'preSubmit(this.form)' /></td>\n\t</tr>\n</table>\n</form>\n\n";
?>

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

useScript("validate-user.php");
useScript("validate-project.php");
useScript("edit-menu.js");
$b = $BUG_OBJECT;
$u = $USER_OBJECT;
$p = $PROJECT_OBJECT;
$b->getAllByPK($argv[1]);
$row = $b->getNext();
if ($row['private'] && isset($row['bID'])) {
    // uh oh. let's make sure they are not punkassbitches
    $reporter = $b->getReporter($row['bID']);
    $owner = $b->getOwner($row['bID']);
    $project = $b->getProject($row['bID']);
    if ($reporter['uID'] != $_SESSION['id'] && $owner['uID'] != $_SESSION['id'] && $project['oID'] != $_SESSION['id']) {
        $_SESSION['err'] = "This is a private bug. You are not the owner, reporter or project leader.";
        header("Location: " . $SITE_PREFIX . "t/home");
        exit(0);
    } else {
        $_SESSION['msg'] = "This is a private bug. Please keep this quiet.";
    }
}
if (isset($row['bID'])) {
    $p->getAllByPK($row['package']);
    $project = $p->getNext();
    $reporter = $b->getReporter($row['bID']);
    $owner = $b->getOwner($row['bID']);
    $project = $b->getProject($row['bID']);
    if (!isset($owner['uID'])) {
        $owner_info = "No owner!";