本文整理汇总了PHP中CContact::getProjects方法的典型用法代码示例。如果您正苦于以下问题:PHP CContact::getProjects方法的具体用法?PHP CContact::getProjects怎么用?PHP CContact::getProjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CContact
的用法示例。
在下文中一共展示了CContact::getProjects方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: w2PtoolTip
<a href="?m=contacts&a=vcardexport&suppressHeaders=true&contact_id=<?php
echo $contactid;
?>
" style="float: right;"><?php
echo w2PtoolTip($m, 'exportar como vCard') . w2PshowImage('vcard.png') . w2PendTip();
?>
</a>
<a href="?m=contacts&a=addedit&contact_id=<?php
echo $contactid;
?>
" style="float: right;"><?php
echo w2PtoolTip($m, 'edit this contact') . w2PshowImage('icons/pencil.gif') . w2PendTip();
?>
</a>
<?php
$projectList = CContact::getProjects($contactid);
$df = $AppUI->getPref('SHDATEFORMAT');
$df .= ' ' . $AppUI->getPref('TIMEFORMAT');
$contact_updatekey = $carr[$z][$x]['contact_updatekey'];
$contact_lastupdate = $carr[$z][$x]['contact_lastupdate'];
$contact_updateasked = $carr[$z][$x]['contact_updateasked'];
$last_ask = new w2p_Utilities_Date($contact_updateasked);
$lastAskFormatted = $last_ask->format($df);
if (count($projectList) > 0) {
echo '<a href="" onclick=" window.open(\'./index.php?m=public&a=selector&dialog=1&callback=goProject&table=projects&user_id=' . $carr[$z][$x]['contact_id'] . '\', \'selector\', \'left=50,top=50,height=250,width=400,resizable\');return false;">' . w2PshowImage('projects.png', '', '', $m, 'click to view projects associated with this contact') . '</a>';
}
if ($contact_updateasked && (!$contact_lastupdate || $contact_lastupdate == 0) && $contact_updatekey) {
echo w2PtoolTip('info', 'Waiting for Contact Update Information. (Asked on: ' . $lastAskFormatted . ')') . '<img src="' . w2PfindImage('log-info.gif') . '" style="float: right;">' . w2PendTip();
} elseif ($contact_updateasked && (!$contact_lastupdate || $contact_lastupdate == 0) && !$contact_updatekey) {
echo w2PtoolTip('info', 'Waiting for too long! (Asked on ' . $lastAskFormatted . ')') . '<img src="' . w2PfindImage('log-error.gif') . '" style="float: right;">' . w2PendTip();
} elseif ($contact_updateasked && !$contact_updatekey) {
示例2: w2PgetParam
case 'files':
$title = 'File';
$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;