-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
- require($INC);
-}
- elseif (!IS_MEMBER())
-{
- LOAD_URL("modules.php?module=index");
-}
- elseif ((!EXT_IS_ACTIVE("html_mail")) && (!IS_ADMIN()))
-{
- ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "html_mail");
- return;
+if (!defined('__SECURITY')) {
+ die();
+} elseif (!isMember()) {
+ redirectToIndexMemberOnlyModule();