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


PHP CTask::getAssignedUsers方法代码示例

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


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

示例1: array

 if ($project_id) {
     $query->addWhere('t.task_project = ' . $project_id);
 }
 // Now add the required restrictions.
 $proj->setAllowedSQL($AppUI->user_id, $query, null, 'p');
 $task->setAllowedSQL($AppUI->user_id, $query, null, 't');
 $query->addOrder('task_end_date');
 $task_list_hash = $query->loadHashList('task_id');
 $query->clear();
 $task_list = array();
 $task_assigned_users = array();
 foreach ($task_list_hash as $task_id => $task_data) {
     $task = new CTask();
     $task->bind($task_data);
     $task_list[$task_id] = $task;
     $task_assigned_users[$task_id] = $task->getAssignedUsers();
 }
 $user_usage = array();
 $task_dates = array();
 $actual_date = $start_date;
 $days_header = '';
 // we will save days title here
 $max_levels = $max_levels == '' || intval($max_levels) < 0 ? -1 : intval($max_levels);
 $max_levels = $max_levels == 0 ? 1 : $max_levels;
 if (count($task_list) == 0) {
     echo '<p>' . $AppUI->_('No data available') . '</p>';
 } else {
     $sss = $ss;
     $sse = $se;
     if (!$use_period) {
         $sss = $sse = 0;
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:tasksperuser.php

示例2: array

 }
 $allowedChildrenTasks = $task->getAllowedSQL($AppUI->user_id, 't.task_parent');
 if (count($allowedChildrenTasks)) {
     $sql->addWhere(implode(' AND ', $allowedChildrenTasks));
 }
 // Now add the required restrictions.
 $proj->setAllowedSQL($AppUI->user_id, $sql, null, 'p');
 $sql->addOrder('task_project, task_end_date, task_start_date');
 $task_list_hash = $sql->loadHashList('task_id');
 $task_list = array();
 $task_assigned_users = array();
 $user_assigned_tasks = array();
 foreach ($task_list_hash as $task_id => $task_data) {
     $task = new CTask();
     $task->bind($task_data);
     $task_users = $task->getAssignedUsers();
     foreach (array_keys($task_users) as $uid) {
         $user_assigned_tasks[$uid][] = $task_id;
     }
     $task->task_assigned_users = $task_users;
     $task_list[$task_id] = $task;
 }
 $user_usage = array();
 $task_dates = array();
 $actual_date = $start_date;
 $days_header = '';
 // we will save days title here
 $max_levels = $max_levels == '' || intval($max_levels) < 0 ? -1 : intval($max_levels);
 $max_levels = $max_levels == 0 ? 1 : $max_levels;
 if (count($task_list) == 0) {
     echo '<p>' . $AppUI->_('No data available') . '</p>';
开发者ID:srinivasulurao,项目名称:jonel,代码行数:31,代码来源:tasksperuser_sub.php

示例3: elseif

     $progress = 100;
 } elseif ($progress < 0) {
     $progress = 0;
 }
 $flags = $a['task_milestone'] ? 'm' : '';
 $caption = '';
 if (!$start || $start == '0000-00-00') {
     $start = !$end ? date('Y-m-d') : $end;
     $caption .= $AppUI->_('(no start date)');
 }
 if (!$end) {
     $end = $start;
     $caption .= ' ' . $AppUI->_('(no end date)');
 }
 if ($showLabels == '1') {
     $res = $task->getAssignedUsers($task_id);
     foreach ($res as $rw) {
         switch ($rw['perc_assignment']) {
             case 100:
                 $caption .= $rw['contact_display_name'] . ';';
                 break;
             default:
                 $caption .= $rw['contact_display_name'] . ' [' . $rw['perc_assignment'] . '%];';
                 break;
         }
     }
     $q->clear();
     $caption = mb_substr($caption, 0, mb_strlen($caption) - 1);
 }
 if ($flags == 'm') {
     $start = new w2p_Utilities_Date($start);
开发者ID:,项目名称:,代码行数:31,代码来源:

示例4: canView

    $AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
    $AppUI->redirect();
} else {
    $AppUI->savePlace();
}
if (!$obj->canAccess($AppUI->user_id)) {
    $AppUI->redirect('m=public&a=access_denied');
}
// Clear any reminders
if ($reminded) {
    $obj->clearReminder();
}
$tab = $AppUI->processIntState('TaskLogVwTab', $_GET, 'tab', 0);
//check permissions for the associated project
$canReadProject = canView('projects', $obj->task_project);
$users = $obj->getAssignedUsers($task_id);
$durnTypes = w2PgetSysVal('TaskDurationType');
$task_types = w2PgetSysVal('TaskType');
$billingCategory = w2PgetSysVal('BudgetCategory');
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('View Task', 'applet-48.png', $m, $m . '.' . $a);
$titleBlock->addCell();
if ($canEdit) {
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new task') . '">', '', '<form action="?m=tasks&a=addedit&task_project=' . $obj->task_project . '&task_parent=' . $task_id . '" method="post" accept-charset="utf-8">', '</form>');
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '">', '', '<form action="?m=files&a=addedit&project_id=' . $obj->task_project . '&file_task=' . $obj->task_id . '" method="post" accept-charset="utf-8">', '</form>');
}
$titleBlock->addCrumb('?m=tasks', 'tasks list');
if ($canReadProject) {
    $titleBlock->addCrumb('?m=projects&a=view&project_id=' . $obj->task_project, 'view this project');
}
if ($canEdit && 0 == $obj->task_represents_project) {
开发者ID:,项目名称:,代码行数:31,代码来源:

示例5: array

    $user_usage = array();
    $task_dates = array();
    $actual_date = $start_date;
    $days_header = '';
    // we will save days title here
    $user_tasks_counted_in = array();
    $user_names = array();
    if (count($task_list) == 0) {
        echo '<p>' . $AppUI->_('No data available') . '</p>';
    } else {
        foreach ($task_list as $task) {
            $task_start_date = new w2p_Utilities_Date($task->task_start_date);
            $task_end_date = new w2p_Utilities_Date($task->task_end_date);
            $day_difference = $task_end_date->dateDiff($task_start_date);
            $actual_date = $task_start_date;
            $users = $task->getAssignedUsers($task->task_id);
            if ($coarseness == 1) {
                userUsageDays();
            } elseif ($coarseness == 7) {
                userUsageWeeks();
            }
        }
        if ($coarseness == 1) {
            showDays();
        } elseif ($coarseness == 7) {
            showWeeks();
        }
        ?>
			<center><table class="std">
			<?php 
        echo $table_header . $table_rows;
开发者ID:eureka2,项目名称:web2project,代码行数:31,代码来源:allocateduserhours.php

示例6: date

     $progress = 0;
 }
 $flags = $a['task_milestone'] ? 'm' : '';
 $cap = '';
 if (!$start || $start == '0000-00-00') {
     $start = !$end ? date('Y-m-d') : $end;
     $cap .= '(no start date)';
 }
 if (!$end) {
     $end = $start;
     $cap .= ' (no end date)';
 } else {
     $cap = '';
 }
 if ($showLabels == '1') {
     $res = $task->getAssignedUsers($a['task_id']);
     foreach ($res as $rw) {
         switch ($rw['perc_assignment']) {
             case 100:
                 $caption .= $rw['contact_display_name'] . ';';
                 break;
             default:
                 $caption .= $rw['contact_display_name'] . ' [' . $rw['perc_assignment'] . '%];';
                 break;
         }
     }
     $q->clear();
     $caption = mb_substr($caption, 0, mb_strlen($caption) - 1);
 }
 if ($flags == 'm') {
     // if hide milestones is ticked this bit is not processed//////////////////////////////////////////
开发者ID:eureka2,项目名称:web2project,代码行数:31,代码来源:gantt.php

示例7: array

     $q->addWhere(implode(' AND ', $allowedProjects));
 }
 if (count($allowedTasks)) {
     $q->addWhere(implode(' AND ', $allowedTasks));
 }
 $q->addOrder('task_end_date');
 $task_list_hash = $q->loadHashList('task_id');
 $q->clear();
 $task_list = array();
 $task_assigned_users = array();
 $i = 0;
 foreach ($task_list_hash as $task_id => $task_data) {
     $task = new CTask();
     $task->bind($task_data);
     $task_list[$i] = $task;
     $task_assigned_users[$i] = $task->getAssignedUsers($task_id);
     $i += 1;
 }
 $Ntasks = $i;
 $user_usage = array();
 $task_dates = array();
 $actual_date = $start_date;
 $days_header = "";
 // we will save days title here
 if (strtolower($max_levels) == 'max') {
     $max_levels = -1;
 } elseif ($max_levels == '') {
     $max_levels = -1;
 } else {
     $max_levels = atoi($max_levels);
 }
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:tasksperuser.php


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