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


PHP task::activate方法代码示例

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


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

示例1: task

 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 ***************************************************************************/
#######################################################################
## check login again
if (!$loginInst->id) {
    echo $lang['common_accessDenied'] . "\n";
    exit;
}
$taskInst = new task();
if (tool::securePost('action') == "save") {
    $taskId = tool::securePost('taskid');
}
if ($taskId) {
    $taskInst->activate($taskId);
} else {
    $taskId = tool::secureGet('taskid');
    $taskInst->activate($taskId);
}
if (!$taskInst->id) {
    echo "no task found.\n";
    exit;
}
$projectInst = new project($taskInst->projectId);
$userInst = new user($taskInst->userId);
$jobInst = new job();
$jobInst->filterTaskId = $taskInst->id;
#######################################################################
## perform action
$status = 0;
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:taskdetails.php

示例2: getCosts

 /**
  * returns the summary of all costs for this project
  * @return float costs
  */
 function getCosts()
 {
     $taskInst = new task();
     $taskInst->filterProjectId = $this->id;
     $sum = 0;
     $list = $taskInst->getList();
     while ($element = current($list)) {
         $taskInst->activate($element);
         $sum += $taskInst->getCosts();
         next($list);
     }
     return $sum;
 }
开发者ID:pmtool,项目名称:pmtool,代码行数:17,代码来源:project.inc.php

示例3:

    }
}
if ($action == "search") {
    if (tool::securePost('lastrecordtype')) {
        $recordType = tool::securePost('lastrecordtype');
    }
    $taskInst->fill(tool::securePostAll());
    $taskInst->id = tool::securePost('id');
}
if ($action == "delete") {
    $taskInst->id = tool::securePost('id');
    $taskInst->delete();
}
if ($action == "edit") {
    $recordType = "edit";
    $taskInst->activate(tool::securePost('id'));
}
$taskInst->fillFilter(tool::securePostAll());
#######################################################################
## make edit / new form
?>

<form method="post" name="form1" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php 
echo $config['attach_maxfilesize'];
?>
">
<input type="hidden" name="id" value="<?php 
echo $taskInst->id;
?>
">
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:tasks.php

示例4: task

?>
    <th>percentage</th>
    <th>&nbsp;</th>
  </tr>

<?php 
$taskInst = new task();
$order = "finish";
if (tool::securePost('order')) {
    $order = tool::securePost('order');
}
$list = $taskInst->getList($order);
if ($order == "plannedhours") {
    $listByHour = array();
    while ($element = current($list)) {
        $taskInst->activate($element);
        if (!$taskInst->isDone() && $taskInst->statusId != TASK_STATUS_WAITING && $taskInst->plannedHours && $taskInst->plannedHours != "0") {
            $diff = $taskInst->plannedHours * 60 * 60 - $taskInst->getSummary();
            $listByHour[$diff] = $taskInst->id;
        }
        next($list);
    }
    ksort($listByHour);
    while (list($diff, $id) = each($listByHour)) {
        $taskInst->activate($id);
        ?>
<tr class="light" onmouseover="this.style.backgroundColor='#fafafa'" onmouseout="this.style.backgroundColor=''"><?php 
        $projectInst = new project($taskInst->projectId);
        echo "<td><nobr><a href=\"javascript:openwindow('" . $toolInst->encodeUrl("index.php?content=projectdetails.php&view=details&projectid=" . $projectInst->id) . "',width='500',height='500')\" title=\"show details for this project\">" . $projectInst->name . "</a></nobr></td>\n";
        if ($loginInst->hasAccess("task.viewOther")) {
            $userInst = new user($taskInst->userId);
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:index.php

示例5: next

             $array[] = $jobElement;
             next($jobList);
         }
     }
     next($list);
 }
 sort($array);
 ###
 $day = 0;
 $newDay = 0;
 $firstrun = 1;
 $mySummary = 0;
 ###
 while ($element = current($array)) {
     $jobInst->activate($element);
     $taskInst->activate($jobInst->taskId);
     $userInst = new user($taskInst->userId);
     $projectInst->activate($taskInst->projectId);
     $reportInst->append("  <task>");
     $reportInst->append("    <job>");
     if ($loginInst->hasAccess("report.viewOther")) {
         $reportInst->append("      <user>" . $userInst->username . "</user>");
     }
     $reportInst->append($toolInst->encodeXml("      <project>" . substr($projectInst->name, 0, 50) . "</project>"));
     $reportInst->append($toolInst->encodeXml("      <subject>" . substr($taskInst->subject, 0, 50) . "</subject>"));
     $reportInst->append("      <start>" . $toolInst->getTime("", $jobInst->start) . "</start>");
     $reportInst->append("      <stop>" . $toolInst->getTime("", $jobInst->stop) . "</stop>");
     $reportInst->append("      <used>" . $toolInst->formatTime($jobInst->getSummary()) . "</used>");
     $reportInst->append($toolInst->encodeXml("      <comment>" . substr($jobInst->comment, 0, 50) . "...</comment>"));
     $reportInst->append("    </job>");
     $reportInst->append("  </task>");
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:reports.php


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