You are here

function contact_admin_categories in Drupal 6

Same name and namespace in other branches
  1. 4 modules/contact.module \contact_admin_categories()
  2. 5 modules/contact/contact.module \contact_admin_categories()

Categories/list tab.

1 string reference to 'contact_admin_categories'
contact_menu in modules/contact/contact.module
Implementation of hook_menu().

File

modules/contact/contact.admin.inc, line 11
Admin page callbacks for the contact module.

Code

function contact_admin_categories() {
  $result = db_query('SELECT cid, category, recipients, selected FROM {contact} ORDER BY weight, category');
  $rows = array();
  while ($category = db_fetch_object($result)) {
    $rows[] = array(
      check_plain($category->category),
      check_plain($category->recipients),
      $category->selected ? t('Yes') : t('No'),
      l(t('edit'), 'admin/build/contact/edit/' . $category->cid),
      l(t('delete'), 'admin/build/contact/delete/' . $category->cid),
    );
  }
  $header = array(
    t('Category'),
    t('Recipients'),
    t('Selected'),
    array(
      'data' => t('Operations'),
      'colspan' => 2,
    ),
  );
  return theme('table', $header, $rows);
}