当前位置: 首页>>代码示例>>PHP>>正文


PHP project::getAllByPK方法代码示例

本文整理汇总了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();
 }
开发者ID:saji89,项目名称:whube,代码行数:8,代码来源:bug.php

示例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) {
开发者ID:saji89,项目名称:whube,代码行数:31,代码来源:bug-list.php

示例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.
    */
}
开发者ID:pedro3005,项目名称:whube,代码行数:62,代码来源:globals.php


注:本文中的project::getAllByPK方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。