本文整理汇总了PHP中CCompany::getCompanyList方法的典型用法代码示例。如果您正苦于以下问题:PHP CCompany::getCompanyList方法的具体用法?PHP CCompany::getCompanyList怎么用?PHP CCompany::getCompanyList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCompany
的用法示例。
在下文中一共展示了CCompany::getCompanyList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _createCompanySelection
protected function _createCompanySelection($AppUI, $companyInput)
{
$company = new CCompany();
$companyMatches = $company->getCompanyList($AppUI, -1, $companyInput);
$company_id = count($companyMatches) == 1 ? $companyMatches[0]['company_id'] : $AppUI->user_company;
$companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$companies = arrayMerge(array('0' => ''), $companies);
$output .= '<td>' . arraySelect($companies, 'company_id', ' onChange=this.form.new_company.value=\'\'', $company_id) . '<input type="text" name="new_company" value="' . ($company_id > 0 ? '' : $companyInput) . '" />';
if ($company_id == 0) {
$output .= '<br /><em>' . $AppUI->_('compinfo') . '</em>';
}
$output .= '</td></tr>';
return $output;
}
示例2: die
/* $Id: select_contact_company.php 1858 2011-04-30 21:46:55Z caseydk $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/tags/version2.4/modules/contacts/select_contact_company.php $ */
if (!defined('W2P_BASE_DIR')) {
die('You should not access this file directly.');
}
$table_name = w2PgetParam($_GET, 'table_name', 'companies');
$company_id = (int) w2PgetParam($_GET, 'company_id', 0);
$dept_id = (int) w2PgetParam($_GET, 'dept_id', 0);
$select_list = array();
switch ($table_name) {
case 'companies':
$id_field = 'company_id';
$name_field = 'company_name';
$selection_string = 'Company';
$dataId = $company_id;
$company = new CCompany();
$companyList = $company->getCompanyList($AppUI);
foreach ($companyList as $comp) {
$select_list[$comp['company_id']] = $comp['company_name'];
}
break;
case 'departments':
$id_field = 'dept_id';
$name_field = 'dept_name';
$selection_string = 'Department';
$dataId = $dept_id;
$deptList = CDepartment::getDepartmentList($AppUI, $company_id, null);
foreach ($deptList as $dept) {
$select_list[$dept['dept_id']] = $dept['dept_name'];
}
break;
}
示例3: CCompany
global $search_string;
global $owner_filter_id;
global $currentTabId;
global $currentTabName;
global $tabbed;
global $type_filter;
global $orderby;
global $orderdir;
// load the company types
$types = w2PgetSysVal('CompanyType');
$company_type_filter = $currentTabId;
$company_type_filter = $currentTabName == 'Not Applicable' ? 0 : $company_type_filter;
$company_type_filter = $currentTabName == 'All Companies' ? -1 : $company_type_filter;
$company = new CCompany();
$allowedCompanies = $company->getAllowedRecords($AppUI->user_id, 'company_id, company_name');
$companyList = $company->getCompanyList($AppUI, $company_type_filter, $search_string, $owner_filter_id, $orderby, $orderdir);
?>
<table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl">
<tr>
<?php
$fieldList = array('company_name', 'countp', 'inactive', 'company_type');
$fieldNames = array('Company Name', 'Active Projects', 'Archived Projects', 'Type');
foreach ($fieldNames as $index => $name) {
?>
<th nowrap="nowrap">
<a href="?m=companies&orderby=<?php
echo $fieldList[$index];
?>
" class="hdr">
<?php
echo $AppUI->_($fieldNames[$index]);
示例4: die
<?php
if (!defined('W2P_BASE_DIR')) {
die('You should not access this file directly.');
}
global $AppUI, $search_string, $owner_filter_id, $tab, $orderby, $orderdir;
$type_filter = $tab - 1;
$company = new CCompany();
$items = $company->getCompanyList(null, $type_filter, $search_string, $owner_filter_id, $orderby, $orderdir);
$module = new w2p_System_Module();
$fields = $module->loadSettings('companies', 'index_list');
if (0 == count($fields)) {
$fieldList = array('company_name', 'countp', 'inactive', 'company_type');
$fieldNames = array('Company Name', 'Active Projects', 'Archived Projects', 'Type');
$module->storeSettings('companies', 'index_list', $fieldList, $fieldNames);
$fields = array_combine($fieldList, $fieldNames);
}
$company_types = w2PgetSysVal('CompanyType');
$customLookups = array('company_type' => $company_types);
include $AppUI->getTheme()->resolveTemplate('companies/list');