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


PHP CProject::importTasks方法代码示例

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


在下文中一共展示了CProject::importTasks方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dPgetParam

if ($del) {
    $project_id = dPgetParam($_POST, 'project_id', 0);
    $canDelete = $obj->canDelete($msg, $project_id);
    if (!$canDelete) {
        $AppUI->setMsg($msg, UI_MSG_ERROR);
        $AppUI->redirect();
    }
    if ($msg = $obj->delete()) {
        $AppUI->setMsg($msg, UI_MSG_ERROR);
        $AppUI->redirect();
    } else {
        $AppUI->setMsg("Project deleted", UI_MSG_ALERT);
        $AppUI->redirect("m=projects");
    }
} else {
    if ($msg = $obj->store()) {
        $AppUI->setMsg($msg, UI_MSG_ERROR);
    } else {
        $isNotNew = @$_POST['project_id'];
        if ($importTask_projectId = dPgetParam($_POST, 'import_tasks_from', '0')) {
            $scale_project = dPgetParam($_POST, 'scale_project', '0');
            $obj->importTasks($importTask_projectId, $scale_project);
        }
        $AppUI->setMsg($isNotNew ? 'Project updated' : 'Project inserted', UI_MSG_OK, true);
        $custom_fields = new CustomFields($m, 'addedit', $obj->project_id, 'edit');
        $custom_fields->bind($_POST);
        $sql = $custom_fields->store($obj->project_id);
        // Store Custom Fields
    }
    $AppUI->redirect();
}
开发者ID:illuminate3,项目名称:dotproject,代码行数:31,代码来源:do_project_aed.php

示例2: dPgetParam

// prepare (and translate) the module name ready for the suffix
if ($del) {
    $project_id = dPgetParam($_POST, 'project_id', 0);
    $canDelete = $obj->canDelete($msg, $project_id);
    if (!$canDelete) {
        $AppUI->setMsg($msg, UI_MSG_ERROR);
        $AppUI->redirect();
    }
    if ($msg = $obj->delete()) {
        $AppUI->setMsg($msg, UI_MSG_ERROR);
        $AppUI->redirect();
    } else {
        $AppUI->setMsg("Project deleted", UI_MSG_ALERT);
        $AppUI->redirect("m=projects");
    }
} else {
    if ($msg = $obj->store()) {
        $AppUI->setMsg($msg, UI_MSG_ERROR);
    } else {
        $isNotNew = @$_POST['project_id'];
        if ($importTask_projectId = dPgetParam($_POST, 'import_tasks_from', '0')) {
            $obj->importTasks($importTask_projectId);
        }
        $AppUI->setMsg($isNotNew ? 'Project updated' : 'Project inserted', UI_MSG_OK, true);
        $custom_fields = new CustomFields($m, 'addedit', $obj->project_id, "edit");
        $custom_fields->bind($_POST);
        $sql = $custom_fields->store($obj->project_id);
        // Store Custom Fields
    }
    $AppUI->redirect();
}
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:do_project_aed.php

示例3: array

$action = $del ? 'deleted' : 'stored';
$result = $del ? $obj->delete() : $obj->store();
$redirect = $del ? 'm=projects' : 'm=projects&a=view&project_id=' . $obj->project_id;
$notify_owner = w2PgetParam($_POST, 'email_project_owner_box', 'off');
$notify_contacts = w2PgetParam($_POST, 'email_project_contacts_box', 'off');
$importTask_projectId = (int) w2PgetParam($_POST, 'import_tasks_from', '0');
if ($result) {
    if (!$del) {
        $billingCategory = w2PgetSysVal('BudgetCategory');
        $budgets = array();
        foreach ($billingCategory as $id => $category) {
            $budgets[$id] = w2PgetParam($_POST, 'budget_' . $id, 0);
        }
        $obj->storeBudget($budgets);
        if ($importTask_projectId) {
            $import_result = $obj->importTasks($importTask_projectId);
            if (is_array($import_result) && count($import_result)) {
                $AppUI->setMsg($import_result, UI_MSG_ERROR, true);
                $AppUI->holdObject($obj);
                $AppUI->redirect('m=projects&a=addedit&project_id=' . $obj->project_id);
            }
        }
        if ('on' == $notify_owner) {
            $obj->notifyOwner($notfiyTrigger);
        }
        if ('on' == $notify_contacts) {
            $obj->notifyContacts($notfiyTrigger);
        }
        $redirect = 'm=projects&a=view&project_id=' . $obj->project_id;
    } else {
        $redirect = 'm=projects';
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:do_project_aed.php


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