當前位置: 首頁>>代碼示例>>PHP>>正文


PHP task::getList方法代碼示例

本文整理匯總了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;
 }
開發者ID:pmtool,項目名稱:pmtool,代碼行數:17,代碼來源:project.inc.php

示例2: task

    ?>
      <th><nobr>days left</nobr></th>
    <?php 
}
?>
    <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 
開發者ID:pmtool,項目名稱:pmtool,代碼行數:31,代碼來源:index.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'];
?>
:&nbsp;</td>
          <td><input type="text" name="subject" value="<?php 
echo $taskInst->subject;
開發者ID:pmtool,項目名稱:pmtool,代碼行數:31,代碼來源:tasks.php

示例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("&nbsp;" . $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));
開發者ID:pmtool,項目名稱:pmtool,代碼行數:31,代碼來源:home.php

示例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>
開發者ID:pmtool,項目名稱:pmtool,代碼行數:31,代碼來源:projectdetails.php

示例6: next

            } else {
                echo "<td colspan=\"2\" class=\"" . $taskInst->getStatusStyle() . "\">" . $taskInst->getStatusName() . "</td>\n";
            }
            echo "<td width=\"100%\">&nbsp;</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) {
開發者ID:pmtool,項目名稱:pmtool,代碼行數:31,代碼來源:index.php


注:本文中的task::getList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。