本文整理汇总了PHP中Clients::listClients方法的典型用法代码示例。如果您正苦于以下问题:PHP Clients::listClients方法的具体用法?PHP Clients::listClients怎么用?PHP Clients::listClients使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Clients
的用法示例。
在下文中一共展示了Clients::listClients方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Clients
<?php
global $Bootstrap;
$this->start('clients_list');
$Clients = new Clients();
// check if the query is ok
if ($Clients->listClients() === true) {
$client_no = 1;
// check if query returned results
if (empty($Clients->_Data)) {
// if query did not return results inform the user
echo '
<tr>
<td colspan="9" align="center">
<div class="alert alert-info">No clients in the database</div>
</td>
</tr>';
} else {
// if query return results show them in the table
foreach ($Clients->_Data as $client) {
echo '
<tr>
<td>' . $client_no++ . '</td>
<td>' . $client['client_name'] . '</td>
<td>' . $client['client_email'] . '</td>
<td>' . $client['client_phone'] . '</td>
<td>' . $client['client_cars'] . '</td>
<td>' . date('dS \\o\\f M Y', strtotime($client['client_date_registered'])) . '</td>
<td width="1"><a href="#" class="btn btn-warning btn-xs"><i class="fa fa-pencil-square"></i></a></td>
<td width="1"><a href="#" class="btn btn-danger btn-xs"><i class="fa fa-trash"></i></a></td>
<td width="1"><a href="#" class="btn btn-info btn-xs"><i class="fa fa-car"></i></a></td>