当前位置: 首页>>代码示例>>PHP>>正文


PHP project::getList方法代码示例

本文整理汇总了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;
 }
开发者ID:pmtool,项目名称:pmtool,代码行数:28,代码来源:request.inc.php

示例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";
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:projects.php

示例3: project

</a>)<?php 
} else {
    echo $lang['requests_newRequest'];
}
?>
</h2>
<table border="0" cellpadding="2" cellspacing="0">
  <tr>
    <td><?php 
echo $lang['common_project'];
?>
:&nbsp;</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'];
?>
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:requests.php


注:本文中的project::getList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。