You are here

function contact_admin_categories in Drupal 4

Same name and namespace in other branches
  1. 5 modules/contact/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.module
Implementation of hook_menu().

File

modules/contact.module, line 136
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(
      $category->category,
      $category->recipients,
      $category->selected ? t('Yes') : t('No'),
      l(t('edit'), 'admin/contact/category/edit/' . $category->cid),
      l(t('delete'), 'admin/contact/category/delete/' . $category->cid),
    );
  }
  $header = array(
    t('Category'),
    t('Recipients'),
    t('Selected'),
    array(
      'data' => t('Operations'),
      'colspan' => 2,
    ),
  );
  return theme('table', $header, $rows);
}