本文整理汇总了PHP中project::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP project::getList方法的具体用法?PHP project::getList怎么用?PHP project::getList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类project
的用法示例。
在下文中一共展示了project::getList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setFilter
function setFilter()
{
global $dbInst, $loginInst;
if (!$loginInst->hasAccess("request.setFilter")) {
return false;
}
$filter = "where " . $dbInst->config['table_request'] . ".project_id = " . $dbInst->config['table_project'] . ".id ";
$filter .= "and " . $dbInst->config['table_request'] . ".priority_id = " . $dbInst->config['table_taskpriority'] . ".id ";
$filter .= "and " . $dbInst->config['table_request'] . ".type_id = " . $dbInst->config['table_tasktype'] . ".id ";
// customers should only be able to view requests for own projects
if ($loginInst->isCustomer()) {
$projectInst = new project();
$list = $projectInst->getList();
if ($projectInst->matches >= 1) {
$filter .= "and (";
}
$or = "";
while ($element = current($list)) {
$filter .= " " . $or . " (" . $dbInst->config['table_request'] . ".project_id = '" . $element . "')";
$or = "or";
next($list);
}
if ($projectInst->matches >= 1) {
$filter .= ")";
}
}
return $filter;
}
示例2: current
<table border="0" cellpadding="2" cellspacing="1" width="99%" bgcolor="#ffffff">
<tr>
<?php
echo "<th width=\"20%\" align=left><a href=\"" . $toolInst->encodeUrl("index.php?content=projects.php&order=name&desc=" . $desc) . "\" title=\"" . $lang['common_orderByProject'] . "\">" . $lang['common_project'] . "</a></th>\n";
echo "<th width=\"30%\" align=left><a href=\"" . $toolInst->encodeUrl("index.php?content=projects.php&order=description&desc=" . $desc) . "\" title=\"" . $lang['project_orderByDescription'] . "\">" . $lang['common_description'] . "</a></th>\n";
if (!$loginInst->isCustomer()) {
echo "<th width=\"20%\" align=left><a href=\"" . $toolInst->encodeUrl("index.php?content=projects.php&order=customer&desc=" . $desc) . "\" title=\"" . $lang['project_orderByCustomer'] . "\">" . $lang['common_customer'] . "</a></th>\n";
}
echo "<th width=\"20%\" align=left><a href=\"" . $toolInst->encodeUrl("index.php?content=projects.php&order=projectstatus_id&desc=" . $desc) . "\" title=\"" . $lang['common_orderByStatus'] . "\">" . $lang['common_status'] . "</a></th>\n";
echo "<th width=\"20%\" align=left><a href=\"" . $toolInst->encodeUrl("index.php?content=projects.php&order=priority_id&desc=" . $desc) . "\" title=\"" . $lang['common_orderByPriority'] . "\">" . $lang['common_priority'] . "</a></th>\n";
if (!$loginInst->isCustomer()) {
echo "<th>" . $lang['project_paid'] . "</th>\n";
echo "<th colspan=2>" . $lang['common_action'] . "</th>\n";
}
echo "</tr>\n";
$list = $projectInst->getList($order, $desc);
$style = "light";
while ($element = current($list)) {
$projectInst->activate($element);
?>
<tr class="<?php
echo $style;
?>
" onmouseover="this.style.backgroundColor='#fafafa'" onmouseout="this.style.backgroundColor=''"><?php
echo "<td><a href=\"javascript:openwindow('" . $toolInst->encodeUrl("index.php?content=projectdetails.php&view=details&projectid=" . $element) . "',width='500',height='500')\" title=\"" . $lang['common_showDetailsForThisProject'] . "\">" . $projectInst->name . "</a></td>\n";
echo "<td>" . $projectInst->description . "</td>\n";
$customerInst = new customer($projectInst->customerId);
if (!$loginInst->isCustomer()) {
echo "<td><a href=\"javascript:openwindow('" . $toolInst->encodeUrl("index.php?content=customerdetails.php&view=details&customerid=" . $customerInst->id) . "',width='500',height='500')\" title=\"" . $lang['project_showDetailsForThisCustomer'] . "\">" . $customerInst->company . "</a></td>\n";
}
echo "<td>" . $projectInst->getStatusName() . "</td>\n";
示例3: project
</a>)<?php
} else {
echo $lang['requests_newRequest'];
}
?>
</h2>
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td><?php
echo $lang['common_project'];
?>
: </td>
<td><select name="projectid">
<?php
$projectInst = new project();
$list = $projectInst->getList();
while ($element = current($list)) {
$projectInst->activate($element);
$selected = "";
if ($projectInst->id == $requestInst->projectId) {
$selected = "selected";
}
echo "<option " . $selected . " value=\"" . $projectInst->id . "\">" . $projectInst->name . "\n";
next($list);
}
?>
</select></td>
</tr><tr>
<td><?php
echo $lang['common_subject'];
?>