本文整理汇总了PHP中task::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP task::getList方法的具体用法?PHP task::getList怎么用?PHP task::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类task
的用法示例。
在下文中一共展示了task::getList方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: task
?>
<th><nobr>days left</nobr></th>
<?php
}
?>
<th>percentage</th>
<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
示例3: implode
} else {
$seen[] = $element;
echo "<option value=\"" . $element . "\">/ " . implode(" / ", $taskInst->treeName($element)) . "\n";
}
}
next($list);
}
if (!in_array("0", $seen)) {
echo "<option value=\"0\"> /\n";
}
} else {
?>
<option value="0">/<?php
$taskInst2 = new task();
$taskInst2->filterProjectId = $projectMount;
$list = $taskInst2->getList();
while ($element = current($list)) {
echo "<option value=\"" . $element . "\">/ " . implode(" / ", $taskInst2->treeName($element)) . "\n";
next($list);
}
}
?>
</select>
</td>
</tr><tr>
<td><?php
echo $lang['common_subject'];
?>
: </td>
<td><input type="text" name="subject" value="<?php
echo $taskInst->subject;
示例4: box
$boxInst = new box();
$boxInst->setTitle($lang['home_queryTask']);
$boxInst->setBgColor("#f8f8f8");
$boxInst->addContent("<form name=\"form3\" onsubmit=\"javascript:openwindow('" . $toolInst->encodeUrl("index.php?content=taskdetails.php&view=details&taskid='+document.form3.taskid.value+'") . "','500','500')\">");
$boxInst->addContent(" " . $lang['common_ID'] . " " . $lang['common_task'] . ": <input type=\"text\" name=\"taskid\" size=\"" . $htmlconfig['text_size4'] . "\">");
$boxInst->addContent("<input type=\"button\" value=\"" . $lang['common_search'] . "\" onclick=\"javascript:openwindow('" . $toolInst->encodeUrl("index.php?content=taskdetails.php&view=details&taskid='+document.form3.taskid.value+'") . "','500','500')\">");
$boxInst->addContent("</form>");
$boxInst->get();
}
if ($loginInst->hasAccess("task")) {
// create box with open tasks
$taskInst = new task();
$taskInst->filterStatusId = TASK_STATUS_DONE;
$taskInst->filterInvertStatus = 1;
$taskInst->filterUserId = $loginInst->id;
$list = $taskInst->getList("priority", "DESC");
$boxInst = new box();
$boxInst->setTitle($lang['home_myOpenTasks']);
$boxInst->setBgColor("#f8f8f8");
if ($taskInst->matches > 0) {
$boxInst->addContent("<table border=0 cellpadding=2 cellspacing=0 width=100%>");
$boxInst->addContent("<tr><th>" . $lang['common_priority'] . "</th><th>" . $lang['common_type'] . "</th><th>" . $lang['common_subject'] . "</th></tr>");
while ($element = current($list)) {
$taskInst->activate($element);
$projectInst = new project($taskInst->projectId);
if ($projectInst->isAvailable()) {
$projectInst = new project($taskInst->projectId);
$boxInst->addContent("<tr><td valign=top class=" . $taskInst->getPriorityStyle() . ">" . $taskInst->getPriorityName() . "</td>");
$boxInst->addContent("<td valign=top class=" . $taskInst->getTypeStyle() . ">" . $taskInst->getTypeName() . "</td>");
$boxInst->addContent("<td class=list><a href=\"javascript:openwindow('" . $toolInst->encodeUrl("index.php?content=taskdetails.php&view=details&taskid=" . $element) . "',width='500',height='500')\" title=\"" . $lang['common_showTaskdetails'] . "\">");
$boxInst->addContent(substr($projectInst->name . ": " . $taskInst->subject, 0, 50));
示例5:
</td>
</tr>
</table>
<?php
# order
$order = "priority";
if (tool::secureGet('order')) {
$order = tool::secureGet('order');
}
if (tool::secureGet('desc') == "DESC") {
$desc = "";
} else {
$desc = "DESC";
}
$list = $taskInst->getList($order, $desc);
if ($taskInst->matches > 0) {
#######################################################################
## show existing tasks
?>
<br>
<table border="0" cellpadding="2" cellspacing="1" width="96%" bgcolor="#ffffff">
<tr>
<th colspan="6"><?php
echo $taskInst->matches;
?>
<?php
echo $lang['project_tasksUntilNow'];
?>
</th>
</tr><tr>
示例6: next
} else {
echo "<td colspan=\"2\" class=\"" . $taskInst->getStatusStyle() . "\">" . $taskInst->getStatusName() . "</td>\n";
}
echo "<td width=\"100%\"> </td>\n";
echo "</tr>\n";
next($taskList);
$count = $taskDepth;
processTask(++$count, $taskInst->childs());
}
}
// now we create a tasklist, containing only the root tasks
$childs = array();
$taskInst = new task();
$taskInst->filterProjectId = tool::securePost('id');
$taskInst->filterMountId = 0;
processTask(1, $taskInst->getList());
?>
<tr class="dark">
<td align="right" colspan="<?php
echo $max + 5;
?>
"><b>average</b></td>
<?php
$percent = 100;
if ($rows > 0) {
$percent = $toolInst->numberRound($sumPercentage / $rows, 2);
}
if ($percent > 100) {
?>
<td align="right" class="rmred"><?php
} elseif ($percent > 80) {