本文整理汇总了PHP中task::getSummary方法的典型用法代码示例。如果您正苦于以下问题:PHP task::getSummary方法的具体用法?PHP task::getSummary怎么用?PHP task::getSummary使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类task
的用法示例。
在下文中一共展示了task::getSummary方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: next
echo $jobInst->comment;
}
echo " </td>\n";
echo "<td class=list{$jobStyle}>" . $toolInst->getTime("d.m.Y, H:i", $jobInst->start) . "</td>\n";
if ($jobInst->id == $jobInst->getOpenJob()) {
echo "<td class=list{$jobStyle}>" . $lang['tasks_running'] . "</td>\n";
} else {
echo "<td class=list{$jobStyle}>" . $toolInst->getTime("d.m.Y, H:i", $jobInst->stop) . "</td>\n";
}
echo "<td class=list{$jobStyle} align=right>" . $toolInst->formatTime($jobInst->getSummary()) . "</td>\n";
echo "</tr>\n";
next($list);
}
echo "<tr>\n";
echo "<td class=list colspan=" . $colspan . " align=right><b>" . $lang['common_summaryTime'] . " : </b></td>\n";
echo "<td class=list align=right><b>" . $toolInst->formatTime($taskInst->getSummary()) . "</b></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class=list_private colspan=" . $colspan . " align=right><b>" . $lang['common_private_jobs'] . " - " . $lang['common_summaryTime'] . " : </b></td>\n";
echo "<td class=list_private align=right><b>" . $toolInst->formatTime($taskInst->getSummary(true)) . "</b></td>\n";
echo "</tr>\n";
if ($projectInst->rate || $userInst->rate) {
if ($loginInst->hasAccess("task.getSummary")) {
echo "<tr>\n";
echo "<td class=list colspan=" . $colspan . " align=right><b>" . $lang['common_roundedSummaryTime'] . " : </b></td>\n";
echo "<td class=list align=right><b>" . $toolInst->formatTime($toolInst->deductibleSeconds($taskInst->getSummary())) . "</b></td>\n";
echo "</tr>\n";
}
if ($loginInst->hasAccess("task.getCosts")) {
echo "<tr>\n";
if ($taskInst->fixedPrice > "0") {
示例2: while
echo "<th><a href=\"" . $toolInst->encodeUrl("index.php?content=projectdetails.php&view=details&projectid=" . $projectInst->id . "&order=status&desc=" . $desc) . "\" title=\"" . $lang['common_orderByStatus'] . "\">" . $lang['common_status'] . "</a></th>\n";
echo "<th>" . $lang['common_usedTime'] . "</th>\n";
$sum = 0;
$sum_private = 0;
$costs = 0;
$costs_private = 0;
$customerSum = 0;
$customerCosts = 0;
while ($element = current($list)) {
$taskInst->activate($element);
echo "<tr class=\"light\"><td class=list><nobr><a href=\"" . $toolInst->encodeUrl("index.php?content=taskdetails.php&view=details&taskid=" . $taskInst->id) . "\" title=\"" . $lang['common_showTaskdetails'] . "\">" . substr($taskInst->subject, 0, 15) . "</a></nobr></td>\n";
echo "<td class=list><nobr>" . $toolInst->getTime("d.m.Y, H:i", $taskInst->time) . "</nobr></td>\n";
echo "<td><nobr class=" . $taskInst->getPriorityStyle() . ">" . $taskInst->getPriorityName() . "</nobr></td>\n";
echo "<td><nobr class=" . $taskInst->getTypeStyle() . ">" . $taskInst->getTypeName() . "</nobr></td>\n";
echo "<td><nobr class=" . $taskInst->getStatusStyle() . ">" . $taskInst->getStatusName() . "</nobr></td>\n";
echo "<td class=list align=right><nobr>" . $toolInst->formatTime($taskInst->getSummary()) . "</nobr></td></tr>\n";
$sum += $taskInst->getSummary();
$sum_private += $taskInst->getSummary(true);
$costs += $taskInst->getCosts();
$costs_private += $taskInst->getCosts(true);
$customerCosts += $taskInst->getCustomerCosts();
$customerSum += $taskInst->getCustomerSummary();
next($list);
}
echo "<tr><td class=list colspan=6> </td></tr>\n";
echo "<tr>\n";
echo "<td class=list colspan=4 align=right><b>" . $lang['common_summaryTime'] . " : </b></td>\n";
echo "<td class=list colspan=2 align=right><nobr><b>" . $toolInst->formatTime($sum) . "</b></nobr></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class=list_private colspan=4 align=right><b>" . $lang['common_private_jobs'] . " - " . $lang['common_summaryTime'] . " : </b></td>\n";
示例3: task
<th> </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);
echo "<td><nobr>" . $userInst->username . "</nobr></td>\n";
}
示例4:
if ($taskInst->isfixedPrice()) {
$taskCosts = $taskInst->fixedPrice;
} else {
$taskCosts = $toolInst->deductibleSeconds($taskSum) / 3600 * $taskInst->getRate();
}
// calculate customer part
$customerTaskCosts = 0;
$customerTaskSummary = 0;
$customerTaskSummaryRounded = 0;
if ($taskInst->hasToPay()) {
$customerTaskCosts = $taskCosts;
$customerTaskSummary = $taskSum;
$customerTaskSummaryRounded = $toolInst->deductibleSeconds($taskSum);
}
// determine summaries for completed jobs (not only the shown jobs)
$completeTaskSummary = $taskInst->getSummary();
$completeTaskCustomerSummary = $taskInst->getCustomerSummary();
// add summaries to overall summaries
$costs += $taskCosts;
$summary += $taskSum;
$summaryRounded += $toolInst->deductibleSeconds($taskSum);
$customerCosts += $customerTaskCosts;
$customerSummary += $customerTaskSummary;
$customerSummaryRounded += $customerTaskSummaryRounded;
$completeCosts += $taskInst->getCosts();
$completeSummary += $completeTaskSummary;
$completeSummaryRounded += $toolInst->deductibleSeconds($completeTaskSummary);
$completeCustomerCosts += $taskInst->getCustomerCosts();
$completeCustomerSummary += $completeTaskCustomerSummary;
$completeCustomerSummaryRounded += $toolInst->deductibleSeconds($completeTaskCustomerSummary);
if ($loginInst->hasAccess("task.getRate") && !$taskInst->isFixedPrice()) {