<th><?php echo lang('outgoing server') ?></th> <th><?php echo lang('users') ?></th> <th><?php echo lang('options') ?></th> </tr> <?php $isAlt = true; foreach($all_accounts as $account) { $isAlt = !$isAlt; ?> <tr class="<?php echo $isAlt? 'altRow' : ''?>"> <td><?php echo clean($account->getName()) ?></td> <td><?php echo $account->getEmailAddress() ?></td> <td><?php echo $account->getOwner() instanceof Contact ? $account->getOwner()->getObjectName() : lang("n/a") ?></td> <td><?php echo $account->getServer() ?></td> <td><?php echo $account->getSmtpServer() ?></td> <td><?php echo MailAccountContacts::countByAccount($account) ?></td> <?php $options = array(); if (($account->canDelete(logged_user()) && $account->getContactId() == logged_user()->getId()) || $account->canEdit(logged_user())) { $options[] = '<a class="internalLink" href="'.get_url('mail', 'edit_account', array('id' => $account->getId())).'">' . lang('edit') . '</a>'; } if ($account->canDelete(logged_user())) { $options[] = '<a class="internalLink" href="javascript:og.promptDeleteAccount(' . $account->getId() . ', true)">' . lang('delete') . '</a>'; } // if if ($account->canDelete(logged_user()) && config_option("sent_mails_sync")) { $options[] = '<a class="internalLink" href="'.get_url('mail', 'sync_old_sent_mails', array('id' => $account->getId())).'">' . lang('sync') . '</a>'; } ?> <td style="font-size: 80%;"><?php echo implode(' | ', $options) ?></td> </tr> <?php } // foreach ?>
?> </td> <td><?php echo $account->getOwner() instanceof Contact ? $account->getOwner()->getObjectName() : lang("n/a"); ?> </td> <td><?php echo $account->getServer(); ?> </td> <td><?php echo $account->getSmtpServer(); ?> </td> <td><?php echo MailAccountContacts::countByAccount($account); ?> </td> <?php $options = array(); if ($account->canDelete(logged_user()) && $account->getContactId() == logged_user()->getId() || $account->canEdit(logged_user())) { $options[] = '<a class="internalLink" href="' . get_url('mail', 'edit_account', array('id' => $account->getId())) . '">' . lang('edit') . '</a>'; } if ($account->canDelete(logged_user())) { $options[] = '<a class="internalLink" href="javascript:og.promptDeleteAccount(' . $account->getId() . ', true)">' . lang('delete') . '</a>'; } // if if ($account->canDelete(logged_user()) && config_option("sent_mails_sync")) { $options[] = '<a class="internalLink" href="' . get_url('mail', 'sync_old_sent_mails', array('id' => $account->getId())) . '">' . lang('sync') . '</a>'; } ?>