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


PHP project::getByCol方法代码示例

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

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

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


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