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


PHP CProject::loadFull方法代码示例

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


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

示例1: CProject

 $obj = new CProject();
 // Now check if the project is editable/viewable.
 $denied = $obj->getDeniedRecords($AppUI->user_id);
 if (in_array($project_id, $denied)) {
     $AppUI->redirect('m=public&a=access_denied');
 }
 $canDeleteProject = $obj->canDelete($msg, $project_id);
 // get critical tasks (criteria: task_end_date)
 $criticalTasks = $project_id > 0 ? $obj->getCriticalTasks($project_id) : null;
 // get ProjectPriority from sysvals
 $projectPriority = w2PgetSysVal('ProjectPriority');
 $projectPriorityColor = w2PgetSysVal('ProjectPriorityColor');
 $pstatus = w2PgetSysVal('ProjectStatus');
 $ptype = w2PgetSysVal('ProjectType');
 // load the record data
 $obj->loadFull($AppUI, $project_id);
 if (!$obj) {
     $AppUI->setMsg('Project');
     $AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
     $AppUI->redirect();
 } else {
     $AppUI->savePlace();
 }
 $worked_hours = $obj->project_worked_hours;
 $total_hours = $obj->getTotalHours();
 $total_project_hours = $obj->getTotalProjectHours();
 // create Date objects from the datetime fields
 $start_date = intval($obj->project_start_date) ? new CDate($obj->project_start_date) : null;
 $end_date = intval($obj->project_end_date) ? new CDate($obj->project_end_date) : null;
 $actual_end_date = intval($criticalTasks[0]['task_end_date']) ? new CDate($criticalTasks[0]['task_end_date']) : null;
 $today = new CDate();
开发者ID:joly,项目名称:web2project,代码行数:31,代码来源:index.php

示例2: CProject

?>
</th>
        <th width="10px" align="center"><?php 
echo $AppUI->_('Difference');
?>
</th>
    </tr>
    <?php 
//TODO: rotate the headers by 90 degrees?
$activeOnly = $active_projects ? true : false;
$projectList = CCompany::getProjects($AppUI, $company_id, $activeOnly);
$bcode = new CSystem_Bcode();
$project = new CProject();
if (count($projectList)) {
    foreach ($projectList as $projectItem) {
        $project->loadFull(null, $projectItem['project_id']);
        $criticalTasks = $project->getCriticalTasks($projectItem['project_id']);
        $costs = $bcode->calculateProjectCost($projectItem['project_id'], $start_date->format(FMT_DATETIME_MYSQL), $end_date->format(FMT_DATETIME_MYSQL));
        $pstart = new w2p_Utilities_Date($project->project_start_date);
        $pend = intval($criticalTasks[0]['task_end_date']) ? new w2p_Utilities_Date($criticalTasks[0]['task_end_date']) : new w2p_Utilities_Date();
        $filterStart = $start_date;
        $filterEnd = $end_date;
        $workingDaysInSpans = $filterStart->findDaysInRangeOverlap($pstart, $pend, $filterStart, $filterEnd);
        $workingDaysForProj = $pstart->workingDaysInSpan($pend);
        $factor = $workingDaysInSpans / $workingDaysForProj;
        $factor = $factor > 1 ? 1 : $factor;
        ?>
<tr>
                <td width="10" align="right" style="border: outset #eeeeee 1px;background-color:#<?php 
        echo $project->project_color_identifier;
        ?>
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:costsbyproject.php


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