本文整理汇总了PHP中CProject::getCompany方法的典型用法代码示例。如果您正苦于以下问题:PHP CProject::getCompany方法的具体用法?PHP CProject::getCompany怎么用?PHP CProject::getCompany使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CProject
的用法示例。
在下文中一共展示了CProject::getCompany方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
<?php
/* $Id$ $URL$ */
if (!defined('W2P_BASE_DIR')) {
die('You should not access this file directly.');
}
global $AppUI, $project_id, $df, $canEdit, $m, $tab;
// Lets check which cost codes have been used before
$company_id = CProject::getCompany($project_id);
$task_log_costcodes = array(0 => '(all)') + CProject::getBillingCodes($company_id, true);
$users = w2PgetUsers();
$cost_code = w2PgetParam($_GET, 'cost_code', 0);
if (isset($_GET['user_id'])) {
$AppUI->setState('ProjectsTaskLogsUserFilter', w2PgetParam($_GET, 'user_id', 0));
}
$user_id = $AppUI->getState('ProjectsTaskLogsUserFilter') ? $AppUI->getState('ProjectsTaskLogsUserFilter') : 0;
if (isset($_GET['hide_inactive'])) {
$AppUI->setState('ProjectsTaskLogsHideArchived', true);
} else {
$AppUI->setState('ProjectsTaskLogsHideArchived', false);
}
$hide_inactive = $AppUI->getState('ProjectsTaskLogsHideArchived');
if (isset($_GET['hide_complete'])) {
$AppUI->setState('ProjectsTaskLogsHideComplete', true);
} else {
$AppUI->setState('ProjectsTaskLogsHideComplete', false);
}
$hide_complete = $AppUI->getState('ProjectsTaskLogsHideComplete');
?>
<script language="JavaScript">
<?php
示例2: testGetCompany
/**
* Tests finding company of project
*/
public function testGetCompany()
{
$company = CProject::getCompany(1);
$this->assertEquals(1, $company);
}