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


PHP project::getNext方法代码示例

本文整理汇总了PHP中project::getNext方法的典型用法代码示例。如果您正苦于以下问题:PHP project::getNext方法的具体用法?PHP project::getNext怎么用?PHP project::getNext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在project的用法示例。


在下文中一共展示了project::getNext方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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) {
            $CONTENT .= "\t<tr>\n<td>" . $row['bID'] . "<td>Unknown</td><td>Unknown</td></td><td>Unknown</td><td>Private</td><td>" . $picon . "</td><td>Private</td>\n\t</tr>\n";
开发者ID:saji89,项目名称:whube,代码行数:31,代码来源:bug-list.php

示例3: project

<?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);
}
开发者ID:pedro3005,项目名称:whube,代码行数:20,代码来源:project.php

示例4: bug

include "conf/site.php";
include "libs/php/globals.php";
requireLogin();
if (isset($_POST['project']) && isset($_POST['title']) && isset($_POST['descr'])) {
    include "model/user.php";
    include "model/project.php";
    include "model/bug.php";
    $b = new bug();
    $u = new user();
    $p = new project();
    // let's first verify the project.
    $pname = htmlentities($_POST['project'], ENT_QUOTES);
    $title = htmlentities($_POST['title'], ENT_QUOTES);
    $descr = htmlentities($_POST['descr'], ENT_QUOTES);
    $p->getByCol("project_name", $pname);
    $project = $p->getNext();
    if ($project != NULL && $project['pID'] > 0) {
        $fields = array("package" => $project['pID'], "reporter" => $_SESSION['id'], "title" => $title, "descr" => $descr);
        $id = $b->createNew($fields);
        $_SESSION['msg'] = "New bug created!";
        header("Location: {$SITE_PREFIX}" . "t/bug/{$id}");
        exit(0);
    } else {
        $_SESSION['err'] = "Please enter a real project!";
        header("Location: {$SITE_PREFIX}" . "t/new-bug");
        exit(0);
    }
} else {
    $_SESSION['err'] = "Please fill in all the forms!";
    header("Location: {$SITE_PREFIX}" . "t/new-bug");
    exit(0);
开发者ID:pedro3005,项目名称:whube,代码行数:31,代码来源:submit-bug.php

示例5: 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

示例6: clean

 $owner = clean($_POST['owner']);
 /* New owner of the bug ( perhaps )    */
 $descr = clean($_POST['descr']);
 /* New descr of the bug ( perhaps )    */
 $priv = false;
 if (isset($_POST['private'])) {
     $priv = true;
 } else {
     $priv = false;
 }
 $o = new user();
 $p = new project();
 $o->getByCol("username", $owner);
 $p->getByCol("project_name", $project);
 $own = $o->getNext();
 $pkg = $p->getNext();
 $projectID = $pkg['pID'];
 $ownerID = $own['uID'];
 $posted_data = array("bug_severity" => $sever, "bug_status" => $status, "package" => $projectID, "owner" => $ownerID, "title" => $title, "private" => $priv, "descr" => $descr);
 // print_r( $posted_data );
 $b->getAllByPK($bugid);
 $row = $b->getNext();
 // print_r( $row ); // searched bug
 /*
  --> $row should look like:
    ** NOTE: IGNORE THE [n] ETC! THEY ARE STUPID IF YOU DON'T QUERY FUR THEM **
 Array (
 	[bID] =>              1                        <-- PK, bug ID
 	[bug_status] => 1                              <-- FK, status table by ID
 	[bug_severity] => 1                            <-- FK, severity table by ID
 	[package] => 1                                 <-- FK, project table by pID
开发者ID:pedro3005,项目名称:whube,代码行数:31,代码来源:bug-callback.php

示例7: project

<?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);
}
开发者ID:pedro3005,项目名称:whube,代码行数:31,代码来源:user.php


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