Magento check module status progarmatically

Magento check module status progarmatically: Magento has function to check if module is enabled or not

The functions isModuleEnabled and another is to check it node status

<?php

$moduleName = 'Mage_Core';
if (Mage::helper('core')->isModuleEnabled($moduleName)) {
  echo "Module is enabled.";
} else {
  echo "Module is disabled.";
}

?>
<?php 

$moduleName = 'Mage_Core'; 
$isActive = Mage::getConfig()->getNode('modules/' . $moduleName . '/active');
if ($isActive && in_array((string)$isActive, array('true', '1'))) {
  echo "Module is enabled.";
} else {
  echo "Module is disabled.";
}
?>