本文整理汇总了PHP中project::getByCol方法的典型用法代码示例。如果您正苦于以下问题:PHP project::getByCol方法的具体用法?PHP project::getByCol怎么用?PHP project::getByCol使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类project
的用法示例。
在下文中一共展示了project::getByCol方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bug
session_start();
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");
示例2: 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);
}
示例3: array
$fields = array("reporter" => $submitter['uID'], "owner" => $submitter['uID'], "title" => $meta['title'], "descr" => $meta['body']);
$id = $b->createNew($fields);
$d['errors'] = false;
$d['message'] = "New bug with ID '" + $id + ";";
if (isset($meta['assign'])) {
$o->getByCol("username", $meta['assign']);
$row = $o->getNext();
if (isset($row['uID'])) {
$b->updateByPK($id, array("owner" => $row['uID']));
$d['message'] .= "\nAssigning this bug to " . $row['real_name'];
} else {
$d['message'] .= "\nCould not find user '" . $meta['assign'] . "' in this DB.";
}
}
if (isset($meta['project'])) {
$p->getByCol("project_name", $meta['project']);
$row = $p->getNext();
if (isset($row['pID'])) {
$b->updateByPK($id, array("package" => $row['pID']));
$d['message'] .= "\nAssigning this bug to project " . $row['project_name'];
} else {
$d['message'] .= "\nCould not find project '" . $meta['project'] . "' in this DB.";
}
}
if (isset($meta['private'])) {
$p->getByCol("private", $meta['private']);
if ($meta['private']) {
$b->updateByPK($id, array("private" => true));
$d['message'] .= "\nMarking this bug private";
} else {
$b->updateByPK($id, array("private" => false));