本文整理汇总了PHP中project::getAllByPK方法的典型用法代码示例。如果您正苦于以下问题:PHP project::getAllByPK方法的具体用法?PHP project::getAllByPK怎么用?PHP project::getAllByPK使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类project
的用法示例。
在下文中一共展示了project::getAllByPK方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getProject
function getProject($pID)
{
$this->getAllByPK($pID);
$row = $this->getNext();
$p = new project();
$p->getAllByPK($row['package']);
return $p->getNext();
}
示例2: bug
}
$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!!!!!!
}
$privacy = checkBugViewAuth($row['bID'], $id);
if ($privacy[1]) {
$picon = "<img src = '" . $SITE_PREFIX . "imgs/locked.png' alt = 'Private' />";
} else {
$picon = "<img src = '" . $SITE_PREFIX . "imgs/unlocked.png' alt = 'Public' />";
}
if (!$privacy[0]) {
if ($i < $Count) {
示例3: checkBugViewAuth
function checkBugViewAuth($bugID, $requester)
{
$b = new bug();
$u = new user();
$p = new project();
$b->getAllByPK($bugID);
$bug = $b->getNext();
if (isset($bug['bID'])) {
if (isset($_SESSION['patrick_stewart']) && $_SESSION['patrick_stewart']) {
// see gate for context
return array(true, $bug['private']);
// public bug, dummy
}
$whoami = $requester;
if ($bug['private']) {
// good query.
$u->getAllByPK($bug['owner']);
$owner = $u->getNext();
$u->getAllByPK($bug['reporter']);
$reporter = $u->getNext();
$p->getAllByPK($bug['package']);
$project = $p->getNext();
$oid = -10000;
$rid = -10000;
$pid = -10000;
if (isset($owner['uID'])) {
$oid = $owner['uID'];
}
if (isset($reporter['uID'])) {
$rid = $reporter['uID'];
}
if (isset($project['oID'])) {
$pid = $project['oID'];
}
if ($oid != $whoami && $rid != $whoami && $pid != $whoami) {
return array(false, $bug['private']);
} else {
return array(true, $bug['private']);
}
} else {
return array(true, $bug['private']);
// public bug, dummy
}
} else {
return array(false, false);
// bug iz no good
}
/*
if bug.private:
check if is owner
check if is reporter
check if is asignee
check if is project owner
check if site administrator / staff
any of the above: Yes, otherwise, no
else:
Yes
Query bug, if it's public, don't give a shit.
*/
}