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


PHP CCompany::getProjects方法代码示例

本文整理汇总了PHP中CCompany::getProjects方法的典型用法代码示例。如果您正苦于以下问题:PHP CCompany::getProjects方法的具体用法?PHP CCompany::getProjects怎么用?PHP CCompany::getProjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCompany的用法示例。


在下文中一共展示了CCompany::getProjects方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: die

<?php

/* $Id$ $URL$ */
if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
##
##	Companies: View Projects sub-table
##
global $AppUI, $company_id, $pstatus, $w2Pconfig;
$sort = w2PgetParam($_GET, 'sort', 'project_name');
if ($sort == 'project_priority') {
    $sort .= ' DESC';
}
$df = $AppUI->getPref('SHDATEFORMAT');
$projects = CCompany::getProjects($AppUI, $company_id, 1, $sort);
?>
<table cellpadding="2" cellspacing="1" border="0" width="100%" class="tbl"><?php 
if (count($projects) > 0) {
    ?>
	<tr>
		<th><a href="index.php?m=companies&a=view&company_id=<?php 
    echo $company_id;
    ?>
&sort=project_priority"><?php 
    echo $AppUI->_('P');
    ?>
</a></th>
		<th><a href="index.php?m=companies&a=view&company_id=<?php 
    echo $company_id;
    ?>
开发者ID:eureka2,项目名称:web2project,代码行数:31,代码来源:vw_active.php

示例2: w2PgetParam

     $q->addQuery('file_id,file_name');
     $q->addOrder('file_name');
     $resultList = $q->loadHashList();
     break;
 case 'forums':
     $title = 'Forum';
     $q->addQuery('forum_id,forum_name');
     $q->addOrder('forum_name');
     $resultList = $q->loadHashList();
     break;
 case 'projects':
     $project_company = w2PgetParam($_GET, 'project_company', 0);
     if ($user_id > 0) {
         $projectList = CContact::getProjects($user_id);
     } else {
         $projectList = CCompany::getProjects($AppUI, $project_company);
     }
     foreach ($projectList as $project) {
         $resultList[$project['project_id']] = $project['project_name'];
     }
     break;
 case 'tasks':
     $title = 'Task';
     $task_project = (int) w2PgetParam($_GET, 'task_project', 0);
     $myTask = new CTask();
     $task_list = $myTask->getAllowedTaskList($AppUI, $task_project);
     $level = 0;
     $query_result = array();
     $last_parent = 0;
     foreach ($task_list as $task) {
         if ($task['task_parent'] != $task['task_id']) {
开发者ID:eureka2,项目名称:web2project,代码行数:31,代码来源:selector.php

示例3: die

<?php

/* $Id: vw_archived.php 321 2009-02-23 04:41:14Z caseydk $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/tags/version2.4/modules/companies/vw_archived.php $ */
if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
##
##	Companies: View Archived Projects sub-table
##
global $AppUI, $company_id;
$projects = CCompany::getProjects($AppUI, $company_id, 0);
?>
<table cellpadding="2" cellspacing="1" border="0" width="100%" class="tbl"><?php 
if (count($projects) > 0) {
    ?>
<tr><th><?php 
    echo $AppUI->_('Name');
    ?>
</th><th><?php 
    echo $AppUI->_('Owner');
    ?>
</th></tr><?php 
    foreach ($projects as $project) {
        ?>
		<tr>
			<td>
				<a href="?m=projects&a=view&project_id=<?php 
        echo $project['project_id'];
        ?>
"><?php 
        echo $project['project_name'];
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:vw_archived.php

示例4: CProject

echo $AppUI->_('Target Budget');
?>
</th>
        <th width="10px" align="center"><?php 
echo $AppUI->_('Actual Cost');
?>
</th>
        <th width="10px" align="center"><?php 
echo $AppUI->_('Difference');
?>
</th>
    </tr>
    <?php 
//TODO: rotate the headers by 90 degrees?
$activeOnly = $active_projects ? true : false;
$projectList = CCompany::getProjects($AppUI, $company_id, $activeOnly);
$bcode = new CSystem_Bcode();
$project = new CProject();
if (count($projectList)) {
    foreach ($projectList as $projectItem) {
        $project->loadFull(null, $projectItem['project_id']);
        $criticalTasks = $project->getCriticalTasks($projectItem['project_id']);
        $costs = $bcode->calculateProjectCost($projectItem['project_id'], $start_date->format(FMT_DATETIME_MYSQL), $end_date->format(FMT_DATETIME_MYSQL));
        $pstart = new w2p_Utilities_Date($project->project_start_date);
        $pend = intval($criticalTasks[0]['task_end_date']) ? new w2p_Utilities_Date($criticalTasks[0]['task_end_date']) : new w2p_Utilities_Date();
        $filterStart = $start_date;
        $filterEnd = $end_date;
        $workingDaysInSpans = $filterStart->findDaysInRangeOverlap($pstart, $pend, $filterStart, $filterEnd);
        $workingDaysForProj = $pstart->workingDaysInSpan($pend);
        $factor = $workingDaysInSpans / $workingDaysForProj;
        $factor = $factor > 1 ? 1 : $factor;
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:costsbyproject.php

示例5: testGetProjects

 /**
  * Tests loading list of Projects for this company.
  */
 public function testGetProjects()
 {
     global $AppUI;
     $projects = CCompany::getProjects($AppUI, 1);
     $this->assertEquals(1, count($projects));
     $this->assertEquals(1, $projects[0]['project_id']);
     $this->assertEquals('Test Project', $projects[0]['project_name']);
     $this->assertEquals('', $projects[0]['project_start_date']);
     $this->assertEquals(0, $projects[0]['project_status']);
     $this->assertEquals('0.00', $projects[0]['project_target_budget']);
     $this->assertEquals(-1, $projects[0]['project_priority']);
     $this->assertEquals('Admin', $projects[0]['contact_first_name']);
     $this->assertEquals('Person', $projects[0]['contact_last_name']);
 }
开发者ID:eureka2,项目名称:web2project,代码行数:17,代码来源:companies.test.php


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