本文整理汇总了PHP中CEvent::getAssigned方法的典型用法代码示例。如果您正苦于以下问题:PHP CEvent::getAssigned方法的具体用法?PHP CEvent::getAssigned怎么用?PHP CEvent::getAssigned使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEvent
的用法示例。
在下文中一共展示了CEvent::getAssigned方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CEvent
$msg = '';
$obj = new CEvent();
$canDelete = $obj->canDelete($msg, $event_id);
// load the record data
if (!$obj->load($event_id)) {
$AppUI->setMsg('Event');
$AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
$AppUI->redirect();
} else {
$AppUI->savePlace();
}
// load the event types
$types = dPgetSysVal('EventType');
// load the event recurs types
$recurs = array('Never', 'Hourly', 'Daily', 'Weekly', 'Bi-Weekly', 'Every Month', 'Quarterly', 'Every 6 months', 'Every Year');
$assigned = $obj->getAssigned();
if ($obj->event_owner != $AppUI->user_id && !getPermission('admin', 'view')) {
$canEdit = false;
}
$df = $AppUI->getPref('SHDATEFORMAT');
$tf = $AppUI->getPref('TIMEFORMAT');
$start_date = $obj->event_start_date ? new CDate($obj->event_start_date) : null;
$end_date = $obj->event_end_date ? new CDate($obj->event_end_date) : null;
$event_project = db_LoadResult('SELECT project_name FROM projects where project_id=' . $obj->event_project);
// setup the title block
$titleBlock = new CTitleBlock('View Event', 'myevo-appointments.png', $m, "{$m}.{$a}");
if ($canAuthor) {
$titleBlock->addCell();
$titleBlock->addCell('<form action="?m=calendar&a=addedit" method="post">' . '<input type="submit" class="button" value="' . $AppUI->_('new event') . '" /></form>', '', '', '');
}
$titleBlock->addCrumb('?m=calendar&date=' . $start_date->format(FMT_TIMESTAMP_DATE), 'month view');
示例2: getEventTooltip
function getEventTooltip($event_id)
{
global $AppUI;
if (!$event_id) {
return '';
}
$df = $AppUI->getPref('SHDATEFORMAT');
$tf = $AppUI->getPref('TIMEFORMAT');
// load the record data
$event = new CEvent();
$event->loadFull($event_id);
// load the event types
$types = w2PgetSysVal('EventType');
// load the event recurs types
$recurs = array('Never', 'Hourly', 'Daily', 'Weekly', 'Bi-Weekly', 'Every Month', 'Quarterly', 'Every 6 months', 'Every Year');
$obj = new CEvent();
$obj->event_id = $event_id;
$assigned = $obj->getAssigned();
$start_date = $event->event_start_date ? new CDate($event->event_start_date) : null;
$end_date = $event->event_end_date ? new CDate($event->event_end_date) : null;
if ($event->event_project) {
$event_project = $event->project_name;
$event_company = $event->company_name;
}
$tt = '<table border="0" cellpadding="0" cellspacing="0" width="96%">';
$tt .= '<tr>';
$tt .= ' <td valign="top" width="50%">';
$tt .= ' <strong>' . $AppUI->_('Details') . '</strong>';
$tt .= ' <table cellspacing="3" cellpadding="2" width="100%">';
$tt .= ' <tr>';
$tt .= ' <td style="text-color:white;border: 1px solid white;-moz-border-radius:3.5px;-webkit-border-radius:3.5px;" align="right" nowrap="nowrap">' . $AppUI->_('Type') . '</td>';
$tt .= ' <td width="100%" nowrap="nowrap">' . $AppUI->_($types[$event->event_type]) . '</td>';
$tt .= ' </tr> ';
if ($event->event_project) {
$tt .= ' <tr>';
$tt .= ' <td style="border: 1px solid white;-moz-border-radius:3.5px;-webkit-border-radius:3.5px;" align="right" nowrap="nowrap">' . $AppUI->_('Company') . '</td>';
$tt .= ' <td width="100%">' . $event_company . '</td>';
$tt .= ' </tr>';
$tt .= ' <tr>';
$tt .= ' <td style="border: 1px solid white;-moz-border-radius:3.5px;-webkit-border-radius:3.5px;" align="right" nowrap="nowrap">' . $AppUI->_('Project') . '</td>';
$tt .= ' <td width="100%">' . $event_project . '</td>';
$tt .= ' </tr>';
}
$tt .= ' <tr>';
$tt .= ' <td style="border: 1px solid white;-moz-border-radius:3.5px;-webkit-border-radius:3.5px;" align="right" nowrap="nowrap">' . $AppUI->_('Starts') . '</td>';
$tt .= ' <td nowrap="nowrap">' . ($start_date ? $start_date->format($df . ' ' . $tf) : '-') . '</td>';
$tt .= ' </tr>';
$tt .= ' <tr>';
$tt .= ' <td style="border: 1px solid white;-moz-border-radius:3.5px;-webkit-border-radius:3.5px;" align="right" nowrap="nowrap">' . $AppUI->_('Ends') . '</td>';
$tt .= ' <td nowrap="nowrap">' . ($end_date ? $end_date->format($df . ' ' . $tf) : '-') . '</td>';
$tt .= ' </tr>';
$tt .= ' <tr>';
$tt .= ' <td style="border: 1px solid white;-moz-border-radius:3.5px;-webkit-border-radius:3.5px;" align="right" nowrap="nowrap">' . $AppUI->_('Recurs') . '</td>';
$tt .= ' <td nowrap="nowrap">' . $AppUI->_($recurs[$event->event_recurs]) . ($event->event_recurs ? ' (' . $event->event_times_recuring . ' ' . $AppUI->_('times') . ')' : '') . '</td>';
$tt .= ' </tr>';
$tt .= ' <tr>';
$tt .= ' <td style="border: 1px solid white;-moz-border-radius:3.5px;-webkit-border-radius:3.5px;" align="right" nowrap="nowrap">' . $AppUI->_('Attendees') . '</td>';
$tt .= ' <td nowrap="nowrap">';
if (is_array($assigned)) {
$start = false;
foreach ($assigned as $user) {
if ($start) {
$tt .= '<br />';
} else {
$start = true;
}
$tt .= $user;
}
}
$tt .= ' </tr>';
$tt .= ' </table>';
$tt .= ' </td>';
$tt .= ' <td width="50%" valign="top">';
$tt .= ' <strong>' . $AppUI->_('Note') . '</strong>';
$tt .= ' <table cellspacing="0" cellpadding="2" border="0" width="100%">';
$tt .= ' <tr>';
$tt .= ' <td style="border: 1px solid white;-moz-border-radius:3.5px;-webkit-border-radius:3.5px;">';
$tt .= ' ' . mb_str_replace(chr(10), "<br />", $event->event_description) . ' ';
$tt .= ' </td>';
$tt .= ' </tr>';
$tt .= ' </table>';
$tt .= ' </td>';
$tt .= '</tr>';
$tt .= '</table>';
return $tt;
}
示例3: array
if (!$event) {
$AppUI->setMsg('Event');
$AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
$AppUI->redirect();
} else {
$AppUI->savePlace();
}
//check if the user has view permission over the project
if ($event->event_project && !$perms->checkModuleItem('projects', 'view', $event->event_project)) {
$AppUI->redirect('m=public&a=access_denied');
}
// load the event types
$types = w2PgetSysVal('EventType');
// load the event recurs types
$recurs = array('Never', 'Hourly', 'Daily', 'Weekly', 'Bi-Weekly', 'Every Month', 'Quarterly', 'Every 6 months', 'Every Year');
$assigned = $event->getAssigned();
if ($event->event_owner != $AppUI->user_id && !canView('admin')) {
$canEdit = false;
}
$df = $AppUI->getPref('SHDATEFORMAT');
$tf = $AppUI->getPref('TIMEFORMAT');
$start_date = $event->event_start_date ? new w2p_Utilities_Date($event->event_start_date) : new w2p_Utilities_Date();
$end_date = $event->event_end_date ? new w2p_Utilities_Date($event->event_end_date) : new w2p_Utilities_Date();
if ($event->event_project) {
$project = new CProject();
$event_project = $project->load($event->event_project)->project_name;
}
// setup the title block
$titleBlock = new CTitleBlock('View Event', 'myevo-appointments.png', $m, $m . '.' . $a);
if ($canEdit) {
$titleBlock->addCell();
示例4: getEventTooltip
function getEventTooltip($event_id)
{
global $AppUI;
if (!$event_id) {
return '';
}
$df = $AppUI->getPref('SHDATEFORMAT');
$tf = $AppUI->getPref('TIMEFORMAT');
// load the record data
$event = new CEvent();
$event->loadFull($event_id);
// load the event types
$types = w2PgetSysVal('EventType');
// load the event recurs types
$recurs = array('Never', 'Hourly', 'Daily', 'Weekly', 'Bi-Weekly', 'Every Month', 'Quarterly', 'Every 6 months', 'Every Year');
$obj = new CEvent();
$obj->event_id = $event_id;
$assigned = $obj->getAssigned();
if ($event->event_project) {
$event_project = $event->project_name;
$event_company = $event->company_name;
}
$tt = '<table class="tool-tip">';
$tt .= '<tr>';
$tt .= ' <td valign="top" width="40%">';
$tt .= ' <strong>' . $AppUI->_('Details') . '</strong>';
$tt .= ' <table cellspacing="3" cellpadding="2" width="100%">';
$tt .= ' <tr>';
$tt .= ' <td class="tip-label">' . $AppUI->_('Type') . '</td>';
$tt .= ' <td>' . $AppUI->_($types[$event->event_type]) . '</td>';
$tt .= ' </tr> ';
if ($event->event_project) {
$tt .= ' <tr>';
$tt .= ' <td class="tip-label">' . $AppUI->_('Company') . '</td>';
$tt .= ' <td>' . $event_company . '</td>';
$tt .= ' </tr>';
$tt .= ' <tr>';
$tt .= ' <td class="tip-label">' . $AppUI->_('Project') . '</td>';
$tt .= ' <td>' . $event_project . '</td>';
$tt .= ' </tr>';
}
$tt .= ' <tr>';
$tt .= ' <td class="tip-label">' . $AppUI->_('Starts') . '</td>';
$tt .= ' <td>' . $AppUI->formatTZAwareTime($event->event_start_date, $df . ' ' . $tf) . '</td>';
$tt .= ' </tr>';
$tt .= ' <tr>';
$tt .= ' <td class="tip-label">' . $AppUI->_('Ends') . '</td>';
$tt .= ' <td>' . $AppUI->formatTZAwareTime($event->event_end_date, $df . ' ' . $tf) . '</td>';
$tt .= ' </tr>';
$tt .= ' <tr>';
$tt .= ' <td class="tip-label">' . $AppUI->_('Recurs') . '</td>';
$tt .= ' <td>' . $AppUI->_($recurs[$event->event_recurs]) . ($event->event_recurs ? ' (' . $event->event_times_recuring . ' ' . $AppUI->_('times') . ')' : '') . '</td>';
$tt .= ' </tr>';
$tt .= ' <tr>';
$tt .= ' <td class="tip-label">' . $AppUI->_('Attendees') . '</td>';
$tt .= ' <td>';
$tt .= implode('<br />', $assigned);
$tt .= ' </tr>';
$tt .= ' </table>';
$tt .= ' </td>';
$tt .= ' <td width="60%" valign="top">';
$tt .= ' <strong>' . $AppUI->_('Note') . '</strong>';
$tt .= ' <table cellspacing="0" cellpadding="2" border="0" width="100%">';
$tt .= ' <tr>';
$tt .= ' <td class="tip-label description">';
$tt .= ' ' . mb_str_replace(chr(10), "<br />", $event->event_description) . ' ';
$tt .= ' </td>';
$tt .= ' </tr>';
$tt .= ' </table>';
$tt .= ' </td>';
$tt .= '</tr>';
$tt .= '</table>';
return $tt;
}