function spam_admin_list_feedback in Spam 6
Same name and namespace in other branches
- 5.3 spam.module \spam_admin_list_feedback()
Spam feedback overview.
1 string reference to 'spam_admin_list_feedback'
- spam_menu in ./
spam.module - Drupal _menu() hook.
File
- ./
spam.module, line 999 - Spam module, v3 Copyright(c) 2006-2008 Jeremy Andrews <jeremy@tag1consulting.com>. All rights reserved.
Code
function spam_admin_list_feedback() {
$header = array(
array(
'data' => t('Date'),
'field' => 'timestamp',
'sort' => 'desc',
),
array(
'data' => t('Type'),
'field' => 'content_type',
),
array(
'data' => t('From'),
'field' => 'hostname',
),
array(
'data' => t('Preview'),
),
array(
'data' => t('Options'),
),
);
$sql = 'SELECT * FROM {spam_filters_errors}';
$sql .= tablesort_sql($header);
$result = pager_query($sql, 25);
$rows = array();
while ($feedback = db_fetch_object($result)) {
$row = array();
$row[] = array(
'data' => format_date($feedback->timestamp, 'small'),
);
$row[] = array(
'data' => $feedback->content_type,
);
$row[] = array(
'data' => $feedback->hostname,
);
$row[] = array(
'data' => _spam_truncate($feedback->feedback, 32),
);
$row[] = l(t('view'), "admin/content/spam/feedback/{$feedback->bid}");
$rows[] = $row;
}
$output = theme('table', $header, $rows);
$output .= theme('pager', NULL, 25, 0);
return $output;
}