當前位置: 首頁>>代碼示例>>PHP>>正文


PHP project::getAll方法代碼示例

本文整理匯總了PHP中project::getAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP project::getAll方法的具體用法?PHP project::getAll怎麽用?PHP project::getAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在project的用法示例。


在下文中一共展示了project::getAll方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

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

示例2: htmlentities

<?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);
}
$TITLE = "Latest {$Count} projects";
$i = 0;
$CONTENT .= "<h1>Last {$Count} projects created</h1>";
$CONTENT .= "\n<table class = 'sortable' >\n\t<tr class = 'nobg' >\n\t\t<th>Name</th> <th>Owner</th> <th>Bugs</th> <th>Private</th>\n\t</tr>\n";
$p = new project();
$p->getAll();
while ($row = $p->getNext()) {
    $i++;
}
$CONTENT .= "\n</table><br /><br />\n";
開發者ID:pedro3005,項目名稱:whube,代碼行數:19,代碼來源:project-list.php


注:本文中的project::getAll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。