本文整理匯總了PHP中CAppUI::isActiveModule方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::isActiveModule方法的具體用法?PHP CAppUI::isActiveModule怎麽用?PHP CAppUI::isActiveModule使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CAppUI
的用法示例。
在下文中一共展示了CAppUI::isActiveModule方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getTaskDepartments
public function getTaskDepartments(CAppUI $AppUI = null, $taskId)
{
global $AppUI;
if ($AppUI->isActiveModule('departments')) {
$q = new w2p_Database_Query();
$q->addTable('departments', 'd');
$q->addTable('task_departments', 't');
$q->addWhere('t.department_id = d.dept_id');
$q->addWhere('t.task_id = ' . (int) $taskId);
$q->addQuery('dept_id, dept_name, dept_phone');
$department = new CDepartment();
$department->setAllowedSQL($AppUI->user_id, $q);
return $q->loadHashList('dept_id');
}
}
示例2: getForums
public static function getForums(CAppUI $AppUI = null, $projectId)
{
global $AppUI;
if ($AppUI->isActiveModule('forums') && canView('forums')) {
$q = new w2p_Database_Query();
$q->addTable('forums');
$q->addQuery('forum_id, forum_project, forum_description, forum_owner, forum_name, forum_message_count,
DATE_FORMAT(forum_last_date, "%d-%b-%Y %H:%i" ) forum_last_date,
project_name, project_color_identifier, project_id');
$q->addJoin('projects', 'p', 'project_id = forum_project', 'inner');
$q->addWhere('forum_project = ' . (int) $projectId);
$q->addOrder('forum_project, forum_name');
return $q->loadHashList('forum_id');
}
}
示例3: getDepartments
public static function getDepartments(CAppUI $AppUI, $companyId)
{
$perms = $AppUI->acl();
if ($AppUI->isActiveModule('departments') && canView('departments')) {
$q = new w2p_Database_Query();
$q->addTable('departments');
$q->addQuery('departments.*, COUNT(contact_department) dept_users');
$q->addJoin('contacts', 'c', 'c.contact_department = dept_id');
$q->addWhere('dept_company = ' . (int) $companyId);
$q->addGroup('dept_id');
$q->addOrder('dept_parent, dept_name');
$department = new CDepartment();
$department->setAllowedSQL($AppUI->user_id, $q);
return $q->loadList();
}
}
示例4: getTaskContacts
public function getTaskContacts(CAppUI $AppUI = null, $taskId)
{
global $AppUI;
$perms = $AppUI->acl();
if ($AppUI->isActiveModule('contacts') && $perms->checkModule('contacts', 'view')) {
$q = new DBQuery();
$q->addTable('contacts', 'c');
$q->addJoin('task_contacts', 'tc', 'tc.contact_id = c.contact_id', 'inner');
$q->leftJoin('departments', 'd', 'dept_id = contact_department');
$q->addWhere('tc.task_id = ' . (int) $taskId);
$q->addQuery('c.contact_id, contact_first_name, contact_last_name, contact_email');
$q->addQuery('contact_phone, dept_name');
$q->addWhere('(contact_owner = ' . (int) $AppUI->user_id . ' OR contact_private = 0)');
$department = new CDepartment();
$department->setAllowedSQL($AppUI->user_id, $q);
return $q->loadHashList('contact_id');
}
}
示例5: getContactList
public static function getContactList(CAppUI $AppUI = null, $deptId)
{
global $AppUI;
if ($AppUI->isActiveModule('contacts') && canView('contacts') && (int) $deptId > 0) {
$q = new w2p_Database_Query();
$q->addTable('contacts', 'con');
$q->addQuery('con.contact_id, con.contact_first_name');
$q->addQuery('con.contact_last_name');
$q->addWhere('contact_department = ' . (int) $deptId);
$q->addWhere('(contact_owner = ' . (int) $AppUI->user_id . ' OR contact_private = 0)');
$q->addOrder('contact_first_name');
$results = $q->loadHashList('contact_id');
}
return $results;
}