本文整理匯總了PHP中CProject::canCreate方法的典型用法代碼示例。如果您正苦於以下問題:PHP CProject::canCreate方法的具體用法?PHP CProject::canCreate怎麽用?PHP CProject::canCreate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CProject
的用法示例。
在下文中一共展示了CProject::canCreate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: die
<?php
if (!defined('W2P_BASE_DIR')) {
die('You should not access this file directly.');
}
$tab = $AppUI->processIntState('ProjIdxTab', $_GET, 'tab', 5);
$project = new CProject();
$structprojs = $project->getProjects();
$search_string = w2PgetParam($_POST, 'search_string', '');
$AppUI->setState($m . '_search_string', $search_string);
$search_string = w2PformSafe($search_string, true);
$canCreate = $project->canCreate();
$company_id = w2PgetConfig('company_filter_default', 'user') == 'user' ? $AppUI->user_company : '-1';
$orderby = isset($_GET['orderby']) && property_exists('CProject', $_GET['orderby']) ? $_GET['orderby'] : 'project_name';
$project_type = $AppUI->processIntState('ProjIdxType', $_POST, 'project_type', -1);
$owner = $AppUI->processIntState('ProjIdxowner', $_POST, 'project_owner', -1);
$orderdir = $AppUI->getState('ProjIdxOrderDir') ? $AppUI->getState('ProjIdxOrderDir') : 'asc';
if (isset($_GET['orderby'])) {
if ($AppUI->getState('ProjIdxOrderDir') == 'asc') {
$orderdir = 'desc';
} else {
$orderdir = 'asc';
}
}
$AppUI->setState('ProjIdxOrderDir', $orderdir);
// collect the full projects list data via function in projects.class.php
$search_text = $search_string;
// @note this is only because the projects_list_data function takes a bunch of globals
//$projects = projects_list_data();
$oCompany = new CCompany();
$allowedCompanies[-1] = $AppUI->_('all');