本文整理汇总了PHP中project::isAvailable方法的典型用法代码示例。如果您正苦于以下问题:PHP project::isAvailable方法的具体用法?PHP project::isAvailable怎么用?PHP project::isAvailable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类project
的用法示例。
在下文中一共展示了project::isAvailable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: project
?>
</td>
</tr><tr>
<td><?php
echo $lang['common_project'];
?>
: </td>
<td><select name="projectid" onchange="javascript:document.form1.action.value='search';document.form1.submit()">
<?php
$projectInst = new project();
$list = $projectInst->getList();
$projectMount = "";
while ($element = current($list)) {
$projectInst->activate($element);
$selected = "";
if ($projectInst->isAvailable() || $recordType == "edit") {
if (!$projectMount) {
$projectMount = $element;
}
if ($projectInst->id == $taskInst->projectId) {
$selected = "selected";
$projectMount = $element;
}
echo "<option " . $selected . " value=\"" . $projectInst->id . "\">" . $projectInst->name . "\n";
}
next($list);
}
?>
</select></td>
</tr><tr>
<td><?php
示例2: 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));
$boxInst->addContent("...</a></td></tr>");
}
next($list);
}
$boxInst->addContent("</table>");
} else {
$boxInst->addContent("<b>" . $lang['home_myOpenTasksNoMatches'] . "<br> ");
}
$boxInst->get();
}