case 'toggle':
     // just toggle the active state of the table entry
     $obj->mod_active = 1 - $obj->mod_active;
     $obj->store();
     $AppUI->setMsg('Module state changed', UI_MSG_OK);
     break;
 case 'toggleMenu':
     // just toggle the active state of the table entry
     $obj->mod_ui_active = 1 - $obj->mod_ui_active;
     $obj->store();
     $AppUI->setMsg('Module menu state changed', UI_MSG_OK);
     break;
 case 'install':
     // do the module specific stuff
     $AppUI->setMsg($setup->install());
     $obj->bind($config);
     // add to the installed modules table
     $obj->install();
     $AppUI->setMsg('Module installed', UI_MSG_OK, true);
     break;
 case 'remove':
     // do the module specific stuff
     $AppUI->setMsg($setup->remove());
     // remove from the installed modules table
     $obj->remove();
     $AppUI->setMsg('Module removed', UI_MSG_ALERT, true);
     break;
 case 'upgrade':
     if ($setup->upgrade($obj->mod_version)) {
         $obj->bind($config);
         $obj->store();