本文整理汇总了PHP中Tasks::getUserById方法的典型用法代码示例。如果您正苦于以下问题:PHP Tasks::getUserById方法的具体用法?PHP Tasks::getUserById怎么用?PHP Tasks::getUserById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tasks
的用法示例。
在下文中一共展示了Tasks::getUserById方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Tasks
</div>-->
<table class="table table-striped table-bordered table-condensed" id='allContactsTable'>
<thead>
<th>#</th>
<th>Категория</th>
<th>Статус</th>
<th>Приоритет</th>
<th>Тема</th>
<th>Назначена</th>
<th>Создана</th>
<th>Действия</th>
</thead>
<tbody>
<?php
$count = 1;
$crmUser = new Tasks();
foreach ($table as $rows) {
echo '<tr>' . '<td>' . $count++ . '</td>' . '<td>' . $rows->category . '</td>' . '<td>' . $rows->status . '</td>' . '<td>' . $rows->priority . '</td>' . '<td>';
if ($rows->task_name !== "") {
echo anchor("tasks/viewTask/" . $rows->id, $rows->task_name);
} else {
echo anchor("tasks/viewTask/" . $rows->id, substr($rows->task_description, 0, 80) . '...');
}
echo '</td>';
echo '<td>' . $crmUser->getUserById($rows->assigned) . '</td>' . '<td>' . date('d.m.Y H:i:s', strtotime($rows->create_date)) . '</td>' . '<td>' . anchor("tasks/deleteTask/" . $rows->id, "Удалить", "class='btn btn-mini btn-danger pull-left'") . '</td>' . '</tr>';
}
?>
</tbody>
</table>
</div><!--/span-->
示例2: date
<th scope="row">Выполнена</th>
<td>
<?php
if (!empty($row->end_date)) {
echo date('d.m.Y H:i:s', strtotime($row->end_date));
}
?>
</td>
</tr>
<tr>
<th scope="row">Назначена</th>
<td>
<?php
$crmUser = new Tasks();
if ($row->assigned !== '') {
echo $crmUser->getUserById($row->assigned);
}
?>
</td>
<th scope="row">Категория</th>
<td>
<?php
echo $row->category;
?>
</td>
</tr>
</tbody>
</table>
<hr/>
<h4>Описание</h4>