3 // Set page title and set crumbs to index
4 set_page_title(lang('clients'));
5 administration_tabbed_navigation(ADMINISTRATION_TAB_CLIENTS
);
6 administration_crumbs(lang('clients'));
8 if(owner_company()->canAddClient(logged_user())) {
9 add_page_action(lang('add client'), get_url('company', 'add_client'));
13 <?php
if(isset($clients) && is_array($clients) && count($clients)) { ?
>
16 <th
><?php
echo lang('name') ?
></th
>
17 <th
><?php
echo lang('users') ?
></th
>
18 <th
><?php
echo lang('options') ?
></th
>
20 <?php
foreach($clients as $client) { ?
>
22 <td
><a href
="<?php echo $client->getViewUrl() ?>"><?php
echo clean($client->getName()) ?
></a
></td
>
23 <td style
="text-align: center"><?php
echo $client->countUsers() ?
></td
>
26 if($client->canAddUser(logged_user())) {
27 $options[] = '<a href="' . $client->getAddUserUrl() . '">' . lang('add user') . '</a>';
29 if($client->canUpdatePermissions(logged_user())) {
30 $options[] = '<a href="' . $client->getUpdatePermissionsUrl() . '">' . lang('permissions') . '</a>';
32 if($client->canEdit(logged_user())) {
33 $options[] = '<a href="' . $client->getEditUrl() . '">' . lang('edit') . '</a>';
35 if($client->canDelete(logged_user())) {
36 $options[] = '<a href="' . $client->getDeleteClientUrl() . '" onclick="return confirm(\'' . lang('confirm delete client') . '\')">' . lang('delete') . '</a>';
39 <td
><?php
echo implode(' | ', $options) ?
></td
>
44 <?php
echo lang('no clients in company') ?
>