You are here

function notifications_admin_status_page in Notifications 5

Same name and namespace in other branches
  1. 6.4 notifications.admin.inc \notifications_admin_status_page()
  2. 6 notifications.admin.inc \notifications_admin_status_page()
  3. 6.2 notifications.admin.inc \notifications_admin_status_page()
  4. 6.3 notifications.admin.inc \notifications_admin_status_page()
  5. 7 notifications.admin.inc \notifications_admin_status_page()

Current subscriptions page

1 string reference to 'notifications_admin_status_page'
notifications_menu in ./notifications.module
Implementation of hook_menu().

File

./notifications.admin.inc, line 329

Code

function notifications_admin_status_page() {
  $output = '';

  // Subscriptions summary
  $header = array(
    t('Type'),
    t('Number'),
  );
  $result = db_query("SELECT type, count(*) AS count FROM {notifications} GROUP BY type");
  $count = 0;
  while ($stype = db_fetch_object($result)) {
    $rows[] = array(
      $stype->type,
      $stype->count,
    );
    $count += $stype->count;
  }
  $summary = theme('table', $header, $rows);
  $summary .= t('Total: %number', array(
    '%number' => $count,
  ));
  $output .= theme('box', t('Current subscriptions'), $summary);
  $output .= notifications_admin_queue_summary();
  return $output;
}