Determines whether a given module exists.
$module: The name of the module (without the .module extension).
TRUE if the module is both installed and enabled.
function module_exists($module) {
$list = module_list();
return isset($list[$module]);
}