當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。