function smileys_import_page in Smileys 6
Same name and namespace in other branches
- 5 smileys_import.module \smileys_import_page()
Menu callback; Present the page for operations on Smiley packs.
1 string reference to 'smileys_import_page'
- smileys_import_menu in ./
smileys_import.module - Implementation of hook_menu().
File
- ./
smileys_import.module, line 50
Code
function smileys_import_page() {
$header = array(
t('Smiley Packs'),
t('Operations'),
);
$rows = array();
$packs = smileys_import_packs();
foreach ($packs as $pack) {
$smileyp = db_fetch_array(db_query("SELECT * FROM {smileys} WHERE package = '%s'", $pack->name));
$option_link = $smileyp ? l(t('Uninstall'), 'admin/settings/smileys/import/delete/' . $pack->name) : l(t('Install'), 'admin/settings/smileys/import/add/' . $pack->name);
$rows[] = array(
'<strong>' . $pack->name . '</strong>',
$option_link,
);
}
$output = theme('table', $header, $rows);
if (empty($rows)) {
drupal_set_message(t('No smiley packs found.'));
$output = '';
}
return $output;
}