function taxonomy_image_admin in Taxonomy Image 6
Same name and namespace in other branches
- 5 taxonomy_image.module \taxonomy_image_admin()
File
- ./
taxonomy_image.module, line 497 - taxonomy_image.module Simple module for providing an association between taxonomy terms and images. Written by Jeremy Andrews <jeremy@kerneltrap.org>, May 2004.
Code
function taxonomy_image_admin() {
global $form_values;
$op = $_POST['op'];
$tid = $_POST['tid'];
// TODO: Use menus, not arg()
if (empty($op)) {
$op = arg(3);
}
switch ($op) {
case 'image':
if (arg(4) == 'add' || arg(4) == 'edit') {
$output = drupal_get_form('taxonomy_image_form', (array) taxonomy_image_get_term(arg(5)));
break;
}
$output = taxonomy_image_overview();
break;
case t('Save'):
$output = taxonomy_image_save($tid);
$output = taxonomy_image_overview();
break;
case t('Delete'):
$output = taxonomy_image_delete($tid);
$output = taxonomy_image_overview();
break;
default:
$output = taxonomy_image_overview();
}
print theme('page', $output);
}