You are here

function constant_contact_manage_lists in Constant Contact 7.3

Same name and namespace in other branches
  1. 6.3 admin.lists.inc \constant_contact_manage_lists()
  2. 6.2 contactlists.admin.inc \constant_contact_manage_lists()

Displays the manage contact lists admin page

1 string reference to 'constant_contact_manage_lists'
constant_contact_menu in ./constant_contact.module
Implements hook_menu().

File

./admin.lists.inc, line 11
Manage contact lists.

Code

function constant_contact_manage_lists() {
  $cc = constant_contact_create_object();
  if (!is_object($cc)) {
    return '';
  }
  $lists = constant_contact_get_lists($cc);
  $html = '';
  $html .= '<p>' . l(t('Add a new contact list'), "admin/config/services/constant_contact/lists/add") . '</p>';
  $html .= '<table cellspacing="3" cellpadding="3" border="0">';
  $html .= '<tr><th>List Name</th><th colspan="2">&nbsp;</th></tr>';
  foreach ($lists as $id => $name) {
    $html .= '<tr>';
    $html .= '<td>' . $name . '</td>';
    $html .= '<td>' . l(t('Edit'), "admin/config/services/constant_contact/lists/edit/{$id}") . '</td>';
    $html .= '<td>' . l(t('Delete'), "admin/config/services/constant_contact/lists/delete/{$id}") . '</td>';
    $html .= '</tr>';
  }
  $html .= '</table>';
  return $html;
}