You are here

function contact_admin_categories in Drupal 5

Same name and namespace in other branches
  1. 4 modules/contact.module \contact_admin_categories()
  2. 6 modules/contact/contact.admin.inc \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.module, line 143
Enables the use of personal and site-wide contact forms.

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);
}