function record_shorten_records_table in Shorten URLs 6
Same name and namespace in other branches
- 8.2 modules/record_shorten/record_shorten.module \record_shorten_records_table()
- 8 modules/record_shorten/record_shorten.module \record_shorten_records_table()
- 7.2 record_shorten.module \record_shorten_records_table()
- 7 record_shorten.module \record_shorten_records_table()
Builds a list of shortened URLs.
1 call to record_shorten_records_table()
- theme_record_shorten_records in ./
record_shorten.module - Builds a list of shortened URLs.
File
- ./
record_shorten.module, line 91 - Records shortened URLs.
Code
function record_shorten_records_table() {
if (module_exists('views')) {
return views_embed_view('record_shorten', 'default');
}
$header = array(
t('Original'),
t('Short'),
t('Service'),
);
$rows = array();
$result = pager_query("SELECT original, short, service FROM {record_shorten} ORDER BY sid DESC");
while ($row = db_fetch_object($result)) {
$rows[] = array(
check_plain($row->original),
check_plain($row->short),
check_plain($row->service),
);
}
$output = theme('table', $header, $rows);
$output .= theme('pager');
return $output;
}